This file contains 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
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
This file contains 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
''' | |
prefix_code.py | |
Copyright 2012-2013 Josiah Carlson | |
Released under the GNU LGPL v 2.1 license | |
This module offers the ability to encode/decode a sequence of integers into | |
strings that can then be used to compare sequences of integers (or paths on | |
trees) quickly. This module was originally intended to be used in a case- | |
preserving index in a relational database (where 'Z' comes before 'a', as is |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
export PS1="\[\033[38;5;9m\]\h\[$(tput sgr0)\]\[\033[38;5;7m\]@\[$(tput sgr0)\]\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;14m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\n\\$ >\[$(tput sgr0)\]" | |
export EDITOR=vim | |
alias st='git status -sb' |
This file contains 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: rubocop-rspec | |
AllCops: | |
Include: | |
- "**/*.gemspec" | |
- "**/*.podspec" | |
- "**/*.jbuilder" | |
- "**/*.rake" | |
- "**/*.opal" | |
- "**/Gemfile" |