Skip to content

Instantly share code, notes, and snippets.


Tomas Markauskas markauskas

View GitHub Profile

Keybase proof

I hereby claim:

  • I am markauskas on github.
  • I am markauskas ( on keybase.
  • I have a public key ASBXBuMXf9--7aazmkGjLkIdyqf1w2pIrzMGoyyfXhnyLwo

To claim this, I am signing this object:

markauskas /
Created Mar 15, 2016 — forked from piscisaureus/
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 =

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:


A dendrogram is a node-link diagram that places leaf nodes of the tree at the same depth. In this example, the classes (leaf nodes) are aligned on the right edge, with the packages (internal nodes) to the left. Data shows the Flare class hierarchy, courtesy Jeff Heer.


Since Obie Fernandez posted his demands as a consultant I thought I would post mine too.

  • I will be paid $10,000 per day, in $50 bills, in a titanium briefcase that you will purchase for the sole purpose of providing a container for my money. You may not re-use the briefcase for the next day's payment.
  • The $50 bills must have been printed in the last three months and handled by no more than 2 people.
  • Anybody handling the money must do so with clean white gloves that must be placed on the hand immediately before touching the briefcase. If the hand leaves the briefcase, the white gloves must be replaced with new ones before the briefcase is touched again.
  • I will arrive in your city by a private jet. Fuel and any other costs incurred by this trip will be paid by you, and is not included in the $10k/day fee.
  • Transportation from my jet to your workplace must be performed by a driver who is between the ages of 50
// resource is a com.sun.jersey.api.client.WebResource
ClientResponse response = resource.get(ClientResponse.class);
TypeA x = response.getEntity(TypeA.class);
TypeB y = response.getEntity(TypeB.class);
View routes.rb
Rails.application.routes.draw do
get '/(:locale)/products/(:category)/(page/:page).:extension',
:to => 'products#index',
:as => :products,
:constraints => {
:locale => /[a-z]{2}/,
:category => /.+?/,
:page => /\d+/
View gist:608583
* {
background-color: #FFFFFF;
div.advert {
display: none;
ul.alt-a li a {
background-color: #AAAAAA;
View Gemfile-rails-2.3.8.rb
# Everything you need to do to get started with Rails 2.3.8
# As of June 14th, 2010 @ 2:30 p.m. MST
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec 1.3.0 + Rspec-Rails 1.3.2
# - RVM
View gist:426806
fast: through middleware inserted at 0
slwr: through middleware inserted via @use@
rotr: through endpoint sent via the router
bare: through ActionController::Metal with self.response_body
cntr: through ActionController::Base with self.response_body
text: through ActionController::Base with render :text
tmpl: through ActionController::Base with simple render :template
layt: through ActionController::Base with render :template with layout
Note: These tests are being run without ActiveRecord, which currently
View sfcurl.rb
#!/usr/bin/env ruby
# sfcurl
# This curl that automatically uses your safari/webkit cookies. Use it like you would
# normally use curl. Report bugs to michael@nuttnet. Or better yet, fork it from:
# Also for firefox: