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
.vimrc | |
" Map leader to comma | |
let maplocalleader="," | |
" Toggle this for vim-sexp to not go into insert mode after wrapping something | |
let g:sexp_insert_after_wrap = 0 | |
" Toggle this to disable automatically creating closing brackets and quotes | |
let g:sexp_enable_insert_mode_mappings = 1 | |
Vocab |
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
upsearch () { | |
if test -e "$1"; then | |
echo "$PWD" | |
else | |
if [ "$PWD" = "/" ]; then | |
return 1; | |
else | |
pushd .. > /dev/null | |
upsearch "$1" | |
exit_status=$? |
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
<script type="text/javascript"> | |
var queueBytesLoaded = 0; | |
var queueBytesTotal = 0; | |
var myQueue = null; | |
var queueChangeHandler = function(queue){ | |
// alert('Uploading Started'); | |
myQueue = queue; | |
// console.log("COLLECTION CHANGE!"); | |
var list = document.getElementById('file_todo_list'); |
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
@posts = (params[:title] ? Post.where("UPPER(posts.title) LIKE UPPER(%?%)", parmas[:title]) : Post).paginate(:page => 1, :order => "created_at DESC", :per_page => 20) |
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 'digest/sha1' | |
def suffix(seqnum) | |
o = "" | |
5.times do | |
o << (33 + (seqnum % 93)).chr | |
seqnum /= 93 | |
end | |
return o | |
end |
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
# helpfull for performing actions that require temp directories | |
# 1. handles temp file creation | |
# 2. lets you do your business in da 'block' | |
# 3. cleans up after itself | |
# usage | |
require 'fileutils' | |
include FileUtils | |
temp do |