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 DataAPI | |
class Application < ActiveRecord::Base | |
# Validations ... | |
attr_accessible :name, :domain, :description | |
has_many :rooms, dependent: :destroy | |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 François Vaux <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
#!/bin/bash | |
[ -z "$channel" ] && channel="#bobot" | |
[ -z "$server" ] && server="irc.freenode.net" | |
[ -z "$port" ] && port="6667" | |
[ -z "$user" ] && user=$USER | |
function irc_session () { | |
# Login phase | |
echo "USER $user 0 * :$user" | |
echo "NICK $user" |
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
#!/bin/bash | |
# A small example program for using the new getopt(1) program. | |
# This program will only work with bash(1) | |
# An similar program using the tcsh(1) script language can be found | |
# as parse.tcsh | |
# Example input and output (from the bash prompt): | |
# ./parse.bash -a par1 'another arg' --c-long 'wow!*\?' -cmore -b " very long " | |
# Option a |
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
source 'https://rubygems.org/' | |
gem "rake" | |
gem "haml" | |
gem "redcarpet" | |
gem "albino" | |
group :development do | |
gem "sass" | |
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
#!/bin/bash | |
DNS="$(cat /etc/resolv.conf)" | |
cp -f /etc/resolv.conf.head /etc/resolv.conf | |
echo "$DNS" >> /etc/resolv.conf |
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
inotifywait -qm -e CLOSE_WRITE file.haml | while read ev; do | |
haml file.haml file.html | |
done | |
# use -r on inotifywait to watch directories recursively |
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
" Put this in .vim/bundle/master-window/plugin/ if you are using Pathogen | |
" Figure out a way to get this loaded if you aren't | |
if exists("master_window_loaded") | |
finish | |
endif | |
let master_window_loaded = 1 | |
function! FocusMasterWindow() | |
exe "1wincmd w" |
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
" Block/Line selection with mouse | |
noremap <M-LeftMouse> <4-LeftMouse> | |
inoremap <M-LeftMouse> <4-LeftMouse> | |
onoremap <M-LeftMouse> <C-C><4-LeftMouse> | |
noremap <M-LeftDrag> <LeftDrag> | |
inoremap <M-LeftDrag> <LeftDrag> | |
onoremap <M-LeftDrag> <C-C><LeftDrag> | |
noremap <S-LeftMouse> <3-LeftMouse> | |
inoremap <S-LeftMouse> <3-LeftMouse> |
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
pidenv() { | |
local pid="$1" | |
tr '\000' '\n' < /proc/$pid/environ | |
} |