Skip to content

Instantly share code, notes, and snippets.

View vinbarnes's full-sized avatar

Kevin R. Barnes vinbarnes

View GitHub Profile
@vinbarnes
vinbarnes / README.md
Last active August 29, 2015 14:11 — forked from FokkeZB/README.md
# Task: Implement the rcat utility and get these tests to pass on a system
# which has the UNIX cat command present
# To see Gregory Brown's solution, see http://github.com/elm-city-craftworks/rcat
# Feel free to publicly share your own solutions
rrequire "open3"
working_dir = File.dirname(__FILE__)
gettysburg_file = "#{working_dir}/data/gettysburg.txt"
#!/bin/bash
#
# Blame @gnarmis if this doesn't work
#
# Put this anywhere on your $PATH (~/bin is recommended). Then git will see it
# and you'll be able to do `git recent-branches`.
#
# Show top 5 most recent branches:
# $ git recent-branches | head -n 5
#
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.28627450980392155</real>
<key>Green Component</key>
<real>0.25490196078431371</real>
@vinbarnes
vinbarnes / setup.sql
Last active August 29, 2015 14:19
SQL Antipatterns
CREATE TABLE accounts (
account_id integer NOT NULL primary key,
account_name character varying(20),
first_name character varying(20),
last_name character varying(20),
email character varying(100),
portrait_image bytea,
hourly_rate numeric(9,2)
);
@vinbarnes
vinbarnes / gist:1459efc7b6f5b0faccf6
Created May 19, 2015 14:44
AT&T wireless info on dealing with annoying calls
>>> waiting...
>>> num_active: 1
>>> num_active: 1
>>> num_active: 1
>>> num_active: 1
> exp = {data: [{type: 'conversations', id: 28, attributes: { title: "hi" }}, {type: 'conversations', id: 29, attributes: { title: "bye" }}]}
Object { data: Array[2] }
> act = {data: [{type: 'conversations', id: 29, attributes: { title: "bye" }}, {type: 'conversations', id: 28, attributes: { title: "hi" }}]}
Object { data: Array[2] }
> exp == act
false
> exp === act
false
[barnekr@pibook:~]$ type nt
nt is aliased to `. ~/new_term.sh'
[barnekr@pibook:~]$ cat /Users/barnekr/new_term.sh
#!/bin/sh
#
# Open a new terminal in the cwd
#
CWD=`pwd`
osascript<<END