Skip to content

Instantly share code, notes, and snippets.

[alias]
st = status
dc = diff --cached
ci = commit
co = checkout
b = branch
dif = diff
lg = log -5
lgp = log --decorate --graph --oneline
[color]
@corporealfunk
corporealfunk / iterm-colors.json
Created June 10, 2026 11:06
iterm-colors.json
{
"Ansi 5 Color" : {
"Green Component" : 0,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527
},
"Tags" : [
],
"Disable Printing" : false,
alias ll='ls -alF'
alias vim='vim -p'
alias stubs-path='export PATH=./bin:$PATH'
alias rspec-de='docker compose exec -e RAILS_ENV=test web ./bin/rspec'
@corporealfunk
corporealfunk / .zshrc
Created June 2, 2026 14:07
oh my zsh rc
ZSH_THEME="robbyrussell"
plugins=(rbenv zsh-vi-mode kubectl git)
" VUNDLE
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin('~/.vimplugins')
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@corporealfunk
corporealfunk / spina_embedded_image_tag_helper.rb
Last active March 11, 2021 21:39
Force SpinaCMS admin panel to not inject the host:port into the urls
# SpinaCMS will inject image URLs into the Trix content with the host:port as part of the URL
# This makes it hard to port that DB content to another host (say move from localhost to a production or staging site)
# load this patch from the config/application.rb like so:https://guides.rubyonrails.org/engines.html#overriding-models-and-controllers
Spina::ImagesHelper.class_eval do
def embedded_image_url(image)
return "" if image.nil?
main_app.polymorphic_path(image.variant(resize: Spina.config.embedded_image_size), only_path: true)
end
end
@corporealfunk
corporealfunk / fix_spork.sh
Created May 7, 2012 17:58
Fix Spork 0.9.0+ permissions problems in system-wide RVM installs
#!/bin/bash
sudo find /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0 -name "*.rb" -exec chmod go+r {} \;
sudo find /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0 -name "spork" -exec chmod g+r {} \;
sudo find /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spork-0.9.0 -type d -exec chmod go+rx {} \;
sudo chmod -R g+rw /usr/local/rvm/gems/ruby-1.9.2-p290/gems
@corporealfunk
corporealfunk / js.rake
Created May 2, 2012 00:22
Rake Task generate JS Routes functions
desc "Generate a JavaScript file that contains your Rails routes"
namespace :js do
task :routes, [:filename] => :environment do |t, args|
filename = args[:filename].blank? ? "rails_routes.js" : args[:filename]
save_path = "#{Rails.root}/app/assets/javascripts/#{filename}"
routes = generate_routes_for_rails_3
javascript = ""
routes.each do |route|
javascript << generate_method(route[:name], route[:path]) + "\n"
@corporealfunk
corporealfunk / .tmux.conf
Last active June 2, 2026 13:58
tmux configuration
unbind C-b
set -g prefix C-a
# resize panes with VIM nav keys
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
# faster tmux escape wait times?
RSpec.configure do |config|
config.filter_run_excluding :remote => true
config.before :each, :remote => true do
# Configure code to hit the Braintree service
end
end
# Include your remote specs within your "normal" specs
describe Sweeper do