Welcome To Snipplr


Everyone's Recent Snippets



1 ... 489 490 491 492 493 ... 553
0 1095 posted 17 years ago by estebant
Este script calcula la edad en años a partir de una fecha dada y la resta con la actual.
0 1550 posted 17 years ago by isaac
Fecha en formato dd/mm/yyyy o dd-mm-yyyy retorna la diferencia en dias
0 1620 posted 17 years ago by isaac
This changes the date format from y-m-d to d-m-y on PHP
3 4712 posted 17 years ago by isaac
This changes the date format from y-m-d to d-m-y on PHP. It's easy to change the - to / or spaces...
0 2863 posted 17 years ago by isaac
This changes the date format from d-m-y to y-m-d on PHP. It's easy to change the - to / or spaces...
1 3141 posted 17 years ago by isaac
Execute this to remove the .svn directory from the current directory and all sub directories
3 1849 posted 17 years ago by meinhard
1 1202 posted 17 years ago by dbug13
Command line currency convertor, just copy and paste. I named mine 'coin'. Make sure you have Ruby, Rubygems and Hpricot (gem install hpricot). e.g. ~$ coin 100 eur usd 158.3300 Uses the site xurrency.com.
1 1492 posted 17 years ago by plexus
Takes a date and returns a string describing how long ago that date was. examples: 3 seconds ago, 5 days ago, 2 years ago, you get the idea :)
17 9976 posted 17 years ago by patcullen
PSTrickで書いた多様体の図
0 3975 posted 17 years ago by tkf
1 1353 posted 17 years ago by inkdeep
2 1313 posted 17 years ago by inkdeep
This is meant to be run as root, so do it at your own risk. It's very raw and needs error checking, but works. I run this script to get new django sites off the ground in a few minutes.
0 2363 posted 17 years ago by mandric
got this as part of an example on the adobe cookbook site
1 1982 posted 17 years ago by mswallace
found this on the adobe cookbook site. There is also some PHP to go along with this in my snippets.
1 3844 posted 17 years ago by mswallace
/* if (globalVariable) { But this wouldn't work. That code is actually checking to see if the defined variable globalVariable has a null value. If the variable has not been defined, that code will cause an error. Instead, here is the code that...
0 1167 posted 17 years ago by zha
You can store an IP address in an INT UNSIGNED (4 bytes) which is of course much more efficient and faster than a CHAR(15). MySQL has two built-in functions: INET_ATON() and INET_NTOA(). These two functions are used allover the place in any TCP/IP s...
0 2049 posted 17 years ago by zingo
30 10782 posted 17 years ago by zingo
Worst title ever. Basically, this takes a string like: "Check this out: http://snipplr.com/view/5759/replace-a-url-its-domain-name-and-create-link/" and replaces it with "Check this out: snipplr.com [with a link to the full URL]"
1 2155 posted 17 years ago by jaytee
1 1735 posted 17 years ago by tclancy
This bit of code allows you to turn code that looks like this: x = {'foo':1, 'bar':2 } x['foo'] = 3 Into this: x = dictclass( {'foo':1, 'bar':2 } ) x.foo = 3
2 1627 posted 17 years ago by kangell
Below is some code written for creating one response from survey questions where the respondent checks all that apply.
0 3786 posted 17 years ago by webonomic
Flash sucks, embedding it sucks more, find out how to make it not suck.
2 2847 posted 17 years ago by neal_grosskopf
Start mplayer with -vf screenshot, and press 's' when you want to capture a frame.
0 1387 posted 17 years ago by mandric
I often find something like this lurking at the end of my base templates - it'll show you which queries were run while generating the current page, but they'll start out hidden so as not to be a pain. Of course, before this works, you'll need to s...
1 1904 posted 17 years ago by jonhenshaw
1 ... 489 490 491 492 493 ... 553