Skip to content

Instantly share code, notes, and snippets.

View zjhuntin's full-sized avatar

Zachary Huntington-Meath zjhuntin

  • Red Hat
  • United States
View GitHub Profile
@zjhuntin
zjhuntin / pr.md
Created April 7, 2016 20:54 — 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:

@zjhuntin
zjhuntin / gen_virt_hosts.rb
Created April 6, 2016 14:56 — forked from jlsherrill/gen_virt_hosts.rb
Gen virt host proxies
base=8000 #port
range="192.168.121."
contents = <<-EOS
Listen %{port} https
<VirtualHost *:%{port}>
ProxyPass / https://%{ip_address}/
<Location />
ProxyPassReverse https://%{ip_address}/
</Location>