Skip to content

Instantly share code, notes, and snippets.

Avatar
🍍
Pineapple a day keeps a pinedoctor away

Alexander Mankuta pointlessone

🍍
Pineapple a day keeps a pinedoctor away
View GitHub Profile
@AndrewRadev
AndrewRadev / keep-track.sh
Last active Oct 21, 2018
Keep track of a long-running process
View keep-track.sh
# Given a long-running process in the terminal:
#
# - Ctrl+Z to suspend it
# - Run `keep-track`
# - Output resumes, when done will show a notification with the time it took for the process to run
#
# Can be customized with an `--icon` to `notify-send`,
# maybe a sound effect added in the `&&` list.
#
function keep-track() {
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

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:

@leshill
leshill / gist:870866
Created Mar 15, 2011
Cucumber/Capybara JS alert handling
View gist:870866
# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end
@tpope
tpope / .gitattributes
Created Oct 24, 2010
Fewer conflicts in your Rails apps
View .gitattributes
Gemfile.lock merge=bundlelock
db/schema.rb merge=railsschema