Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This sample contains 2 macro techniques for iterating through character values on a macro %DO loop.
0
847
posted 9 years ago by webonomic
This is a template for a UIPickerView delegate and data source. Implement these methods to manage UIPickerViews.
1
647
posted 9 years ago by BreadicalMD
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
600
posted 9 years ago by rickygri
this program view some of OS information try it you will not lose thing.
1
349
posted 9 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
821
posted 9 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
510
posted 9 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
691
posted 9 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
631
posted 9 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
663
posted 9 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
374
posted 9 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
484
posted 9 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
474
posted 9 years ago by redhatmatt
For this to work add class "[CPT]-menu-item" to your menu item.
0
959
posted 9 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
675
posted 9 years ago by borysn
FIll a List<Character> with ASCII (0-127) characters with a given number of characters.
0
536
posted 9 years ago by borysn
Generic method for printing a list to the console based on the number of characters per line.
0
482
posted 9 years ago by borysn
Checks if JQuery is loaded and then checks if loaded version of JQuery >= needed version
0
391
posted 9 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
523
posted 9 years ago by ShawnG