Welcome To Snipplr


Everyone's Recent Snippets



1 ... 489 490 491 492 493 ... 553
0 1325 posted 18 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 1834 posted 18 years ago by isaac
Fecha en formato dd/mm/yyyy o dd-mm-yyyy retorna la diferencia en dias
0 1910 posted 18 years ago by isaac
This changes the date format from y-m-d to d-m-y on PHP
3 5196 posted 18 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 3224 posted 18 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 3487 posted 18 years ago by isaac
Execute this to remove the .svn directory from the current directory and all sub directories
3 2203 posted 18 years ago by meinhard
1 1471 posted 18 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 1792 posted 18 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 10958 posted 18 years ago by patcullen
PSTrickで書いた多様体の図
0 4344 posted 18 years ago by tkf
1 1677 posted 18 years ago by inkdeep
2 1640 posted 18 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 2765 posted 18 years ago by mandric
got this as part of an example on the adobe cookbook site
1 2367 posted 18 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 4267 posted 18 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 1418 posted 18 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 2397 posted 18 years ago by zingo
30 11856 posted 18 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 2520 posted 18 years ago by jaytee
1 2075 posted 18 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 2004 posted 18 years ago by kangell
Below is some code written for creating one response from survey questions where the respondent checks all that apply.
0 4199 posted 18 years ago by webonomic
Flash sucks, embedding it sucks more, find out how to make it not suck.
2 3179 posted 18 years ago by neal_grosskopf
Start mplayer with -vf screenshot, and press 's' when you want to capture a frame.
0 1676 posted 18 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 2296 posted 18 years ago by jonhenshaw
1 ... 489 490 491 492 493 ... 553