Topics: 2012

Interesting ways to display a Python List in String

For objects with string value >>> mylist = [‘spam’, ‘ham’, ‘eggs’] >>> print ‘, ‘.join(mylist) spam, ham, eggs >>> print ‘\n’.join(mylist) spam ham eggs For objects with non-string value >>> print str(mylist).strip(‘[]’) spam, ham, eggs >>> print str(mylist)[1:-1] spam, ham, eggs >>> print ‘, ‘.join(map(str, mylist)) spam, ham, eggs Taken from Decalage

Google Drive Site Publishing with Eric Gilmore

A permanent relative path for files in a folder at Google Drive. Interesting idea :)

Can’t Restart, Shutdown via dbus-send org.freedesktop.ConsoleKit with SLiM

I faced this problem when SLiM no longer support ck-launch-session, and it fail to allow dbus-send to restart, shutdown via org.freedesktop.ConsoleKit. Apparently this is due to access rights as specified in PolicyKit.

org.freedesktop.networkmanager.openvpn was not installed

After installing networkmanager-openvpn in ArchLinux, I managed to add a VPN connection to the NetworkManager. However when I try to connect, I get this naughty little message: org.freedesktop.networkmanager.openvpn was not installed Actually this error message will disappear once you restarted the computer. A quick fix to this is by restarting the NetworkManager through systemd # […]

Openbox failed to logout

Did you noticed your openbox refused to logout recently? If you tried to do it manually by “openbox –exit” or using oblogout, you will not be able to logout and left your openbox session hanging. Through some digging in Google, apparently this was caused by the latest update in pango¬†(v1.32.1-1). You may download the pango […]