This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[filter "hawser"] | |
clean = git hawser clean %f | |
smudge = git hawser smudge %f | |
required = true | |
[color] | |
ui = auto | |
[user] | |
name = Gary Haran | |
email = [email protected] | |
[mergetool "Kaleidoscope"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This can happen when active directory or someone else installed postgresql without proper right like a sudo brew install postgres instead of a brew install postgres. | |
To fix you can entirely destroy the db and recreate it with your user: | |
rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -E utf8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'railties' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp pcb ~/bin/ # where bin is in your $PATH | |
chmod +x ~/bin/pcb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Of course this can be edited to run whatever you want instead of spring and rspec | |
map <leader>l :w\|:silent exe "! echo \"spring rspec " . "%" . ":" . line('.') . "\" > test-commands"<cr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
# SETUP: | |
# (assumes ~/bin/ is in your path) | |
# cp colorize.rb ~/bin/colorize | |
# chmod +x ~/bin/colorize | |
# USAGE: | |
# tail -f log/development.log | colorize | |
class String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# | |
# I realized objects were hard to grasp | |
# You already understood the building blocks of programs(String, Fixnumb, Array, Hash) | |
# | |
# Look at the following to see what you can learn: | |
s1 = 'String is an object' | |
s2 = String.new('String is an object') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " no more legacy | |
set laststatus=2 " show status lines 2 lines up so I see it | |
" Vundle specifics | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
" Bundle 'less.vim' | |
Bundle 'groenewege/vim-less' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "awesome_print" | |
Pry.print = proc { |output, value| output.puts value.ai } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# thanks to cmer for this | |
if Rails.env.development? | |
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def call_with_quiet_assets(env) | |
previous_level = Rails.logger.level | |
Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/assets/") == 0 | |
call_without_quiet_assets(env).tap do | |
Rails.logger.level = previous_level | |
end |