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
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs -I% git push v2 :% |
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
source 'https://rubygems.org' | |
ruby '2.2.3' | |
gem 'rails', github: "rails/rails" | |
gem 'sprockets-rails', github: 'rails/sprockets-rails' | |
gem 'sprockets', github: "rails/sprockets" | |
gem 'sass-rails', github: "rails/sass-rails" | |
gem 'arel', github: "rails/arel" | |
gem 'rack', github: "rack/rack" |
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
#!/bin/bash | |
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64" | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be a root user" 2>&1 | |
exit 1 | |
else | |
apt-get update | |
apt-get install -y build-essential chrpath libssl-dev libxft-dev | |
apt-get install -y libfreetype6 libfreetype6-dev | |
apt-get install -y libfontconfig1 libfontconfig1-dev |
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
sudo ln -s /usr/lib/x86_64-linux-gnu/libtcl8.5.so.0 /usr/lib/libtcl8.5.so.0 | |
sudo ln -s /usr/lib/x86_64-linux-gnu/libtk8.5.so.0 /usr/lib/libtk8.5.so.0 | |
sudo ln -s /usr/lib/x86_64-linux-gnu/tcl8.5/tclConfig.sh /usr/lib/tclConfig.sh | |
sudo ln -s /usr/lib/x86_64-linux-gnu/tk8.5/tkConfig.sh /usr/lib/tkConfig.sh | |
RUBY_CONFIGURE_OPTS="--with-tcl-include=/usr/include/tcl8.5 | |
--with-tcllib=tcl8.5 --with-tklib=tk8.5 --with-tcltkversion=8.5 | |
--with-tk-include=/usr/include/tcl8.5 | |
--with-tclConfig-file=/usr/lib/tclConfig.sh |
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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
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
1.9.1-p243: | |
r31351 + r27300 # mingw-w64 issue with truncate/ftruncate (http://bugs.ruby-lang.org/issues/4564) | |
r28811 # x86_64 mingw defines stati64 (http://bugs.ruby-lang.org/issues/2588) | |
r26311 # redefinition of 'struct timezone' (http://bugs.ruby-lang.org/issues/2587) | |
1.8.6-p398: | |
r28144 + r28223 # winsock2 issue (http://bugs.ruby-lang.org/issues/3382) |
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
# Setting up dnsmasq for Local Web Development Testing on any Device | |
Please note, these instructions are for OS X Lion. | |
First, you need to get the IP address of your machine on your local network. In OS X, the easiest place to find this is in System Preferences > Network. If you're using DHCP on your local network, you will want to make sure your computer requests the same IP address when it renews it's IP address lease. I recommend configuring the DCHP Reservation settings on your router to accomplish this. Otherwise, you can specify a manual address in your network settings: | |
1. Go to *System Preferences > Network* | |
1. Click *Advanced...* |
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
## https://github.com/jnicklas/capybara | |
#=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
#=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') |
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
1.2.4 Scaffolding | |
binstubs was only introduced later on, so bin/rails makes no sense | |
Listing 1.16 | |
update(purchase_params) is used instead of update_attributes(params[:purchase]) | |
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 'graphviz' | |
require 'bundler' | |
module Bundler | |
class Graph | |
class GraphVizClient | |
def g | |
@g ||= ::GraphViz.digraph(@graph_name, { | |
:use => 'neato', | |
:concentrate => true, |