This file contains 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
server@www:~> sudo mysql_secure_installation | |
root's password: <Enter server's root password> | |
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL | |
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! | |
This file contains 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
GeoIP C API /Gem Install on Intel Mac | |
# Download the GeoIP C API. | |
wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.6.tar.gz | |
# Uncompress and install GeoIP C API from source. | |
tar zxvf GeoIP-1.4.6.tar.gz | |
cd GeoIP-1.4.6 | |
env ARCHFLAGS="-arch i386" ./configure --prefix=/srv/GeoIP | |
env ARCHFLAGS="-arch i386" make |
This file contains 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
# Example MySQL config file for medium systems. | |
# | |
# This is for a system with little memory (32M - 64M) where MySQL plays | |
# an important part, or systems up to 128M where MySQL is used together with | |
# other programs (such as a web server) | |
# | |
# You can copy this file to | |
# /etc/my.cnf to set global options, | |
# mysql-data-dir/my.cnf to set server-specific options (in this | |
# installation this directory is /usr/local/mysql/data) or |
This file contains 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 | |
echo "Deleting dennmart.com archive for $(date +%A) if it exists..." | |
tarsnap --cachedir /usr/local/tarsnap-cache --keyfile /root/tarsnap.key -d -f dennmart.com-daily-$(date +%A) | |
echo "Creating dennmart.com archive for $(date +%A)..." | |
tarsnap --cachedir /usr/local/tarsnap-cache --keyfile /root/tarsnap.key -c -f dennmart.com-daily-$(date +%A) /var/www/dennmart.com | |
echo "Making temporary database dump..." | |
mysqldump -u root -pxxxxxx --all-databases --add-drop-table > /tmp/mysqldump.sql | |
echo "Deleting database dump archive for $(date +%A) if it exists..." |
This file contains 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> SELECT * FROM logs LIMIT 1; | |
+----+--------------+---------------+--------+---------+ | |
| ID | ipaddress | date | user | time | | |
+----+--------------+---------------+--------+---------+ | |
| 1 | 192.168.1.23 | March 3, 2004 | dennis | 1:28 pm | | |
+----+--------------+---------------+--------+---------+ | |
1 row in set (0.00 sec) |
This file contains 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
______________________________________________________________________ | |
/ Q: What does it say on the bottom of Coke cans in North Dakota? \ | |
\ A: Open other end. / | |
---------------------------------------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || |
This file contains 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 | |
wget -m -nd http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip | |
# If the file doesn't exist, send an alert to Fail Notifier. | |
if [ ! -f GeoIpCountryCSV.zip ] | |
then | |
curl http://my-fail-notifier.heroku.com/fail -X POST -u basic_auth_user:basic_auth_password -d message="The download failed!" | |
fi |
This file contains 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
export RUBY_HEAP_MIN_SLOTS=1000000 | |
export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
export RUBY_GC_MALLOC_LIMIT=1000000000 | |
export RUBY_HEAP_FREE_MIN=500000 |
OlderNewer