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 [...]
Archive for the ‘Nothing’ Category
Using Javascript/Jquery Regex with match groups
By Andrew Konkol in Nothing, SysAdminI’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 [...]
Empty Words Bingo
By Andrew Konkol in Fun, NothingA 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, [...]
Useful crap and things I can never remember.
By Andrew Konkol in Nothing, SysAdminHow 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;
Banners.
By Andrew Konkol in Fun, Nothing, SysAdminI’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” [...]