Skip to content

Instantly share code, notes, and snippets.

View ahawthorne's full-sized avatar

Andrew Hawthorne ahawthorne

View GitHub Profile
@ahawthorne
ahawthorne / gist:40672b6f3106ebf71549
Last active November 4, 2015 16:48
rbenv install
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
export RBENV_PLUGINS="$HOME/.rbenv/plugins"
git clone git://github.com/sstephenson/rbenv-vars.git ${RBENV_PLUGINS}/rbenv-vars
git clone git://github.com/sstephenson/ruby-build.git ${RBENV_PLUGINS}/ruby-build
git clone git://github.com/sstephenson/rbenv-default-gems.git ${RBENV_PLUGINS}/rbenv-default-gems
git clone git://github.com/fesplugas/rbenv-installer.git ${RBENV_PLUGINS}/rbenv-installer
@ahawthorne
ahawthorne / php-opcache.ini
Created June 10, 2015 01:59
php 5.5 opcache
[opcache]
; Determines if Zend OPCache is enabled
;opcache.enable=0
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=0
opcache.enable_cli=1
; The OPcache shared memory storage size.
def renderActionInOtherController(controller,action,params)
c = controller.new
c.params = params
c.dispatch(action, request)
c.response.body
end
@ahawthorne
ahawthorne / fix_hash.vim
Last active September 28, 2015 21:26
Vim command to fix ruby hashes. Make them in 1.9 format
function! s:FixHash(line1,line2)
let l:save_cursor = getpos(".")
silent! execute ':' . a:line1 . ',' . a:line2 . 's/\%(''\|:\)\([a-zA-Z0-9_]\+\)\%(\s*=>\|''\s*=>\|'':\)/\1:/g'
call setpos('.', l:save_cursor)
endfunction
command! -range=% FixHash call <SID>FixHash(<line1>,<line2>)
@ahawthorne
ahawthorne / 20-intel.conf
Created January 12, 2016 22:56
xorg config to fix rendering issues in chrome
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "glamor"
Option "DRI" "3"
Option "TearFree" "true"
Option "SwapbuffersWait" "true"
EndSection