What is it?
Cobra is a way to organize your rails application, imagine it like a new way for packaging your rails apps
These are my annotations based on work of @shageman and @benjaminleesmith from Pivotal
#/bin/sh | |
# Adapted from http://mpd.wikia.com/wiki/Hack:di.fm-playlists | |
URL="http://listen.di.fm/public3" | |
token=$1; dir=$2 | |
if [ "$dir" == "" -o "$token" == "" ]; then | |
echo "Usage: $0 TOKEN PATH_TO_SAVE" |
#!/bin/bash | |
while read pid; do | |
ls -l /proc/${pid}/exe|awk -F" " '{print $11}' | |
done < <(lsof|egrep libssl|awk -F" " '{print $2'})|sort -d|uniq |
# Cheat Sheet | |
## TMUX | |
starts new session tmux new -s <name> | |
attach deatached session tmux (a)ttach -t <name> | |
list sessions tmux ls | |
### Windows | |
new window ^a c | |
list windows ^a w |
## Vim | |
### Basic | |
enable line numbers :set number | :set nu | |
disable line numbers :set nonumber | :set nonu | :set nu! | |
enable relative numbers :set relativenumber | |
convert entire word to uppercace <leader>u | |
convert entire word to lowercase <leader>l | |
convert first char of word to uppercase <leader>U | |
convert first char of word to lowercase <leader>L |
I hereby claim:
To claim this, I am signing this object:
# If for any reason you need to reproduce the Rails Guides ActiveRecord examples | |
# this gist will make your life easier | |
############################# | |
### Has Many / Belongs To ### | |
############################# | |
# be rails g model Order order_date:datetime customer:references | |
class Order < ActiveRecord::Base | |
belongs_to :customer |
# Operating System: OSX 10.10.3 | |
# Boxen + Brew | |
brew install libxml2 libxslt | |
gem install nokogiri -- \ | |
--use-system-libraries \ | |
--with-xml2-lib=/opt/boxen/homebrew/opt/libxml2/lib \ | |
--with-xml2-include=/opt/boxen/homebrew/opt/libxml2/include/libxml2 \ | |
--with-xslt-lib=/opt/boxen/homebrew/opt/libxslt/lib \ |
# This class is an org | |
class Organization < ActiveRecord::Base | |
# @!attribute name | |
# @return [String] The name of the task. | |
# @!attribute description | |
# @return [String] The description of the task. | |
# @!attribute active | |
# @return [Boolean] Marks whether the task is active or not. |
(╯°□°)╯︵ ┻━┻ | |
¯\_(ツ)_/¯ | |
oslǝɔ | |
oslǝƆ | |
osןǝɔ |