Skip to content

Instantly share code, notes, and snippets.

@kuno
kuno / PKGBUILD
Created Nov 8, 2010
Make font-manager working with python2.7
View PKGBUILD
# Contributor: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>
# Contributor: Guan 'kuno' Qing <neokuno AT gmail DOT com>
pkgname=font-manager
pkgver=0.5.6
pkgrel=1
pkgdesc="A font management application for the GNOME desktop"
url="http://code.google.com/p/font-manager/"
arch=('i686' 'x86_64')
license=('GPL')
View PKGBUILD
# Maintainer: James Campos <james.r.campos@gmail.com>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
# Contributor: TIanyi Cui <tianyicui@gmail.com>
pkgname=nodejs
pkgver=0.3.1
pkgrel=1
pkgdesc="Evented I/O for V8 javascript"
arch=('i686' 'x86_64')
@kuno
kuno / PKGBUILD
Created Nov 28, 2010
python-couchdb PKGBUILD
View PKGBUILD
# Contributor: Byron Clark <byron@theclarkfamily.name>
# Contributor: Guan 'kuno' Qing <neokuno AT gmail DOT com>
pkgname=python-couchdb
pkgver=0.8
pkgrel=2
pkgdesc="Python library for working with CouchDB"
url="http://code.google.com/p/couchdb-python/"
license=('BSD')
arch=(any)
@kuno
kuno / PKGBUILD
Created Nov 28, 2010
PKGBUILD for desktopcouch
View PKGBUILD
# Contributor: Roberto Alsina <ralsina@kde.org>
# Contributor: Guan 'kunp' Qing <neokuno AT gmail DOT com>
pkgname=desktopcouch
pkgver=0.6.8
pkgrel=4
pkgdesc="A desktop implementation of couchdb"
arch=('any')
url="https://launchpad.net/desktopcouch"
license=('LGPL')
@kuno
kuno / PKGBUILD
Created Jan 1, 2011
python-fabric 0.9.3 PKGBUILD
View PKGBUILD
# Maintainer: James Pearson <james.m.pearson+arch@gmail.com>
pkgname=python-fabric
pkgver=0.9.3
pkgrel=1
pkgdesc="A Python library and command-line tool designed to streamline deploying applications or performing system administration tasks via the SSH protocol."
url="http://fabfile.org/"
license=('BSD')
arch=('any')
depends=('pycrypto' 'python2>=2.7' 'python-paramiko')
@kuno
kuno / exports.compareVersion
Created Jan 20, 2011
new compareVersion method
View exports.compareVersion
var notSmaller, arrayA = versionA.split('-'), arrayB = versionB.split('-'),
minorA, minorB, mainA = arrayA[0].split('.'), mainB = arrayB[0].split('.'),
len = (mainA.length <= mainB.length) ? mainA.length : mainB.length;
for (var i = 0; i < len; ++i) {
if (parseInt(mainA[i], 10) < parseInt(mainB[i], 10)) {
notSmaller = -1;
break;
} else if (parseInt(mainA[i], 10) > parseInt(mainB[i], 10)) {
notSmaller = 1;
View readline.md

Readline

To use this module, do require('readline').

rl.createInterface(input, output, completer)

Takes two streams and creates a readline interface. The completer function is used for autocompletion. When given a substring, it returns [substr, completedStr]. TODO: write some code to make sure I'm right.

createInterface is commonly used with process.stdin and process.stdout in order to accept user input:

View pacman.conf
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
@kuno
kuno / PKGBUILD
Created Apr 17, 2011
nodejs based on official arch v8 package
View PKGBUILD
# Maintainer: James Campos <james.r.campos@gmail.com>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
# Contributor: Dongsheng Cai <dongsheng at moodle dot com>
# Contributor: Masutu Subric <masutu.arch at googlemail dot com>
# Contributor: TIanyi Cui <tianyicui@gmail.com>
pkgname=nodejs
pkgver=0.4.6
pkgrel=2
pkgdesc="Evented I/O for V8 javascript"
@kuno
kuno / PKGBUILD
Created Apr 26, 2011
alternative couchdb python driver
View PKGBUILD
# Maintainer: Guan 'kuno' Qing <neokuno AT gmail DOT com>
pkgname=python2-couchdb-hg
_realname=couchdb-python
pkgver=20110426
pkgrel=1
pkgdesc="Python library for working with CouchDB, hg version."
url="http://code.google.com/p/couchdb-python/"
license=('BSD')
arch=(any)