Skip to content

Instantly share code, notes, and snippets.

View spikegrobstein's full-sized avatar

spike grobstein spikegrobstein

View GitHub Profile
@spikegrobstein
spikegrobstein / tmux.conf
Last active July 22, 2022 15:23
my tmux config (updated for 2.4)
# This requires tmux 2.1. a lot of these settings will error on anything earlier.
# Act like Vim; use h,j,k,l to select panes and move the cursor
set-window-option -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Look good
@spikegrobstein
spikegrobstein / Gemfile
Created June 19, 2013 10:36
example of my concept implementation degrawlixer for teamonetickets. basic
source 'https://rubygems.org'
gem 'rspec'
gem 'pry'
@spikegrobstein
spikegrobstein / gist:6067611
Created July 24, 2013 02:10
how to add a submodule to vim
git submodule add -b master https://github.com/elixir-lang/vim-elixir.git bundle/vim-elixir
@spikegrobstein
spikegrobstein / message_bus.ex
Last active December 20, 2015 03:59
first blush at elixir
defmodule MessageBus do
# call any function that matches the listener
# type is atom (eg: :hello)
# message is string
# listeners is list of tuples of functions
# [ hello: fn(m) -> IO.puts m end, bye: fn(m) -> IO.puts m end, hello: fn(m) -> IO.puts "I will also do this crap" end ]""]
def publish(type, message, listeners) do
_publish(type, message, listeners)
end
defmodule Math do
def pow( num, power ) do
_pow num, power, 1
end
def _pow( num, 0, acc ) do
acc
end
@spikegrobstein
spikegrobstein / inputrc
Created August 25, 2013 15:00
put this in `~/.inputrc` for a good time.
"\e[A": history-search-backward
"\e[B": history-search-forward
$if Bash
Space: magic-space
$endif
"\M-o": "\C-p\C-a\M-f "
set visible-stats on
set show-all-if-ambiguous on
"\M-s": menu-complete
@spikegrobstein
spikegrobstein / mcwrapper.conf
Created August 27, 2013 12:10
Getting mcwrapper working with Docker (docker.io)
# Example configuration for mcwrapper: mcwrapper.conf
# this file can live in any of the following places (in order of priority):
# - the value of MCWRAPPER_CONFIG_PATH env variable
# - the current working directory as "mcwrapper.conf"
# - ~/.mcwrapper.conf
# - /etc/mcwrapper.conf
#
# Configuration is actual Bash. You can use conditionals... not that you would.
. "/root/minecraft/minecraft-docker"
@spikegrobstein
spikegrobstein / gist:8147858
Created December 27, 2013 14:44
vim 7.4 configure options for redhat-based guest machines.
./configure --prefix=$HOME/.local --enable-rubyinterp=yes --with-features=big
@spikegrobstein
spikegrobstein / plex_data_to_graphite.rb
Created May 6, 2014 03:04
graph who is streaming plex to graphite
#! /usr/bin/env ruby
require 'nokogiri'
require 'faraday'
host = 'http://plex.example.com:32400'
uri = '/status/sessions'
f = Faraday.new( host )
@spikegrobstein
spikegrobstein / bittrex.rb
Created May 29, 2014 01:55
quick and dirty bittrex client in ruby that spits market data to graphite
require 'rubygems'
require 'faraday'
require 'oj'
require 'openssl'
require 'base64'
require 'digest/md5'
require 'ostruct'
require 'pry'
API_HOST = 'https://bittrex.com'