Root Cron to run Python

I was having some issues with a cron job I created as root using crontab -e the entry was: */15 * * * * /path/to/ After ripping my hair out overnight (Troubleshooting tips): tail /var/log/cron (checks if it is running) add a line to your crontab: MAILTO=”” – will email you debugging info Here’s the[…]

MySQL on FreeBSD 10

# pkg install mysql56-server # echo ‘mysql_enable=”YES”‘>>/etc/rc.conf # service mysql_server start # mysql -u root mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘rootpwd’); mysql> SET PASSWORD FOR ‘root’@’host_name’ = PASSWORD(‘rootpwd’); # mysql -u root mysql> SET PASSWORD FOR ”@’localhost’ = PASSWORD(‘anonpwd’); mysql> SET PASSWORD FOR ”@’host_name’ = PASSWORD(‘anonpwd’); mysql> CREATE USER ‘colin’@’localhost’ IDENTIFIED BY ‘SuperPassword!’; mysql>[…]

Debugging Python and Ruby

Both Command Line based debuggers are very similar. Python: : # python -m pdb Once in: b (line #) – sets breakpoint s – step into n – next c – continue r – run til return Ruby: : # ruby -r debug debugfile.rb Once in: b (line #) – sets breakpoint[…]


Developing RESTful Web APIs with Python, Flask and MongoDB from Nicola Iarocci __ Ryan Tomayko Disclaimer: After receiving a number of reasonable complaints about the gender-oriented nature of this article from people I respect very much, I’ve decided to take it down for good. While the dialog was never intended as commentary on the[…]

Convert m4a to mp3 (or any FFMPEG conversion – Modify accordingly)

root@colinbsd2:/usr/home/colin # cat /mnt/ipod/iPod_Control/Music/m4aTomp3sh #!/bin/sh if [ -z $1 ];then echo Give target directory; exit 0;fi find “$1” -depth -name ‘*’| while read file ; do directory=$(dirname “$file”) oldfilename=$(basename “$file”) newfilename=$(basename “${file%.[Mm][4][Aa]}”) if [ “$oldfilename” != “$newfilename” ]; then ffmpeg -i “$directory/$oldfilename” -ab 320k “$directory/$newfilename.mp3”

FreeBSD Rename iPod_Control MP3 Files

Install Wine: root@colinbsd2:/home/colin# pkg install i386-wine Download: Unpack the exe: (quickest way I have is 7-zip in M$) Run the program: root@colinbsd2:/home/colin# cd mp3tag root@colinbsd2:/home/colin# wine Mp3tag.exe (In the gui) Select iPod_Control/Music Subdir F5 (refresh), select file Alt+1

iPod on FreeBSD

[colin@superBSD] /usr/home/colin# mkdir -p /mnt/ipod [colin@superBSD] /usr/home/colin# mount -t msdosfs -o large /dev/da0s1 /mnt/ipod [colin@superBSD] /usr/home/colin# pkg install gtkpod Edit -> Repository Options -> Add New iPod (top right) point it at /mnt/ipod Hit OK Hit Load iPod (top left)