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 'formula' | |
| class Vim < Formula | |
| homepage 'http://www.vim.org/' | |
| url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331' | |
| version '7.3.515' | |
| def features; %w(tiny small normal big huge) end | |
| def interp; %w(lua mzscheme perl python python3 tcl ruby) 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
| class UsersController < ApplicationController | |
| def create | |
| @user = User.new params[:user] | |
| return render 'new' unless @user.save | |
| flash[:notice] = "The user was created succesfully" | |
| redirect_to :index | |
| 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
| class UsersController < ApplicationController | |
| def create | |
| @user = User.new params[:user] | |
| return render 'new' unless @user.save | |
| flash[:notice] = "The user was created succesfully" | |
| redirect_to :index | |
| 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
| #!/usr/bin/env bash | |
| if [ -z "$1" ]; then | |
| echo "Usage: provide a title argument." | |
| exit -1 | |
| else | |
| title="$@" | |
| fi | |
| d=$(date +"%Y-%m-%d") |
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
| #!/usr/bin/env bash | |
| set -e | |
| find assets resource -name "*.png" -exec optipng -o7 {} \; |
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
| @mixin retina($ratio: 1.5) { | |
| $dpi: $ratio * 96; | |
| $opera-ratio: $ratio * 100; | |
| @media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}), | |
| only screen and ( -o-min-device-pixel-ratio: '#{$opera-ratio}/100'), | |
| only screen and ( min-resolution: #{$dpi}dpi), | |
| only screen and ( min-resolution: #{$ratio}dppx) { | |
| @content; | |
| } |
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
| class TripsController < ApplicationController | |
| class Action < ApplicationController::Action | |
| end | |
| class New < Action | |
| expose(:trip) { Trip.new(params[:trip]) } | |
| end | |
| class Create < New | |
| def call |
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
| .ipad-only, | |
| .iphone-only, | |
| .retina-only, | |
| .non-retina-only, | |
| .retina-iphone-only, | |
| .non-retina-iphone-only | |
| display: none | |
| // iPad Only | |
| @media only screen and (device-width: 768px) |
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 clone -b split-browser https://github.com/alloy/macvim.git && cd macvim && ./configure --with-features=huge --enable-cscope --enable-rubyinterp --enable-pythoninterp --enable-perlinterp && make && sudo rm -rf /Applications/MacVim.app && sudo mv ./src/MacVim/build/Release/MacVim.app /Applications |
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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl http://npmjs.org/install.sh | sh |