Skip to content

Instantly share code, notes, and snippets.

View fiee's full-sized avatar

Henning Hraban Ramm fiee

View GitHub Profile
@fiee
fiee / fs.py
Created September 30, 2011 08:00
file system helpers (part of an old toolbox)
#!/bin/env python
# -*- coding: utf-8 -*-
"""
:Author: Henning Hraban Ramm
:Organization: fiëé virtuëlle, www.fiee.net
:Contact: mailto:hraban@fiee.net
:Version: 0.3.6
:Date: 2006-01-24
:Status: beta
:License: same as Python
@fiee
fiee / colors.py
Created November 16, 2010 10:48
Color conversion helpers, see also fiee/fiee-coloree
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def HtmlColorCode_to_strings(value):
"Convert a HTML color code like '#FFCC00' or 'FFCC00' to a list of strings ['FF', 'CC', '00']"
x = 1 * value.startswith('#')
return [value[x:x+2],value[x+2:x+4],value[x+4:x+6]]
def HtmlColorCode_to_ints(value):
"Convert a HTML color code like '#FFCC00' or 'FFCC00' to a list of integers [255, 204, 0]"
@fiee
fiee / site.py
Created October 28, 2010 09:36
site dependency for FeinCMS pages (feincms.modules.page.extensions)
# -*- coding: utf-8 -*-
"""
Extension for FeinCMS Page
"""
from django.conf import settings
from django.db import models
from django.contrib.sites.models import Site
from django.contrib.sites.managers import CurrentSiteManager
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page, PageManager
@fiee
fiee / laenderinfos.sql
Last active July 17, 2023 14:04
table of information about all countries of the world (German names)
CREATE TABLE adressen.land
(
isocode_2 character(2) not null, -- ISO 3166 ALPHA-2
isocode_3 character(3) not null, -- ISO 3166 ALPHA-3
name character varying not null, -- deutscher Name des Landes (international besser via ISO-Code ankoppeln!) // German name of the country
vorwahl integer default null, -- internationale Vorwahl // international phone code
null_bei_vorwahl boolean default FALSE, -- muss man die Null der Ortsvorwahl auch nach der internationalen Vorwahl wählen? // must one dial zero between international and local phone code?
vorwahl_lokal boolean default FALSE, -- muss man vor Ort die Vorwahl wählen? // must one dial the local phone code also locally?
tld character varying default NULL, -- Top Level Domain
kfz character varying default NULL, -- KFZ-Kennzeichen // car code
@fiee
fiee / liedvorlage.ly
Created August 22, 2009 11:48
sample lead sheet in GNU LilyPond
%{
LilyPond-Musterdokument für ein Liederblatt
diverse Anpassungen sind auskommentiert
%}
\version "2.12.0"
#(ly:set-option (quote no-point-and-click))
%#(set-global-staff-size 18)
\header{
@fiee
fiee / fabfile.py
Created July 29, 2009 13:55 — forked from anonymous/gist:156623
fabric fabfile.py for deployment of django apps on Debian servers
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too