Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This is a really basic skeleton template for jQuery plugins. It provides a callback function which can be called anywhere in your plugin with base.success(); This will return the current element, but you can pass anything you like back by changing th...
0
996
posted 11 years ago by rickygri
this program view some of OS information try it you will not lose thing.
1
635
posted 11 years ago by PalCoder
It's imposible to read de "_id" field en django templates ( {{element._id}} === error) So, to read it, you must do a templatetag.
Now you hace the templatetag, you can use it like this: {{element|pk}}
0
1315
posted 11 years ago by viroide
Takes one or two PHP timestamps, and returns a somewhat humanized string representing the date range
* Jun 7th, 2013
* Jun 7th-11th, 2013
* Jun 7th-Jul 3rd, 2013
* Jun 7th, 2013-Jan 1st, 2013
0
917
posted 11 years ago by vodou
Configure settings for all external links on your site.
Features:
* Open external links in new window or tab
* Add "nofollow"
* Set link title
* Set link icon
* Set classes (for your own styling)
* Set no-icon class
* SEO friendly
0
1095
posted 11 years ago by freelancephp
You want to start a new Rails app. But you also want to start a new RVM gemset for the app so you can start with the latest Rails and gems. In this code snippet I show how I start off an up-to-date Rails project in a clean gemset.
1
1058
posted 11 years ago by dreamstarter
Each image is positioned, dimensioned, and repeated according to the comma separated values in the other background properties. The images in the list are layered front to back in the same order they are listed in the rule declaration. If a backgroun...
0
1080
posted 11 years ago by COBOLdinosaur
Here is a simple and clever way to prevent script conflicts when using jQuery.
This snippet will show how to scope the dollar sign.
2
639
posted 11 years ago by Priestd09
Breaks up an address (in this case returned by Advanced Custom Fields Location plugin) into it's components. Additionally, sorts a multidimensional array of locations alphabetically by state. This works for basic addresses assuming that address is in...
1
870
posted 11 years ago by devowhippit
It currently uses redis as a store for the data. The url's are pretty long since it's all base64 encoded data and the images are returned as base64 encoded PNG's but that can be solved pretty easily. This could be used a service for something kind of...
0
781
posted 11 years ago by redhatmatt
For this to work add class "[CPT]-menu-item" to your menu item.
0
1346
posted 11 years ago by ihatetomatoes
Create a List<String> for a specified number strings with a specified max characters (randomized...1-max). This method uses another snippet which contains initCharacterList(int, int) http://snipplr.com/view/71355/fill-character-list-from-ascii-table-...
0
1073
posted 11 years ago by borysn
FIll a List<Character> with ASCII (0-127) characters with a given number of characters.
0
836
posted 11 years ago by borysn
Generic method for printing a list to the console based on the number of characters per line.
0
811
posted 11 years ago by borysn
Checks if JQuery is loaded and then checks if loaded version of JQuery >= needed version
0
659
posted 11 years ago by lubosfonio
Returns array with information like:
Input image
width 200
height 200
print_r(ratioResize('path/to/image.ext' , 100 , 50));
output:
array(
[ratio] => .5,
[height] => 50,
[width] => 50,...
0
901
posted 11 years ago by ShawnG
Example to manipulate only numbers (and tab key) in a web control (textbox example)
0
834
posted 11 years ago by keidash
The colgroup and col structure is like a directive that specifies table formatting outside of the normal flow. Notice that the col tags do not get closed in HTML5, and the cascade is irregular. Normally the cascade applies to children, but the rows a...
0
898
posted 11 years ago by COBOLdinosaur