Skip to content

Instantly share code, notes, and snippets.

View originalhat's full-sized avatar
👾
L I M I T L E S S

Devin Brown originalhat

👾
L I M I T L E S S
View GitHub Profile
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')
if Rails.env.production?
module OmniAuth
module Strategy
def full_host
uri = URI.parse(request.url)
uri.path = ''
uri.query = nil
uri.port = (uri.scheme == 'https' ? 443 : 80)
uri.to_s
end
@heartcode
heartcode / Default (OSX).sublime-keymap
Created April 18, 2012 19:02
Sublime Text 2 | Key Bindings - User
[
{ "keys": ["super+m"], "command": "toggle_minimap" },
{ "keys": ["super+d"], "command": "duplicate_line" },
{ "keys": ["super+up"], "command": "swap_line_up" },
{ "keys": ["super+down"], "command": "swap_line_down" }
]
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

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:

@LBRapid
LBRapid / keypress.rb
Created September 21, 2012 18:03
Simulate keyup event in a request spec with capybara/poltergeist
keypress_script = "var e = $.Event('keyup', { keyCode: 13 }); $('#main-search-input').trigger(e);"
page.driver.execute_script(keypress_script)
@antonio
antonio / delete_branches_older_than.sh
Created January 21, 2013 14:29
Script to delete branches older than a certain date
#!/bin/sh
date=$1
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do
if [[ "$(git log $branch --since $date | wc -l)" -eq 0 ]]; then
if [[ "$branch" =~ "origin/" ]]; then
local_branch_name=$(echo "$branch" | sed 's/^origin\///')
if [[ "$DRY_RUN" -eq 1 ]]; then
echo "git push origin :$local_branch_name"

Nagios OSX Install

Install via brew:

sudo brew install nagios

may need to chown a few things...

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
@tstone
tstone / checklist.md
Last active December 25, 2015 22:28
AC/Design Checklist

Titles/Text

  • How is overflow handled?
  • What is the behavior if the text/title is empty?

Links

  • Where does it go?

Images