Skip to content

Instantly share code, notes, and snippets.

View markauskas's full-sized avatar

Tomas Markauskas markauskas

View GitHub Profile
@markauskas
markauskas / pr.md
Created March 15, 2016 14:00 — forked from piscisaureus/pr.md
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:

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);
response.bufferEntity();
response.getEntityInputStream().mark(Integer.MAX_VALUE);
TypeA x = response.getEntity(TypeA.class);
getEntityInputStream().reset();
TypeB y = response.getEntity(TypeB.class);
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+/
},
* {
background-color: #FFFFFF;
}
div.advert {
display: none;
}
ul.alt-a li a {
background-color: #AAAAAA;
# 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
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
#!/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:
#
# http://gist.github.com/gists/393141
#
# Also for firefox: http://gist.github.com/393140
#!/usr/bin/env ruby
# ffcurl
#
# This curl that automatically uses your firefox cookies. Use it like you would normally
# use curl. Report bugs to michael@nuttnet. Or better yet, fork it from:
#
# http://gist.github.com/393140
#
# Also for webkit/safari: http://gist.github.com/393141