Category Archives: Uncategorized

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 | Leave a comment

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 | 3 Comments

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