Month: August 2011

Move WP from subdir to root dir

From askwpgirl.com Q. I’ve installed my website in a subdirectory of our domain, because I didn’t want visitors to see the site until I was finished with our development. Now I want to have the site show up in the root directory (not in the http://mydomain.com/wordpress directory). How do I do this? I’ve read the…


lolcat – taste the rainbow

https://github.com/busyloop/lolcat


Glark

From Linux.com By Joe ‘Zonker’ Brockmeier GNU grep is one of my go-to tools on any Linux box. But grep isn’t the only tool in town. If you want to try something a bit different, check out glark a grep alternative that might might be better in some situations. What is glark? Basically, it’s a…


daily reboot via cron

Not saying this is a good idea, but a client requested it… 0_o Here is crontab -e ### Reboot the server every day at 3:00 am 0 3 * * * /sbin/shutdown -r now >/dev/null or, if the want to call a reboot from script: Here is reboot_server.sh #!/bin/bash /sbin/shutdown -r now


Dig multiple cpanel domains

If you find yourself with a customer requesting to know where all the domains associated with a cpanel account are pointing to or are migrating accounts, you can do the following: #for each in `ls /var/cpanel/users/*`; do grep DNS $each >> domains.txt; done; #sed -i ‘s:.*DNS.*\=::gi’ domains.txt ; #for each in `cat domains.txt`; do echo…


Apt-Undo

From From http://lkubuntu.wordpress.com Apt-Undo, a simple way of undoing Apt actions I have done many actions with apt-get that I later regretted, so I decided to make a script to undo those actions. This script can only work if you use this script instead of apt-get to install/upgrade/remove/purge/downgrade your packages. To install, open up a…