Skip to content

Instantly share code, notes, and snippets.

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:

#!/usr/bin/env python2.7
from pprint import pprint
from multiprocessing.dummy import Pool
from functools import partial
from jnpr.junos import Device
from jnpr.junos.op.arp import ArpTable
user_name = 'tyler'
@routelastresort
routelastresort / gist:5a4860a1b7559d5f653e
Created October 20, 2014 21:10
Vagrant destroy issue with vagrant-vmware-workstation plugin installed
⌁71% [death:~/deploy/cluster/vmware] 2s 1 $ vagrant destroy bd9a58e --debug
INFO global: Vagrant version: 1.6.5
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"

Keybase proof

I hereby claim:

  • I am routelastresort on github.
  • I am routelastresort (https://keybase.io/routelastresort) on keybase.
  • I have a public key whose fingerprint is 98F2 0E69 CEF8 F364 3E21 A3C7 751D 3ACD 03FC 92C8

To claim this, I am signing this object:

@routelastresort
routelastresort / gist:89ec4d7edffc151750cf
Created October 31, 2015 05:54 — forked from kuenishi/gist:3825178
Accessing to VM via serial console at VMware Fusion 5

Environment

  • Using FreeBSD
  • Mountain Lion
  • VMware Fusion 5
  • Your VMware is installed at '/Applications/VMware Fusion.app'
  • Command Line tools are at '/Applications/VMware Fusion.app/Contents/Library'
  • especially vmrun
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@routelastresort
routelastresort / gist:6162547
Created August 6, 2013 06:36
vsrxA.vmx modifications for serial output
serial0.present = "TRUE"
serial0.fileType = "pipe"
serial0.fileName = "/tmp/vsrxA.socket"
serial0.tryNoRxLoss = "TRUE"
@routelastresort
routelastresort / get-inventory-serial.rb
Created August 6, 2013 07:31
Test Netconf over Serial against a VSRX VM - the serial_port should change to whatever 'socat -d -d unix-connect:/tmp/socketname pty' tells you
require 'net/netconf/jnpr/serial'
puts "NETCONF v.#{Netconf::VERSION}"
serial_port = '/dev/pts/1'
login = { port: serial_port,
username: "netdevops",
password: "netdevops1" }
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@routelastresort
routelastresort / gist:6239487
Created August 15, 2013 09:16
Example git diff in /etc/vmware, after running Virtual Network Editor
diff --git a/netmap.conf b/netmap.conf
index 91b5934..5966798 100644
--- a/netmap.conf
+++ b/netmap.conf
@@ -4,5 +4,5 @@ network0.name = "Bridged"
network0.device = "vmnet0"
network1.name = "HostOnly"
network1.device = "vmnet1"
-network2.name = "NAT"
-network2.device = "vmnet8"