Archive for the ‘Nothing’ Category

August 17, 2011 0

Tweeting from a Django Application

By in Fun, Nothing, SysAdmin

It’s easy to get your application to start setting twitter status updates in django. Create a twitter account twitter.com Create a twitter “application’ and get your keys dev.twitter.com/apps Click on “settings” and set the access to read and write easy_install python-twitter Use this template Whenever you save a “Post” object, the def send_tweet method will [...]

Tags: ,

August 9, 2011 0

Using Javascript/Jquery Regex with match groups

By in Nothing, SysAdmin

I’m building custom syntax/markup for an editor I am building. The particular markup would look something like this: %[--- This is part of the /etc/apache2/sites-available/example.com ---]% And I want to turn it into <div class="filerule">This is part of the /etc/apache2/sites-available/example.com</div> So first I need to match: %[--- This is part of the /etc/apache2/sites-available/example.com ---]% And [...]

July 19, 2011 0

Empty Words Bingo

By in Fun, Nothing

A few months ago I created Empty Words so people can track the absurd things they hear in their everyday life.  I’ve decided to add a new feature inspired by buzzword bingo:   Bingo cards are generated off the phrases entered into the Empty Words website, play with your co-workers!, play with your boss! (well, [...]

May 27, 2011 0

Useful crap and things I can never remember.

By in Nothing, SysAdmin

How to get random hex values (color values) in python: rand_color = “#” + str(random.randint(0, 16777215)) Creating a database user and giving them full rights to a database: GRANT ALL PRIVILEGES ON db_name.* TO ‘db_user’@'localhost’ IDENTIFIED BY ‘the_password!’ WITH GRANT OPTION;

April 18, 2011 1

Banners.

By in Fun, Nothing, SysAdmin

I’ve always put ascii art in the motd of my servers, and I think im going to keep track of them now. ,dPYb, IP’`Yb I8 8I I8 8′ ,ggg, ,gggg, I8 dPgg, ,ggggg, i8″ “8i dP” “Yb I8dP” “8I dP” “Y8ggg I8, ,8I i8′ I8P I8 i8′ ,8I `YbadP’ ,d8,_ _,d8 I8,,d8, ,d8′ 888P”Y888P”"Y8888PP88P `Y8P”Y8888P” [...]