Skip to content

Instantly share code, notes, and snippets.

View richo's full-sized avatar

richö butts richo

View GitHub Profile
(ns vennme.web
(:use noir.core)
; (:use com.googlecode.charts4j)
(:require [noir.server :as server])
(:require [noir.response :as resp])
(:require [vennme.views :as views])
(:require [vennme.google-charts :as google-charts])
(:require [vennme.native-charts :as native-charts]))
function getcertnames() {
if [ -z "${1}" ]; then
echo "ERROR: No domain specified."
return 1
fi
local domain="${1}"
echo "Testing ${domain}…"
echo # newline
#
# Olimex ARM-USB-TINY-H
#
# http://www.olimex.com/dev/arm-usb-tiny-h.html
#
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x002a
nodes = [i for i in xrange(15)]
all_but_last = "btuts"
last = None
for i in reversed(nodes):
if last = None:
last = i
continue
class Foo(object):
def method(self, foo):
def _(n):
print repr(self)
print repr(n)
return _
foo = Foo()
foo.thing = foo.method("butts")
class Foo(object):
def method(self, foo):
def _(n):
print repr(self)
print repr(n)
return _
class Butts(object):
def __getattr__(self, n):
return self.__getattribute__("_" + n)
class Foo(object):
def method(self, foo):
def _(n):
print repr(self)
print repr(n)
return _
class Butts(object):
def __getattr__(self, n):
return self.__getattribute__("_" + n)
@richo
richo / chruby-ruby.rb
Created April 17, 2013 12:32
chruby with shell-proxy
$: << "/Users/richo/code/ext/shell-proxy/lib"
require 'shell-proxy'
UNDERSCORE_VM_VERSION = "0.0.0"
class Manager
def initialize(name)
@name = name
end
function _php() {
case "$1" in
-h|--help)
echo "usage: _php [version] [opts]"
;;
-v|--version)
echo "_php version 0.0.0"
;;
system)
_php_reset
elekt 1 ⚡ __php_LIST=~/.php/versions/*
elektra ⚡ emulate sh -c "`ruby ~/code/ext/_vm/_php`"
elektra ⚡ _php
5.4.10
elektra ⚡ php -v
PHP 5.3.23 (cli) (built: Apr 4 2013 16:11:07)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
elektra ⚡ _php 5.4.10
elektra ⚡ php -v