Author Archives: Spechal
Very simple MySQL backup bash script
This code backups up mysql databases and gzips them into the current working directory. If you want to backup the mysql table, remove it from the for loop. #!/bin/bash usage(){ echo “Usage $0 <mysql_user> <mysql_password>” exit 1 } if [[ … Continue reading
Installing php-ffmpeg on CentOS 5.x
This can be a pain due to a bug in the ffpmeg_frame.c file … here are the commands to get up and going yum -y install ffmpeg ffmpeg-devel wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download tar jxvf ffmpeg-php-0.6.0.tbz2 sed -i ‘s/PIX_FMT_RGBA32/PIX_FMT_RGBA/g’ ffmpeg-php-0.6.0/ffmpeg_frame.c cd ffmpeg-php-0.6.0 && … Continue reading
Common Power Amp Resistance Watt Forumlas
P is Power, also known as Volts, also known as Electromotive Force (EMF). I is Resistance, measured in Ohms E is Amps, also known as Current W is Watts, the multiplication of Power and Amperes. kW is kilo-Watts, also known … Continue reading
Plaintext Offender : BidVertiser
If you have an account with BidVertiser, your password is stored in plain text and emailed back to you when you request it. This also means customer service can look up your account and get your password. I informed them … Continue reading
Search / Replace in files with Linux
I used this command to search over some Apache 2 vhost files to change them from port 8080 to port 80 with Debian. find /etc/apache2/sites-enabled -name “*com” -exec sed -i ‘s/8080/80/g’ {} \; Bookmark on Delicious Digg this post Recommend … Continue reading
Low Level Format Disk Drive with Linux
Doing a log level format with linux is super easy. Make sure the drive you want to format is not mounted and determine the device in /dev/ i.e. /dev/sdb Enter the following command to turn all the bits on the … Continue reading
Use mogrify to rotate and scale your images on the Linux command line
First, make sure you have ImageMagick installed: #Ubuntu/Debian sudo apt-get install imagemagick #RedHat, Fedora, CentOS sudo yum install imagemagick After that, it’s super easy. mogrify -resize 800 -rotate 90 image.jpg The above command would resize image.jpg to 800 pixels wide … Continue reading
Node.js Trademarked — Next Up: Buyout (Sellout)
Well, Node.js has been trademarked to “protect the brand”. What does that usually mean? “We need a nice brand to sell.” http://blog.nodejs.org/2011/04/29/trademark/ Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it … Continue reading
Blowing an LED … sort of.
Today I learned that you can supply just enough amperage to a light emitting diode to destroy the gases that emit photons but not destroy the circuit. I did it twice … just to make sure I wasn’t crazy of … Continue reading
