Skip to content

Instantly share code, notes, and snippets.

View camilo's full-sized avatar
🙊

Camilo Lopez camilo

🙊
View GitHub Profile
@dylanahsmith
dylanahsmith / marshal-print.rb
Last active January 18, 2019 20:55
Print contents of marshal dump for inspection and debugging
#!/usr/bin/env ruby
# frozen_string_literal: true
filename = ARGV.shift
class MarshalPrinter
TYPE_NIL = '0'
TYPE_TRUE = 'T'
TYPE_FALSE = 'F'
TYPE_FIXNUM = 'i'
@burke
burke / debugging.md
Last active January 19, 2016 08:13

Debugging Go on OS X

Step 1: Get GDB.

Some of the fancy features Go adds to GDB require GDB >= 7.1. You can check which version you have with gdb -v. If it's high enough, skip to the next section. If not, do the following:

  1. Follow these instructions: http://www.opensource.apple.com/source/lldb/lldb-69/docs/code-signing.txt. The name doesn't matter really, but gdb_codesign is as good a choice as any.

  2. brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
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: