Skip to content

Instantly share code, notes, and snippets.

View eightbitraptor's full-sized avatar

Matt Valentine-House eightbitraptor

View GitHub Profile
# Autocomplete the list of authors configured in your Git Pair authors list
PAIRS=( $(git pair authors 2>&1 | awk '{print $NF}' | sed -e 's/authors//' | xargs echo -n) )
unset PAIRS[0]
complete -o default -W "${PAIRS[*]}" git pair

Keybase proof

I hereby claim:

  • I am eightbitraptor on github.
  • I am eightbitraptor (https://keybase.io/eightbitraptor) on keybase.
  • I have a public key whose fingerprint is 9A48 263E E8D0 8995 9732 3C63 4EA7 1D48 A84F 23DD

To claim this, I am signing this object:

@eightbitraptor
eightbitraptor / build.gradle
Created April 24, 2014 20:52
Build.gradle for Rubolectric integration
buildscript {
repositories {
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.novoda.gradle:robolectric-plugin:0.0.1-SNAPSHOT'
}
}
;; This is a bugfix to tell Magit to stop using the default system emacs client and instead use the Homebrew one
;; This stops a completely new frame opening up when we try and commit
(set-variable 'magit-emacsclient-executable "/usr/local/opt/emacs/bin/emacsclient")
@eightbitraptor
eightbitraptor / main.rs
Created June 19, 2014 21:54
I don't understand how linking works I think
#![link_args = "-lkyotocabinet"]
extern crate libc;
use libc::types;
extern {
fn kctime() -> libc::c_double;
}
#[test]
fn main() {
for number in range(1,101) {
let output = match number {
x if x % 5 == 0 && x % 3 == 0 => { "FizzBuzz".to_str() }
x if x % 5 == 0 => { "Buzz".to_str() }
x if x % 3 == 0 => { "Fizz".to_str() }
x @ _ => { x.to_str() }
};
fn last_but_one(list: Vec<int>) -> Option<int> {
println!("{}", list.reverse());
match list.is_empty() {
true => { None }
false => { list.reverse().get(1) }
};
}
#[test]
fn last_but_one(list: &Vec<int>) -> int {
// create a mutable copy of list
let mut mylist = list;
// reverse mylist in place
mylist.reverse();
// get a reference to the second element and return it
let second: &int = mylist.get(1);
================================================================================
Error executing action `install` on resource 'td-agent_gem[gelf]'
================================================================================
NoMethodError
-------------
undefined method `clear_sources' for Chef::Resource::TdAgentGem
Resource Declaration:
---------------------