Skip to content

Instantly share code, notes, and snippets.

View leahneukirchen's full-sized avatar

Leah Neukirchen leahneukirchen

View GitHub Profile
### Keybase proof
I hereby claim:
* I am leahneukirchen on github.
* I am chneukirchen (https://keybase.io/chneukirchen) on keybase.
* I have a public key whose fingerprint is 236C 8EF1 0467 D25A FC3B 77B6 654D F0D9 BC1B 04C8
To claim this, I am signing this object:
#compdef xbps-checkvers xbps-create xbps-dgraph xbps-install xbps-pkgdb xbps-query xbps-reconfigure xbps-remove xbps-rindex xbps-uchroot xbps-uhelper
_xbps_common=(
{-C,--config=-}'[Full path to configuration file]:config file:_files'
{-d,--debug}'[Debug mode shown to stderr]'
{-h,--help}'[Print help usage]'
{-n,--dry-run}'[Dry-run mode]'
{-r,--rootdir=-}'[Full path to rootdir]:root dir:_files -/'
{-v,--verbose}'[Verbose messages]'
{-V,--version}'[Show XBPS version]'

Keybase proof

I hereby claim:

  • I am chneukirchen on github.
  • I am chneukirchen (https://keybase.io/chneukirchen) on keybase.
  • I have a public key whose fingerprint is 236C 8EF1 0467 D25A FC3B 77B6 654D F0D9 BC1B 04C8

To claim this, I am signing this object:

#!/bin/sh
# ruby-wrapper - a tiny Ruby selector that sets up meaningful paths
#
# Written by Christian Neukirchen <purl.org/net/chneukirchen>, 2010.
# To the extent possible under law, the creator of this work has waived
# all copyright and related or neighboring rights to this work.
# http://creativecommons.org/publicdomain/zero/1.0/
#
# This script is meant to be installed as "ruby" in your path.
# It also should work with dash. You should adjust DEFAULT_RUBY.
THIS DOCUMENT MOVED TO http://chneukirchen.github.com/rps/
AND http://github.com/chneukirchen/rps
= Ruby Packaging Standard
The aim of this document is two-fold. First, to specify a common
structure of how a Ruby package distributed as source (that is, but
not limited to, development directories, version-controlled
repositories, .tar.gz, Gems, ...) should conform to.
require 'net/http'
require 'rack'
# todo
# - detect ssl
# - keepalive?
module Rack
class Forwarder
def initialize(host, port=80)
@leahneukirchen
leahneukirchen / twicl
Created November 9, 2008 12:52
twicl, a twitter command line client
#!/usr/bin/env ruby
# -*- ruby -*-
# twitter command line client
# That's What I Call Lame
# 09nov2008 +chris+
require 'json'
require 'open-uri'
@leahneukirchen
leahneukirchen / gcalc
Created August 26, 2008 14:02
Command line tools for google
#!/usr/bin/env ruby
# gcalc <google calculator string> / 26aug2008 chneukirchen / public domain
require 'open-uri'
q = ARGV.join(" ").gsub(/./m) { "%%%02X" % $&[0] }
html = open("http://www.google.com/search?q=#{q}").read
puts (html[%r{<font size=\+1><b>(.*?)</b></h2>}, 1] || 'not a calculation').
gsub(%r{\240|<font size=-2> </font>}, "").gsub("×", "x").
gsub(%r{<sup>(.*?)</sup>}, '^\\1 ')