Skip to content

Instantly share code, notes, and snippets.

View kuno's full-sized avatar

kuno kuno

View GitHub Profile
@kuno
kuno / PKGBUILD
Created November 8, 2010 06:47
Make font-manager working with python2.7
# 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')
# 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 November 28, 2010 02:12
python-couchdb 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 November 28, 2010 02:22
PKGBUILD for desktopcouch
# 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 January 1, 2011 05:38
python-fabric 0.9.3 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 January 20, 2011 07:34
new compareVersion method
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;

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:

#
# /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 April 17, 2011 10:42
nodejs based on official arch v8 package
# 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 April 26, 2011 04:09
alternative couchdb python driver
# 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)