Archive for the ‘Uncategorized’ Category

Python: Make simplejson.dumps output raw Javascript code 0

class JSRaw(int): “”"Hack to allow including raw Javascript code in simplejson.dumps output. Objects of this sort are dumped as raw strings. “”" def __new__(self, string): instance = int.__new__(self, 0) instance.string = string return instance def __repr__(self): return self.string def __unicode__(self): return self.string def __str__(self): return self.string Example: s = jsondumps({ ‘series’: data, ‘yAxis’: { ‘labels’: [...]

Storing times in UTC in Django 0

I just want to store my time values in UTC, and render them in Europe/Berlin for display, as supposedly one should, and Django, in 2011 and with 1.4 looming, still does not support this (although things may be happening). I’ve found that the simplest way to deal with this is to use a filter which [...]

What I learned 0

Gnome 3 is actually quite nice, I think I prefer it over Unity. Only if it weren’t so buggy. And had better multihead support. Unity has some pretty nice touches as well. Like the ALT+TAB’ing into a specific window of an app. Even the propriety Catalyst fglrx driver can’t properly drive a 3-head 6400×1440/1200 setup [...]

Ubuntu app indicators when using PyGObject 0

PyGObject and the Python appindicator module don’t agree with each other. As soon as I import “appindicator”, all objects from the gi.repository.Gtk namespaces seem to reset to what might be PyGTK, not sure. However, with gir1.2-appindicator-0.1 (on Natty) installed , you can do: from gi.repository import AppIndicator ind = AppIndicator.Indicator.new( “send-to-kindle”, “indicator-messages”, AppIndicator.IndicatorCategory.APPLICATION_STATUS) self.menu = [...]

Automatically backup Google Reader subscriptions 0

Most of the scripts out there seem to be broken (like gookup). So I’ve written one that works: https://github.com/miracle2k/linuxutils/blob/master/export-google-reader-subscriptions.py It uses Matt Behrens libgreader library for the hard part.

Building Hibiscus 0

Steps to build a custom Hibiscus plugin for Jameica: Checkout the code: The “hibiscus” module from the Hibiscus project, the “jameica” module from the Jameica project: “cvs -z3 -d:pserver:anonymous@cvs.berlios.de:/cvsroot/hibiscus co hibiscus && cvs -z3 -d:pserver:anonymous@cvs.berlios.de:/cvsroot/jameica co jameica”. Within jameica/build run “ant nightly”, which will generate releases/jameica-lib.jar Edit hibiscus/build/build.properties, makedefine.jameica.dir point to the Jameica checkout, relative [...]

Netzwerk-Steckdosen 0

TOUCH n SWITCH – WLAN, 1000W (500W induktiv) per Ausgang, 3200 total; iPhone App, keine offizielle API. Allnet – Einzeldose, ab 70 Euro, 1500W. Infratec PM211-MIP – 4 Dosen, 2 Kanäle Web Power Switch III – 8 Dosen, anscheinend sehr flexibel bez. API, nur $100, aber: US Stecker, und angeblich Laut (mit Lüfter!) Leunig ePowerSwitch [...]

Z-Wave Software 1

Open Source Automation Engine (Code) – Windows Only OpenRemote – Allows designing custom control interfaces for iOS/Android; No Z-Wave support. LinuxMCE – not the prettiest UI, maybe tries to do too much. openAMI (Code) – Python Server, JQTouch Client; looks pretty, but seemingly not under active work. open-zwave – Free Z-Wave library, actively developed. MisterHouse [...]

Installing MacOS X on P7P55D-E, Core i7-870, Radeon HD 8670 0

I mainly followed the iBoot + MultiBeast: Install Mac OS X on any Intel-based PC tutorial. I upgraded the BIOS of the P7P55D-E board to the latest version 1504. This is because I wanted to try the “UserDSDT” Installation method in MultiBeast, and a DSDT exists for this version. Not that I have any idea [...]

Charting Libraries/Components 0

Highcharts (commercial, but source on Github; Javascript Stock-Chart) amCharts (commercial, Stock-Chart Flash only) gRaphaël Google Chart Tools JSCharts (commercial) jqPlot (open source) Emprise JavaScript Charts (commercial)