Welcome To Snipplr


Everyone's Recent Snippets



1 ... 489 490 491 492 493 ... 553
0 1170 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 1653 posted 18 years ago by isaac
Fecha en formato dd/mm/yyyy o dd-mm-yyyy retorna la diferencia en dias
0 1735 posted 18 years ago by isaac
This changes the date format from y-m-d to d-m-y on PHP
3 4882 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 2988 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 3261 posted 18 years ago by isaac
Execute this to remove the .svn directory from the current directory and all sub directories
3 1979 posted 18 years ago by meinhard
1 1300 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 1598 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 10239 posted 18 years ago by patcullen
PSTrickで書いた多様体の図
0 4108 posted 18 years ago by tkf
1 1448 posted 18 years ago by inkdeep
2 1414 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 2506 posted 18 years ago by mandric
got this as part of an example on the adobe cookbook site
1 2111 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 3996 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 1250 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 2164 posted 18 years ago by zingo
30 11095 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 2289 posted 18 years ago by jaytee
1 1855 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 1731 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 3907 posted 18 years ago by webonomic
Flash sucks, embedding it sucks more, find out how to make it not suck.
2 2961 posted 18 years ago by neal_grosskopf
Start mplayer with -vf screenshot, and press 's' when you want to capture a frame.
0 1462 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 2022 posted 18 years ago by jonhenshaw
1 ... 489 490 491 492 493 ... 553