Git squash and merge two commits into one
08/13/15 Public, Git
http://stackoverflow.com/questions/2563632/how-can-i-merge-two-commits-into-one
$ git rebase --abort
$ git rebase --interactive HEAD~2
If you want to squash all of the commits back to origin/master
run: $ git rebase -i master
You...
1 vote - harrylevine
Using git bisect to troubleshoot
06/30/15 Public, Troubleshooting
Occasionally, something added to a gem used by one of your projects will break your application. Finding out where, when, and how it broke can be a challenge...
https://mojolingo.com/blog/2013/using-git-bisect-to-troubleshoot-ruby-gems/
1 vote - harrylevine
06/24/15 Public, Git
shift
key to highlight multiple lines)1 vote - harrylevine
See and force the hover state in Google Chrome editor
06/19/15 Public, Troubleshooting
http://stackoverflow.com/questions/4515124/see-hover-state-in-chrome-developer-tools
1 vote - harrylevine
rbenv not showing the correct ruby version
06/19/15 Public, Ruby General
If you don't see the version of ruby in the list you need when you run rbenv install --list
run:
$ brew update && brew reinstall --HEAD ruby-build
then install the ruby version, i.e. rbenv install 2.2.1
From: https://github.com/H...
1 vote - harrylevine
05/24/15 Public, Ruby General
In Ruby code, you quite often see the trick of using an expression like:
array.map(&:method_name)
as a shorthand form of
array.map { |element| element.method_name }
From: http://www.toptal.com/ruby/interview-questions
1 vote - harrylevine
Load a file into IRB from the root directory's perspective
05/24/15 Public, Command Line
load
~
, which represents the root directoryFor example:
$ load '~/Dropbox/Coding/Sandbox/Random/bench_kill_data.rb'
1 vote - harrylevine
04/08/15 Public, Git
$ git checkout HEAD -- my-file.txt
For example:
$ git checkout HEAD -- README.md
http://stackoverflow.com/questions/7147270/hard-reset-of-a-single-file
1 vote - harrylevine
04/02/15 Public, Testing / TDD
RSpec list of available Expectation Matchers. From the Lynda.com course RSpec Testing Framework with Ruby
1 vote - harrylevine
Command line keyboard shortcuts
04/02/15 Public, Shortcuts
control + a
= Move to the start of the line
control + e
= Move to the end of the line
esc + f
= Move forward a word
esc + b
= Move backward a word
control + b
= Move back one character
control + f
= Move forward one character
`co...
1 vote - harrylevine