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
fall distance = dx above bolt * 2 + excess rope | |
excess rope = dx you to bolt * 2 | |
fall distance = dx above bolt * 2 + dx you to bolt * 2 | |
dx above bolt = (distance between bolts - dx you to bolt) | |
dx you to bolt = (distance between bolts - dx above bolt) | |
— no reachy | |
dx you to bolt = 0 | |
fall distance = dx above bolt * 2 | |
fall distance = 2 * (distance between bolts - dx you to bolt) |
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
" vimrc.before | |
let mapleader = "," | |
" turn off all the gui crap | |
set guioptions=aAce | |
" nicer auto complete menus | |
set completeopt=longest,menuone |
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/expect | |
spawn python3.2 [lindex $argv 0] | |
expect "mail" | |
send beaufabry@gmail.com\r | |
expect "assword" | |
send ASSSSSSSSS\r | |
interact |
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
module DataSource | |
module ConnectionProxies | |
class TeradataConnectionProxy < ConnectionProxy | |
def initialize(connection) | |
super(connection) | |
connection.class_eval do | |
@connection.class_eval do | |
def columns(*args) | |
binding.pry |
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
(defproject going-native "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:jvm-opts ["-Djava.library.path=/usr/share/java"] | |
:main going-native.core | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[net.java.dev.jna/jna "3.3.0"]]) |
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
(ns going-native.core | |
(:import (com.sun.jna "Native")) | |
(:gen-class)) | |
(gen-interface | |
:name jna.CLibrary | |
:extends [com.sun.jna.Library] | |
:methods [[printf [String] Integer]]) | |
(def glibc (Native/loadLibrary "c" jna.CLibrary)) |
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 ComposedCache | |
def initialize(target) | |
@target = target | |
end | |
def cache(*method_names) | |
method_names.each do |m| | |
original = @target.method(m) | |
results = {} |
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 Memoizer | |
def initialize(tgt) | |
@target = tgt | |
@cache = {} | |
end | |
def cache(*method_names) | |
method_names.each {|name| cache[name] = {} } | |
end |
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
(ns predict-train-delays.twitter | |
(:use | |
[twitter.oauth] | |
[twitter.callbacks] | |
[twitter.callbacks.handlers] | |
[twitter.api.restful]) | |
(:import | |
(twitter.callbacks.protocols SyncSingleCallback))) | |
(def my-creds (make-oauth-creds "nkjAm6lD6tpMwE6UeFw" |
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 | |
#xrdb -merge .Xresources | |
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 15 --height 12 --transparent true --tint 0x000000 & | |
gnome-screensaver & |