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
$ git branch -r --merged | | |
grep origin | | |
grep -v -e '>' -e master | | |
xargs -L1 | | |
cut -d '/' -f2 | | |
xargs git push origin --delete |
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 "stateful" | |
class Folder < ActiveRecord::Base | |
include Stateful | |
# ... | |
stateful do | |
state :active | |
state :inactive |
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
# /etc/security/limits.conf | |
* soft nofile 999999 | |
* hard nofile 999999 | |
root soft nofile 999999 | |
root hard nofile 999999 | |
=========================================================== | |
# /etc/sysctl.conf | |
# sysctl for maximum tuning |
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
module CouchDBAttachments | |
def attachment(*args) | |
lambda do |env| | |
request = ActionDispatch::Request.new(env) | |
doc = DocWithAttachments.get(request.params[:doc]) | |
serve_attachment(doc, request.params[:path]) | |
end | |
end | |
private |
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
" sessions, backups, temporary files | |
"set backup " Enable creation of backup file. | |
"set backupdir=~/.vim/backups " Where backups will go. | |
set directory=~/.vim/tmp " Where temporary files will go. | |
set viminfo='100,f1 | |
" how long key sequences can take to complete | |
set timeoutlen=250 | |
" color schemes |
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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "* | |
" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/" | |
} | |
function git_prompt { | |
local dirty=$(parse_git_dirty) | |
local branch=$(parse_git_branch) |
NewerOlder