Welcome To Snipplr


Everyone's Recent Snippets



1 ... 468 469 470 471 472 ... 553
The script was modified slightly based on comments.
0 2018 posted 17 years ago by sudarkoff
0 1721 posted 17 years ago by DaveChild
This script should be run from the "master" database. It will destroy the dev copy of a database and restore from the live copy. Code slightly modified from original (linked).
0 1618 posted 17 years ago by DaveChild
Run from within SQL to get list of items in directory to a table.
1 1867 posted 17 years ago by DaveChild
Crops and resizes, maintaining perspective, with a white background.
1 1856 posted 17 years ago by DaveChild
1 2067 posted 17 years ago by DaveChild
This code is both basic and available from 24ways.org, but it's damn handy to reach through the snipplr plugin from textMate. PS: all cred to Rachel Andrew & the 24ways team.
4 2011 posted 17 years ago by stavelin
Based on the ereg family of functions in PHP.
0 1934 posted 17 years ago by DaveChild
Format strings: * %A - AM or PM * %a - am or pm * %m - Month with leading zeroes (01 - 12) * %n - Month without leading zeroes (1 - 12) * %F - Month name (January - December) * %M - Three letter month name (Jan - Dec) * $d - Da...
0 3754 posted 17 years ago by DaveChild
Translated by David Hunter.
0 2508 posted 17 years ago by DaveChild
4 2210 posted 17 years ago by DaveChild
7 3625 posted 17 years ago by DaveChild
0 1917 posted 17 years ago by stavelin
0 4037 posted 17 years ago by DaveChild
Generating MD5 HEX string from either URL or File instance in Groovy (more elegant than the Java version).
1 2604 posted 17 years ago by narkisr
You know how your bookmarks toolbar will show a little arrow when there are too many to fit? This code snippet will make the toolbar twice the size in height, and make the bookmarks wrap to the next line. In mac, you need to edit the file /Users/-...
1 1681 posted 17 years ago by Jacolyte
This is a simple javascript snippet that will allow you to specify a particular class to a group of checkboxes and then select them all at once when you click the master checkbox. This came in very handy for a store inventory script when I needed to...
0 2169 posted 17 years ago by aristoworks
0 1600 posted 17 years ago by fredaudet
0 1410 posted 17 years ago by rubinsta
I normally paste this into config/mongrel.rb, then add "require 'mongrel'" in my config/deploy.rb Once that's done, you'll be able to start, stop, and restart your mongrels like so: `cap deploy:mongrel:start/stop/restart`
3 1981 posted 17 years ago by jimmyebaker
Repeatable Fisher Yates Array Shuffle based on given random string. If no seed is provided the current second will be used (not to use as a pure random shuffle... based on microseconds)
0 2191 posted 17 years ago by digdan
En IE6 el min-height se reemplaza en realidad con height, porque por un error de Explorer tiene exactamente el mismo efecto. Este código hace que la caja tenga 700px de mínimo tanto para FF como para IE6.
0 1610 posted 17 years ago by demixo
This function will allow you to use '#ABCDEF' or '0xEEFF33' instead of the RGB values required for imagecolorallocate() by stripping away any non hex characters. It will also check and make sure that it's a valid 6 digit hex value after the stripping...
0 1620 posted 17 years ago by Jacolyte
The plugin's "shave_all" function was not properly cropping and resizing the thumbnails for me. The following needs to be changed in sfImageMagickAdapter.class.php
1 1603 posted 17 years ago by catchamonkey
0 1854 posted 17 years ago by xuanyan
Just some pseudo-code notes about using labels with `break` and `continue` statements.
0 1870 posted 17 years ago by wizard04
2 2131 posted 17 years ago by pmaciver
1 ... 468 469 470 471 472 ... 553