This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def write_utf8_char(fd, char): | |
fd.write(unichr(char).encode("utf-8")) | |
def read_utf8_char(fd): | |
''' | |
>>> import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="http://downloads.sourceforge.net/project/linuxwacom/xf86-input-wacom/input-wacom/input-wacom-0.20.0.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flinuxwacom%2Ffiles%2Fxf86-input-wacom%2Finput-wacom%2F&ts=`date +%s`&use_mirror=freefr" | |
WORKDIR="/tmp/wacom" | |
TARFILE="$WORKDIR/wacom.tar.bz2" | |
SRCDIR="$WORKDIR/input-wacom-*" | |
SCRIPT=`readlink -e $0` | |
NAME=`basename $SCRIPT` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class attribute(object): | |
""" ``attribute`` decorator is intended to promote a | |
function call to object attribute. This means the | |
function is called once and replaced with | |
returned value. | |
>>> class A: | |
... def __init__(self): | |
... self.counter = 0 | |
... @attribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>Example</title> | |
<script src="uajax.js"></script> | |
</head> | |
<body> | |
<nav> | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import lxml, lxml.etree as etree | |
import collections | |
import urllib2 | |
import pprint | |
import logging | |
import cPickle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tar -czf haxe.`haxe -version 2>&1`.tgz /usr/lib/haxe \ | |
/usr/lib/neko \ | |
/usr/lib/libneko.so \ | |
/usr/bin/neko \ | |
/usr/bin/nekoc \ | |
/usr/bin/nekotools \ | |
/usr/bin/haxe \ | |
/usr/bin/haxedoc \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Damn simple hex parser, with utf8 convenience functions */ | |
var utf8={ | |
decode: function(s){ | |
return decodeURIComponent(escape(s)); | |
}, | |
encode: function(s){ | |
return unescape(encodeURIComponent(s)); | |
} | |
}, | |
hex={ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
CONTROL_AUTO = 0x04 | |
CONTROL_MANUAL = 0x14 | |
FAN_MAX = 0x00 | |
FAN_MIN = 0xFF | |
READY_TO_WRITE = 0x02 | |
READY_TO_READ = 0x01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
''' | |
==== NOTES ==== | |
``` | |
3820TG LAYOUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Usage create_venv.sh MYENV | |
# | |
# As Ubuntu guys loves patch things they shouldn't and break everything, | |
# python3 developers using their awful distro must to follow the | |
# following steps in order to use venv instead of simply executing | |
# 'python -m venv env'. | |
# | |
# Thanks, Canonical QA team deserves a big shiny medal. |
OlderNewer