Welcome To Snipplr


Everyone's Recent Snippets



1 ... 490 491 492 493 494 ... 553
Start mplayer with -vf screenshot, and press 's' when you want to capture a frame.
0 1294 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 1789 posted 17 years ago by jonhenshaw
Send an e-mail message to the given addresses.
2 1334 posted 17 years ago by kangell
Run the specified command. If expect is not None then look for the given text in the output. If it is not there we throw an error. expect can also be a list of strings. In that case any match results in success unless matchall=True.
0 1268 posted 17 years ago by kangell
1 1442 posted 17 years ago by neil
provides a tidy way to add initialization by hash to new classes
1 1184 posted 17 years ago by neil
3 1425 posted 17 years ago by rblalock
8 1843 posted 17 years ago by rblalock
3 1296 posted 17 years ago by rblalock
0 1048 posted 17 years ago by rblalock
Instead of using this function to set the default timezone in your script, you can also use the INI setting date.timezone to set the default timezone. * Does not affect timestamp functions, which are all GMT
0 1481 posted 17 years ago by johnself
Check out the bash command 'shopt -s cdable_vars' From the man bash page: If set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to.
0 1269 posted 17 years ago by cczona
Useful for speeding up searches.
1 2676 posted 17 years ago by jarnaldich
2 1514 posted 17 years ago by rblalock
1 1223 posted 17 years ago by jesse
This class var creates a belongsTo association between this and another Model
1 1175 posted 17 years ago by jesse
This class var definition configures a Model to have a OneToOne relationship with a Model of another class.
1 1167 posted 17 years ago by jesse
This is the basic edit action suggested by the CakePHP Manual
1 1175 posted 17 years ago by jesse
i found this snippet here on snipplr (see the link up above), and really liked it. it came up with a validation error under XHTML 1.0 Strict so i changed it to what you see in the bottom.....
1 1332 posted 17 years ago by pufftenticle
2 1463 posted 17 years ago by iTony
To grant all privileges to a user from any location login to the mysql shell and run the following queries.
3 1665 posted 17 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1 1428 posted 17 years ago by cbrant
(EDITED: Originally I had this snip using 'cat /proc/version'. But have since replaced it with a more reliable -- and specific -- method) If you need still more info (or are on a BSD), see 'uname', 'dpkg-architecture'
1 1378 posted 17 years ago by cczona
If Ubuntu Server fails to resolve hostnames or find a network connection via Parallels 3 bridged networking, it may be attempting to use the wrong network interface.
0 1305 posted 17 years ago by cczona
This snipped is split in two sections: Actionescript 3 and PHP
2 1570 posted 17 years ago by gfazioli
29 10824 posted 17 years ago by rouxmout
1 ... 490 491 492 493 494 ... 553