-
Recent Posts
Recent Comments
- Flashpaqdjs on Handy One-Liners
- Wirelessscm on Handy One-Liners
- Pwnall1337 on cPanel Exim and Perl’s Net::SMTP::TLS
Archives
Categories
Blogroll
Author Archives: tonyb
Handy One-Liners
Show all MySQL Users’ GRANTS: Bash | copy code |?12# oIFS="$IFS"; export IFS=$’\n’; for i in $(mysql –skip-column-names –batch -e "SELECT user,host FROM mysql.user"); do USER=$(echo $i|awk ‘{printf $1}’); HOST=$(echo $i|awk ‘{printf $2}’); mysql –skip-column-names –batch -e "SHOW GRANTS FOR ‘$USER’@’$HOST’"; done; export IFS="$oIFS";3
Posted in Uncategorized
2 Comments
YtChannelRss: Generating RSS Feeds from YouTube Channels
My favorite internet video publisher, RoosterTeeth (and their sister Achievement Hunter) recently launched a new YouTube channel, LetsPlay, dedicated to their LetsPlay series of videos. Unfortunately, I quickly got behind on the videos, and wanted to catch up. Having 80 … Continue reading
Posted in Uncategorized
Leave a comment
Django SyncDB and Perl Expect
I’m writing a database migration script in Perl to upgrade to a new database schema. This script often calls Django’s manage.py ‘syncdb’ function to rebuild from the new models. However, there’s one problem with this. Each time it runs, it … Continue reading
Posted in Uncategorized
Leave a comment
jQuery ajaxForm Tip
I recently added a jQuery ajaxForm (which submits a form’s contents and returns the data in an ajax call instead of a page load) and I had problems getting it running. It kept throwing errors, and they didn’t seem to … Continue reading
Posted in Uncategorized
Leave a comment
Multiple GPUs Not Showing Up in CUDA
We recently upgraded our server, adding 6 Tesla GPUs to our existing 580 GTX. However, once we had them installed, we noticed some issues, namely, they weren’t fully being recognized. 12$ deviceQuery –noprompt | grep "^Device"3Device 0: "GeForce GTX 580"4 … Continue reading
Posted in Uncategorized
Leave a comment
Fibonacci vs. Kilometers
This experiment was based on this Reddit posting: http://www.reddit.com/r/fifthworldproblems/comments/s0217/i_can_only_speak_in_a_recurring_meter_the/c4a4c18 Here’s a brief excerpt that sums up the point of this experiment: Cool fact: The Fibonacci sequence fairly accurately converts miles to kilometers. For each number in the sequence that represents … Continue reading
Posted in Uncategorized
Leave a comment
cPanel Exim and Perl’s Net::SMTP::TLS
Another update: I have previously filed a bug on CPAN for this, and there are several similar posted there as well. https://rt.cpan.org/Ticket/Display.html?id=81215 UPDATE: This was a bug in Net::SMTP::TLS. I’ve included a patch below and also sending this along to the … Continue reading
Posted in Uncategorized
1 Comment
SVN Vimdiff
Having recently learned how to use vimdiff, I was looking for a way to incorporate this into SVN for comparing SVN changes against my working copies using vimdiff. I found this script, originally from http://www.vim.org/scripts/script.php?script_id=1797, that performs this this beautifully. … Continue reading
Posted in Linux Tricks
Leave a comment
C++ and Timezones
Have you ever had to work with date / times in c / c++ and had to deal with that F###ing Daylight Savings Time? Even more, have you spent hours, days, weeks trying to force everything to UTC / GMT … Continue reading
Posted in Linux Tricks
Leave a comment
Using Fetchmail To Backup Email
If you’re like me, you’ll occasionally lose sleep over paranoid thoughts; Did I turn the coffee pot off? Did I lock the door? What would happen if GMail lost all of my emails tonight? Well, technology has helped solve my … Continue reading
Posted in Linux Tricks
Leave a comment