Skip to content

Instantly share code, notes, and snippets.

View oceansize's full-sized avatar

Roi oceansize

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')
@in5ikt
in5ikt / versioning-your-saves.md
Created February 8, 2011 22:44
Minecraft - Versioning your saves

Minecraft - Versioning your saves

This is a tutorial show how to version your saves using Git.

Q: Why would anyone go through this process?
A: Because if you do, you can undo an otherwise un-undoable action, such as swimming in a pit of lava and accidentally dropping your Notch armpit forged special edition diamond pickaxe and your 35 stacks of cobblestone.

Step by step tutorial

Download and install the appropriate version of Git

@mzcu
mzcu / AddCountryCode.scpt
Created September 23, 2012 15:01
Add country code to OS X Address book entries
(*
AddCountryCode.scpt
=====================
Customization of Andreas Amann's script posted on https://discussions.apple.com/message/9169756#9169756
Description
------------
@ryansobol
ryansobol / gist:5252653
Last active November 22, 2023 11:53
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@akdetrick
akdetrick / rvm-to-rbenv.md
Last active June 12, 2024 03:19
Guide to switching to rbenv bliss from RVM hell

RVM to rbenv

Why? @sstephenson explains it best here.


1) remove RVM from your system

This should get rid of the rvm dir and any installed rubies:

$ rvm implode
@basham
basham / css-units-best-practices.md
Last active July 24, 2024 01:51
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@zoeabryant
zoeabryant / sublime-talk.md
Last active August 29, 2015 14:04
Sublime Text Shortcuts - Talk prep

Sublime Text talk cheatsheet

For Makers Academy Talk

Update 6/10/14 So I'm back at makers one day and I find out this list is still in use, and has been passed onto the new cohort as well! I'm so glad it is useful. With this in mind, I have updated it a little bit. There are now sections: Moving around open files and Split working areas. I hope these will be of use to you. Also a shout out to the awesome Tatiana Soukiassian who has carried on the shortcut love and created another fantastic list of keyboard shortcuts for sublime and beyond, listed by how essential they are. Much love Tatiana!!

Keys

⌘ Command key

⌃ Control key (ctrl)

@r00k
r00k / a4.md
Last active April 3, 2016 10:53
Quizzy Question 5

Answer to Question 4

detect makes things a little shorter:

widgets.detect { |widget| widget.size > 3 }
@r00k
r00k / q1.md
Last active January 29, 2017 03:00
Quizzy Question 1

Question 1

What object-oriented programming advice is this code violating?

def check_for_overheating(system_monitor)
  if system_monitor.temperature > 100
    system_monitor.sound_alarms
  end
end