Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# note: this won't work too well with filenames/directories with spaces in them
function compressresource() {
gzip -c9 "$1" > "$1.gz"
touch -c -r "$1" "$1.gz"
echo "Compressed: $1 > $1.gz"
}
@ottob
ottob / gist:8397804
Last active January 3, 2016 02:49
golang support for gdb
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index c92b530..acb1c6b 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -197,6 +197,9 @@ static const mach_o_section_name_xlat dwarf_section_names_xlat[] =
{ ".debug_macro", "__debug_macro",
SEC_DEBUGGING, BFD_MACH_O_S_REGULAR,
BFD_MACH_O_S_ATTR_DEBUG, 0},
+ { ".debug_gdb_scripts", "__debug_gdb_scri",
+ SEC_DEBUGGING, BFD_MACH_O_S_REGULAR,
@ottob
ottob / gist:6977070
Created October 14, 2013 15:00
Sample using duo security sms verify api with go
package main
import (
"bytes"
"crypto/hmac"
"crypto/sha1"
"crypto/tls"
"encoding/base64"
"encoding/hex"
"encoding/json"