This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install nginx on Debian. | |
# | |
# Author : Scott Barr | |
# Date : 7 Jan 2010 | |
# | |
VERSION=0.7.64 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install Ruby 1.9 on Debian. | |
# | |
# Author : Scott Barr | |
# Date : 7 Jan 2010 | |
# | |
# TODO : Check that Ruby 1.8 is installed, as it is apparently a dependency for | |
# installing Ruby 1.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# starling This init.d script is used to start starling. | |
# It basically just calls starling. | |
# | |
ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin" | |
STARLING="/usr/local/bin/starling" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install Starling on Debian. | |
# | |
# Author : Scott Barr | |
# Date : 19 Jan 2010 | |
# | |
if [ ! `which ruby` ]; then | |
echo "Ruby required, installing..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install Python 2.6 from Source | |
# | |
# Author : Scott Barr | |
# Date : 21 Jan 2010 | |
# | |
PYTHON_VERSION=2.6.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From http://www.news.com.au/technology/the-ten-most-common-passwords-revealed/story-e6frfro0-1225822539186 | |
The top 10 most common passwords | |
1. 123456 | |
2. 12345 | |
3. 123456789 | |
4. Password | |
5. iloveyou | |
6. princess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sanitize(s) | |
# escape double quotes | |
s.gsub('"', '\"') | |
end | |
s = 'hello"' | |
puts sanitize(s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# while [ true ]; do date ; sleep 1; done | |
Fri 31 Dec 2010 23:59:56 SGT | |
Fri 31 Dec 2010 23:59:57 SGT | |
Fri 31 Dec 2010 23:59:58 SGT | |
Fri 31 Dec 2010 23:59:59 SGT | |
Sat 1 Jan 2011 00:00:00 SGT | |
Sat 1 Jan 2011 00:00:01 SGT | |
Sat 1 Jan 2011 00:00:02 SGT | |
Sat 1 Jan 2011 00:00:03 SGT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> SHOW VARIABLES like "version"; | |
+---------------+--------+ | |
| Variable_name | Value | | |
+---------------+--------+ | |
| version | 5.5.15 | | |
+---------------+--------+ | |
1 row in set (0.00 sec) | |
mysql> select * from users where id in (29391170719191043234654437481914368); | |
Empty set (0.00 sec) |