Skip to content

Instantly share code, notes, and snippets.

View jrolfs's full-sized avatar

Jamie Rolfs jrolfs

View GitHub Profile
@jrolfs
jrolfs / prompt_jamie_setup
Last active September 29, 2016 12:21
My Frankenstein Zsh Prompt
#
# A theme based on theme based on Steve Losh's Extravagant Prompt with vcs_info integration.
#
# Authors:
# Steve Losh <steve@stevelosh.com>
# Bart Trojanowski <bart@jukie.net>
# Brian Carper <brian@carper.ca>
# steeef <steeef@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
getPostCount: ->
postCount = 0
@postsRegion.currentView.getCollection().each (post) ->
return if post.get('simulating_story')
replyCount = post.get('reply_count') || 0
postCount += 1 + replyCount
@_formatMaxCount(postCount)
@jrolfs
jrolfs / docker-compose.yml
Last active July 3, 2016 01:10
Docker Compose configuration for my Mac Mini 😅
version: '2'
services:
nginx:
container_name: nginx
image: jwilder/nginx-proxy
restart: always
ports:
- 80:80
- 443:443
volumes:
#!/usr/bin/env ruby
require 'find'
require 'fileutils'
require 'pathname'
require 'pry'
require 'active_support/inflector'
Find.find('./models/') do |model_path|
next if FileTest.directory?(model_path) || model_path.match('custom-fields')
call NeoMakeDefaults()
let g:neomake_error_sign = { 'text': "\uF057", 'texthl': 'NeomakeErrorDefault' }
let g:neomake_warning_sign = { 'text': "\uF056", 'texthl': 'NeomakeWarningDefault' }
let g:neomake_informational_sign = { 'text': "\uF05A", 'texthl': 'NeomakeInformationDefault' }
let g:neomake_message_sign = { 'text': "\uF09A", 'texthl': 'NeomakeMessageDefault' }
function! GetColorFromHighlightGroup(group, color, env)
return synIDattr(synIDtrans(hlID(a:group)), a:color, a:env)
endfunction
function! GetBackgroundColors(group)
return
\ ' ctermbg=' . GetColorFromHighlightGroup(a:group, 'bg', 'cterm') .
\ ' guibg=' . GetColorFromHighlightGroup(a:group, 'bg', 'gui')
endfunction
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
var method;
if (['connect', 'disconnect'].indexOf(argv[0]) > -1) {
method = argv[0]
} else {
return console.log('Error: invalid method');
}
@jrolfs
jrolfs / export-stash.sh
Last active February 22, 2016 22:31
Export all stashed Git states to patches
for s in "${(@f)$(git --no-pager stash list)}"; do git stash show -p $(echo $s | awk -F": " '{print $1}') > "$HOME/Desktop/$(echo $s | awk -F": " '{print $2}' | tr ' ' '-').patch"; done

Keybase proof

I hereby claim:

  • I am jrolfs on github.
  • I am jrolfs (https://keybase.io/jrolfs) on keybase.
  • I have a public key whose fingerprint is 91C1 55A7 8968 EEE8 63ED 8B22 626A E770 762A C2F3

To claim this, I am signing this object:

@jrolfs
jrolfs / records.md
Last active December 1, 2015 20:24
Vinyl to buy
  1. Animal Collective – Merriweather Post Pavillion
  2. Beirut – The Flying Club Cup
  3. Beck – Sea Change
  4. Boards of Canada – Music Has the Right to the Children
  5. David Bowie – Ziggy Stardust
  6. Fleet Foxes – Fleet Foxes
  7. Joy Division – Unknown Pleasures