start new:
tmux
start new with session name:
tmux new -s myname
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
#!/bin/bash | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
These two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |
#!/usr/bin/env bash | |
# Written by William Ting for the following blog post: | |
# http://williamting.com/posts/2012/04/18/set-up-python-and-django-on-dreamhost/ | |
rcfile="${HOME}/.bashrc" | |
version="2.7.3" | |
setuptools_version="2.7" | |
tmp_dir="${HOME}/tmp-${RANDOM}" | |
if [[ ${#} == 0 ]]; then |
#!/bin/sh | |
# | |
# Runs during git flow release start | |
# | |
# Positional arguments: | |
# $1 Version | |
# | |
# Return VERSION - When VERSION is returned empty gitflow | |
# will stop as the version is necessary | |
# |
findPerpendicularDistance = ( point, line ) -> | |
[pointX,pointY] = point[0..1] | |
lineStart = x: line[0][0], y: line[0][1] | |
lineEnd = x: line[1][0], y: line[1][1] | |
slope = ( lineEnd.y - lineStart.y ) / ( lineEnd.x - lineStart.x ) | |
intercept = lineStart.y - ( slope * lineStart.x ) | |
Math.abs( slope * pointX - pointY + intercept ) / Math.sqrt( Math.pow( slope, 2) + 1) | |
douglasPeucker = ( points, epsilon ) -> | |
maxIndex = maxDistance = 0 |
/* | |
* parse_link_header() | |
* | |
* Parse the Github Link HTTP header used for pageination | |
* http://developer.github.com/v3/#pagination | |
*/ | |
function parse_link_header(header) { | |
if (header.length == 0) { | |
throw new Error("input must not be of zero length"); | |
} |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
class ChangeProductLongDescription < ActiveRecord::Migration | |
def up | |
# simple and straightforward | |
change_column :products, :long_description, :text | |
end | |
# but why cant it just be: | |
# change_column :product, :long_description, :string | |
# ??? | |
# because effin databases don't like you, that's why. |