Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
The favicon is much normality in our days. Here the "apple-touch-icon" definition which is used when you save a bookmark to your home screen on an apple touch devices such as an iPad or iPhone. The interesting thing is that Android also supports its...
0
3479
posted 11 years ago by apphp-snippets
Brendan Eich is working on officially adding Math.TAU to JavaScript.
Until JavaScript has full support for the Math.TAU constant, you can add the following at the start of your programs to add support for the TAU constant.
0
1394
posted 11 years ago by pmw57
The code to verify that a method was called.
The this.mockProvider.Verify verifies that GetBiAutoProcessConfigByKeys is called.
0
1436
posted 11 years ago by heathbo
alternating row color snippet for outputting query results in a html table
1
3371
posted 11 years ago by dreamstarter
coldfusion snippet to output a query recordset into multiple columns
1
1803
posted 11 years ago by dreamstarter
cd to directory, then run the line below to change any spaces in a filename to hyphens
0
4230
posted 11 years ago by flatearthcomms
This solution is based on Chrome specific CSS extension. Other browsers will ignore this rule.
0
2496
posted 11 years ago by apphp-snippets
simple preprocess function to alter the site name depending on the section of the site
0
1366
posted 11 years ago by emijayne
The ExpectedException section under [TestMethod] is where you tell Moq what type of exception your listening for. If that exception is thrown, then this test will pass and it will stop running all the code under the target.CalculateProvisionalPrice....
0
2229
posted 11 years ago by heathbo
Example 1: I'm verifying that the list that is passed in has 3 attachments. SendMail is run later in the SendEmail method.
Example 2: I'm verifying that the object that is passed into the method has the appropriate values.
0
1996
posted 11 years ago by heathbo
This example of code allows you to create a new object in javascript (using simple inheritance) such that the class of the object is defined from a variable. After creating the object you may use it for your purposes.
0
1462
posted 11 years ago by apphp-snippets
Code to replace your opening <html> tag with conditionally set IE classes, including IE10.
1
3665
posted 11 years ago by Japegrape
Data types and ranges for Microsoft Access, MySQL and SQL Server.
0
1014
posted 11 years ago by chrispantelis
New SQL Record = Populate TimeStamp Field with GetDate() Function
0
1332
posted 11 years ago by chrispantelis
Tiny python closure for combining redis keys with "format".
Uses a closure so it does not remake the base key each use.
0
3169
posted 11 years ago by dsonbill
If you want to make a copy of the table including all of the data, then leave out the WHERE clause.
0
1155
posted 11 years ago by chrispantelis
This will get the names of all the columns as one long string ready to use in a select statement. N.B. There is a list of column names to exclude (In this case '???COLUMNS_TO_EXCLUDE???')
0
3453
posted 11 years ago by imbraz
FME has designed efficient Canvas Drawing Plugin for WordPress that enables users to draw canvas online on separate paint book by utilizing basic drawing tools like brush, pencil, etc. This WordPress Plugin will create two additional pages on your we...
0
1258
posted 11 years ago by alastarmason1
Sometimes you may need to change image properties 'on-the-fly'. The best example is when you want to display blog post short description, retrieve the first image and try to turn it into the thumbnail: change some properties and add a special class n...
0
2393
posted 11 years ago by apphp-snippets
This simple code demonstrates how to change automatically site language, according to the visitor's country. If you implement this script in your site it will open the page in the language of your visitor.
0
1787
posted 11 years ago by apphp-snippets
Install LAMP Stack (Linux,Apache, Mysql, PHP)
Install PHP5 (Some applications require other PHP5 mods)
Install phpMyAdmin
0
1345
posted 11 years ago by oxnard
make a cron like:
`*/5 * * * * root bash /root/vpn-check.sh`
0
1054
posted 11 years ago by dbiesecke
use anonymous function that returns parameter passed to it to evaluate functions, constants, and expressions in HEREDOC
0
2541
posted 11 years ago by Queue
A simple effect using simple CSS. This is part of a collection of gradient effects
0
2530
posted 11 years ago by COBOLdinosaur
The following technical tip shows how php developers can protect their word documents in cloud using Aspose for Cloud SDK in php.
0
2020
posted 11 years ago by johansonkatherine
Changes link destination of 'Continue Shopping' button on cart page
0
1259
posted 11 years ago by daprela