Skip to content

Instantly share code, notes, and snippets.

View leepa's full-sized avatar

Lee Packham leepa

View GitHub Profile
@leepa
leepa / gist:accb6068b22312eb0ef8
Created April 29, 2014 20:28
Google Sense of Humor
➜ ~ dig +short TXT google-public-dns-a.google.com
"http://xkcd.com/1361/"
➜ ~ dig TXT google-public-dns-a.google.com
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> TXT google-public-dns-a.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11456
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
@leepa
leepa / CVE-2014-1912.patch
Created March 4, 2014 17:50
CVE-2014-1912
# HG changeset patch
# User Benjamin Peterson <benjamin@python.org>
# Date 1389671978 18000
# Node ID 87673659d8f7ba1623cd4914f09ad3d2ade034e9
# Parent 2631d33ee7fbd5f0288931ef37872218d511d2e8
complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
# HG changeset patch
# User Stefan Krah <skrah@bytereef.org>
# Date 1390341952 -3600
[leepa@joolzbsd ~]$ pkg info python27
python27-2.7.6_4
Name : python27
Version : 2.7.6_4
Installed on : Mon Mar 3 20:39:53 UTC 2014
Origin : lang/python27
Architecture : freebsd:10:x86:64
Prefix : /usr/local
Categories : python lang ipv6
Licenses : PSFL
[leepa@joolzbsd ~]$ pkg info python27
python27-2.7.6_4
Name : python27
Version : 2.7.6_4
Installed on : Mon Mar 3 20:39:53 UTC 2014
Origin : lang/python27
Architecture : freebsd:10:x86:64
Prefix : /usr/local
Categories : python lang ipv6
Licenses : PSFL
[leepa@joolzbsd ~]$ pkg info python33
python33-3.3.3_3
Name : python33
Version : 3.3.3_3
Installed on : Mon Mar 3 19:59:34 UTC 2014
Origin : lang/python33
Architecture : freebsd:10:x86:64
Prefix : /usr/local
Categories : python lang ipv6
Licenses : PSFL
package main
import (
"fmt"
"runtime"
)
type AssertionError struct {
pc uintptr
@leepa
leepa / README.md
Last active December 19, 2015 22:29

Notes

So, make sure you replace youraccount with your account name. Also make sure you set the reqadd Authorization line to be the base64 of your token/user/password combo:

echo -n username:password | openssl enc -a

Replace any equals signs with \3D to make sure they are escaped.

apache-solr3 @3.6.2 java/apache-solr3
apache2 @2.2.24 www/apache2
apr @1.4.6 devel/apr
apr-util @1.5.1 devel/apr-util
autoconf @2.69 devel/autoconf
automake @1.13.1 devel/automake
bison @2.7 devel/bison
boost @1.53.0 devel/boost
bzip2 @1.0.6 archivers/bzip2
cairo @1.12.14 graphics/cairo
@leepa
leepa / gist:4422736
Created December 31, 2012 21:04
How to determine which ata device is which sata device on linux - really handy!
dmesg | grep 'ata[0-9]\+.[0-9][0-9]: ATA-' | \
sed 's/^.*\] ata//' | \
sort -n | sed 's/:.*//' | \
awk ' { a="ata" $1; printf("%10s is /dev/sd%c\n", a, 96+NR); }'
[/var/db]$ cat .puppet_pkgdmg_installed_MacPorts-2.1.2-10.8-MountainLion.pkg [system]
name: 'MacPorts-2.1.2-10.8-MountainLion.pkg'
source: 'https://distfiles.macports.org/MacPorts/MacPorts-2.1.2-10.8-MountainLion.pkg'