Skip to content

Instantly share code, notes, and snippets.

View codyjroberts's full-sized avatar
🧀

Cody Roberts codyjroberts

🧀
View GitHub Profile

Keybase proof

I hereby claim:

  • I am codyjroberts on github.
  • I am codyjroberts (https://keybase.io/codyjroberts) on keybase.
  • I have a public key ASAkw9FmuCcGi_q2P0EvPTUyB5OxaIugsbK26oWSu8O4_go

To claim this, I am signing this object:

@codyjroberts
codyjroberts / .iex.exs
Created December 15, 2016 17:52
IEx Test Helper
defmodule TestHelper do
@moduledoc """
Reloads files and run's ExUnit tests in current directory
Note: Use of this helper may cause issues with state from
previous runs. A possible solution to this may lie in
spawn/1, Task, or IEx.Helpers.respawn/1
"""
def run_tests do
Code.unload_files(Code.loaded_files)
import sys
import csv
import json
reader = csv.DictReader(sys.stdin, fieldnames=sys.argv[1:])
print json.dumps( [ row for row in reader ] )
#!/bin/sh
sudo apt-get update
yes | sudo apt-get install software-properties-common python-dev python-pip python3-dev python3-pip curl git
yes | sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
yes | sudo apt-get install neovim
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@codyjroberts
codyjroberts / init.vim
Last active June 5, 2017 12:38
Example nvim config
" Bundles
call plug#begin('~/.config/nvim/pluggable')
Plug 'unblevable/quick-scope'
Plug 'Lokaltog/vim-easymotion'
Plug 'itchyny/lightline.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround'

Keybase proof

I hereby claim:

  • I am codyjroberts on github.
  • I am codyjroberts (https://keybase.io/codyjroberts) on keybase.
  • I have a public key ASCri7OX48CtLTu8ss4ZIv6GCjQwtNMTpx76R1QutoELNAo

To claim this, I am signing this object:

@codyjroberts
codyjroberts / seoul256.zsh-theme
Created August 17, 2016 17:37
nicolauj and seoul256 inspired zsh-theme
#!/usr/bin/env zsh
# ------------------------------------------------------------------------------
# Prompt for the Zsh shell:
# * One line.
# * VCS info on the right prompt.
# * Only shows the path on the left prompt by default.
# * Crops the path to a defined length and only shows the path relative to
# the current VCS repository root.
# * Wears a different color wether the last command succeeded/failed.
# * Shows user@hostname if connected through SSH.
@codyjroberts
codyjroberts / postgresdefaultutf8
Created May 19, 2015 21:12
Make postgres default to UTF8
source: https://coderwall.com/p/j-_mia/make-postgres-default-to-utf8
UPDATE pg_database SET datistemplate=FALSE WHERE datname='template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH owner=postgres template=template0 encoding='UTF8';
UPDATE pg_database SET datistemplate=TRUE WHERE datname='template1';
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/syntastic'
# Use backtick as the prefix
# Do it just like this or you will not
# be able to use type backtick literally
unbind C-b
set -g prefix `
bind ` send-prefix
bind-key L last-window
set -g default-terminal "xterm-256color"