Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
1365
posted 17 years ago by kangell
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
1606
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
1375
posted 17 years ago by cczona
This class var creates a belongsTo association between this and another Model
1
1269
posted 18 years ago by jesse
This class var definition configures a Model to have a OneToOne relationship with a Model of another class.
1
1260
posted 18 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
1459
posted 18 years ago by pufftenticle
To grant all privileges to a user from any location login to the mysql shell and run the following queries.
3
1777
posted 18 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1
1559
posted 18 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
1494
posted 18 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
1426
posted 18 years ago by cczona
This snipped is split in two sections: Actionescript 3 and PHP
2
1679
posted 18 years ago by gfazioli
Quick command I use to remove .SVN folders from a tree structure copied from SVN working copy. Sometimes a bit easier than running an export.
6
2664
posted 18 years ago by wfdev