Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Place the first function, phptemplate_links() in your template.php file. Alternatively (and IMO better) is to name the function your_theme_name_links() where your_theme_name is the name of your theme.
From here on, you can add theme functions like...
2
1703
posted 17 years ago by berkes
Basically what this algorithm does is to replace the first letter of the serial number by a number (each letter represents where the banknote is originally from), then it calculates the sum of all digits. If the remaining of the division of that sum...
0
1040
posted 17 years ago by j_junyent
¿Por qué empeñarnos en hacer enlaces que actúen como botones? ¿Por qué no hacemos botones que parezcan enlaces?
0
1001
posted 17 years ago by j_junyent
Sometimes you can find error numbers in log files from various programs or even the kernel. This one-liner can be used to convert the error number into a meaningful message. "X" is the error number.
0
1197
posted 17 years ago by amosshapira
In response to a very simplistic solution suggestion using Shell, here is a basic version of what I use. The advantage of the solution below is that it is supposed to be much faster on directories with many files (I regularly use its full-blown versi...
0
1208
posted 17 years ago by amosshapira
Fix probleme de transparence avec le background sous iE. Pour "crop" ou "image".
1
1581
posted 17 years ago by frakim
Yes, this is valid code.
Designed by myself, unless otherwise noted.
0
1726
posted 17 years ago by darkphotn
Large factorials are easy to do in LISP, although a number above (2000!) may crash it. I designed this because of an online post from a mathematician talking about the number 1000! . Code like this is difficult to write in C-like languages, but a s...
0
3308
posted 17 years ago by darkphotn
This demonstrates how to make your own console "scripts" using C -- for example, you could capitalize every character that comes in. Tweak the line labelled "TWEAK THIS LINE" in order to get it to do what you want. This particular example will add...
1
1191
posted 17 years ago by darkphotn
This demonstrates a simple "Hello World" style program for 16-bit (DOS) x86 assembly using Microsoft's free MASM assembler.
0
5937
posted 17 years ago by darkphotn
This requires ImageMagick installed.
Resize, as well as convert the image format.
(Note: either of WIDTH or HEIGHT can be left blank, e.g. WIDTHx and the image will be resized proportionally)
1
1439
posted 17 years ago by soroush
Very simple style switcher using jquery. Takes 3 links with id's on each. When one is clicked various styles are removed, then a new one is added.
3
1691
posted 17 years ago by 1man
This is a handy little function that takes the htmlText value of a TextField and ads a specified tag at the beginning and end of the string. Handy for quick formatting tags such as bold, italic, underline, but could be used to add complex style data...
0
1236
posted 17 years ago by discorax
Run this command when you are in the directory where you want to changes the files that get ignored.
1
1397
posted 17 years ago by jachin
test with echo instead of mv
example removes spaces after dots, replaces spaces with _, removes ' , and -, and finally lowercases filenames
1
1580
posted 17 years ago by iblis