Category Archives: Python

Python decorator to argument checking

I am sure there is billions or more people who already done that but I needed this quickly for my project and was not feeling googling around :

Posted in Programming, Python | Leave a comment

Get Facebook albums with python

Since I haven’t see much script like this around the web here is a quick script to suck bunch of albums from facebooks (your own) nothing fancy just something to get you started with pyfacebook. #!/usr/bin/python import os import urllib … Continue reading

Posted in Python | 2 Comments

Twitter notification of replies by Email

I don’t check very often my twitter to know when someone replies and I find it hard to figure out what’s going on when i check a couple of days after even using a client showing only the reply (my … Continue reading

Posted in Python | Leave a comment

XMPP notification for irssi running in a screen on a remote host

Like a lot of people I have my irssi on a server in a screen. This has been working great so far but my only concerns are the notifications on the desktop when something happening. Over the time I have … Continue reading

Posted in Linux, Misc, Python | 1 Comment

Accessing to Rackspace Cloud Files via servicenet (update)

Last week I have posted an article explaining how to connect to Rackspace Cloud Files via Rackspace ServiceNET but I actually got it wrong as pointed by my great colleague exlt so I had to take it down until figured … Continue reading

Posted in Programming, Python, Rackspace | 2 Comments

How to connect to Rackspace Cloud Files via ServiceNET

If you are a Rackspace customer and you are are planning to use Rackspace Cloud Files via it’s internal network (ServiceNet) so you don’t get billed for the bandwidth going over Cloud Files this is how you can do. The first thing is … Continue reading

Posted in Programming, Python, Rackspace | 4 Comments

python syntax warning in emacs

One of the best feature to have with Emacs when doing python development is to have a real time syntax error/warning check highlighted in your code to avoid many errors or superfluous code. This code is taken from the brillant … Continue reading

Posted in Emacs, Python | Leave a comment

Yum Force Exclude List

While talking with my fellow colleague Darren Birkett about what seems a design limitation of yum to not be able to force listing the excludes from yum. I had a shoot to make a yum plugin to force listing the … Continue reading

Posted in Programming, Python, RedHat | 6 Comments

Generating md5 encrypted password for chpasswd

If you want to generate properly encrypted password to feed to chpasswd, the most easier and proper way is to do that from command line : [code lang="bash"] echo "encryptedpassword"|openssl passwd -1 -stdin [/code] If you want to generate in … Continue reading

Posted in Programming, Python, Scripts, Solaris, Travel | 3 Comments

Cheetah Mode for Emacs

Here is a simple html derived mode for Cheetah templates files. The font-locking regexp can be improved thought but that’s a start. (define-derived-mode cheetah-mode html-mode "Cheetah" (make-face ‘cheetah-variable-face) (font-lock-add-keywords nil ‘( ("\\(#\\(from\\|else\\|include\\|set\\|import\\|for\\|if\\|end\\)+\\)\\>" 1 font-lock-type-face) ("\\(#\\(from\\|for\\|end\\)\\).*\\<\\(for\\|import\\|if\\|in\\)\\>" 3 font-lock-type-face) ("\\(\\$\\(?:\\sw\\|}\\|{\\|\\s_\\)+\\)" 1 font-lock-variable-name-face)) … Continue reading

Posted in Emacs, Python | 1 Comment