Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Based on some comments in [StackOverflow Question](http://stackoverflow.com/questions/95875/javascript-check-to-see-if-a-variable-is-an-object "How to check if a variable is an object")
3
1766
posted 16 years ago by jasonseney
Recently moved my Wordpress blog to a tumblr account while I was removing a hosting account, wrote this script to do the transfer for me using Wordpress' Export feature and Tumblr's API.
It's rough around the edges but gets the job done!
2
2355
posted 16 years ago by shakefon
This is the modified GWT HTML host page for your module. As you can see, the only modified element is the path to the GWT bootstrap script, the original declaration was the GWT 1.5 way, the new declaration is the [GWT 1.6 way](http://code.google.com/...
0
1059
posted 16 years ago by salvadordiaz
Say that you have a collection of objects empty but for IDs.
You want to do a foreach loop through those objects and lookup detail one at a time.
Unfortunately, in the foreach, you can't replace the references, you can only copy the new detail...
1
1987
posted 16 years ago by rengber
Don't run the dev server as an actual web server. I'm just doing this so I can work remotely on a vm.
0
3356
posted 16 years ago by tclancy
Dado un objeto original, este método copia los valores de ese objeto en un segundo objeto de la misma clase, utilizando reflection.
0
1294
posted 16 years ago by delm
Esta función devuelve un string aleatoreo con un largo aleatoreo, con un mÃnimo y un máximo.
El uso más común es solo especificar el largo máximo.
Especialmente útil para pruebas unitarias.
NOTA: depende de http://snipplr.com/view/14580/n...
1
1174
posted 16 years ago by delm
When you hover over the “message†div, the “controls†div inside it will appear, along with all of its content, giving you the same functionality as used by the Twitter web app.
There may be an issue with accessibility because screen reade...
0
1281
posted 16 years ago by justinseiter
In case you don't feel like loading 3 pages to edit a single url alias.
1
1481
posted 16 years ago by zachharkey
This is a simple script that will allow you to crop an image that you upload from a form.
1
1426
posted 16 years ago by aristoworks
Transform text (eg. from a WYSIWYG) into nicely formatted HTML paragraphs. (Credits: Ludo Magnocavallo's LightPress).
[this is a solid starting point - but a lot of HTML elements are missing]
3
1202
posted 16 years ago by iroybot
HRs are a pain in the ass to style, so why bother? Wrap them in a DIV with a class of HR instead. (In your stylesheet, set .hr hr { display: none }).
This also ports the class of the HR up to the new parent DIV, allowing you to make a few differen...
1
1069
posted 16 years ago by dougunderscorenelson
This adds a class to focused form elements (helpful for IE6/7), as well as adds a class to the input's parent (in this case, named "form-field").
1
1350
posted 16 years ago by dougunderscorenelson
Quick script to find button elements (and elements with the "button" class) and wrap their innards in spans. Good for making rounded-corner buttons.
0
1106
posted 16 years ago by dougunderscorenelson
since the script observes mouseout, it should fire mouseleave events before mouseenter to preserve correct order.
1
1672
posted 16 years ago by pdswan
This will return a list of all the tables in a certain database along with their row count.
1
1487
posted 16 years ago by blackf0rk
Easily create a SINGLE USE ONLY (Singleton) Class Object with this template.
1
1612
posted 16 years ago by allnatural
This turns the about page into a featured category post page. The principles for just a regular custom page template with sidebars is there too.
3
2516
posted 16 years ago by kristarella
This provides a teaser, with content from a custom feild, or the excerpt if no field exists. Everything except the title and edit link need to be turned off in the options.
3
1365
posted 16 years ago by kristarella
displayed filename and line number.
//normal use
d( $arg );
//some arguments
d( $arg1 , $arg2 , ... );
0
1149
posted 16 years ago by ikimozu