Skip to content

Instantly share code, notes, and snippets.

View leepa's full-sized avatar

Lee Packham leepa

View GitHub Profile
Sampling localhost:6379 DB:0 with 1000 RANDOMKEYS
TYPES
=====
string: 993 (99.30%) set: 7 (0.70%)
EXPIRES
=======
unknown: 336 (33.60%) 1206979: 6 (0.60%) 1205926: 4 (0.40%)
24230: 4 (0.40%) 1205589: 3 (0.30%) 1209453: 3 (0.30%)
Don't ask why I'm pasting this here ;)
øøøøøøøøøø
# pip install pyftpdlib then rock n roll
from pyftpdlib import ftpserver
authorizer = ftpserver.DummyAuthorizer()
authorizer.add_user("ftpshiz", "ftpshiz", "/usr/local/ftp", perm="elradfmw")
handler = ftpserver.FTPHandler
handler.authorizer = authorizer
address = ("127.0.0.1", 2121)
ftpd = ftpserver.FTPServer(address, handler)
ftpd.serve_forever()
@leepa
leepa / core-site.xml
Created July 5, 2012 17:13
OSX Hadoop
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/usr/local/Cellar/hadoop/hdfs/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
@leepa
leepa / pythondtrace-patch.diff
Created August 21, 2012 13:50
Python 2.7.3 dtrace patch from http://bugs.python.org/issue13405 - modified for Homebrew (had to remove one file)
diff -r 70274d53c1dd -r 56ac083c60dc Doc/library/debug.rst
--- a/Doc/library/debug.rst Mon Apr 09 19:04:04 2012 -0400
+++ b/Doc/library/debug.rst Tue Jul 03 03:19:10 2012 +0200
@@ -14,4 +14,5 @@
profile.rst
hotshot.rst
timeit.rst
- trace.rst
\ No newline at end of file
+ trace.rst
<Project Key>-<Issue ID> - Displays information about the ticket (if it exists)
haters - Returns a random haters gonna hate url
hubot (Oh|You) <text> (Please|Tell) <text> - Willy Wonka
hubot <keyword> tweet - Returns a link to a tweet about <keyword>
hubot <text> (SUCCESS|NAILED IT) - Generates success kid with the top caption of <text>
hubot <text> ALL the <things> - Generates ALL THE THINGS
hubot <text> FUCK YOU - Angry Linus
hubot <text> ORLY? - Generates the ORLY? owl with the top caption of <text>
hubot <text> TOO DAMN <high> - Generates THE RENT IS TOO DAMN HIGH guy
hubot <text> you're gonna have a bad time - Bad Time Ski Instructor
[~/Code/scalding]$ scripts/scald.rb --local tutorial/Tutorial0.scala [develop][system]
compiling tutorial/Tutorial0.scala
scalac -classpath /var/folders/p9/czjypc9s6w94x_bmfxz18ktc0000gn/T/maven/hadoop-core-0.20.2.jar:/var/folders/p9/czjypc9s6w94x_bmfxz18ktc0000gn/T/maven/log4j-1.2.15.jar:/var/folders/p9/czjypc9s6w94x_bmfxz18ktc0000gn/T/maven/commons-httpclient-3.1.jar:/var/folders/p9/czjypc9s6w94x_bmfxz18ktc0000gn/T/maven/commons-cli-1.2.jar:/var/folders/p9/czjypc9s6w94x_bmfxz18ktc0000gn/T/maven/zookeeper-3.3.4.jar:/Users/leepa/Code/scalding/target/scalding-assembly-0.8.0.jar: -d /var/folders/p9/czjypc9s6w94x_bmfxz18ktc0000gn/T/script-build tutorial/Tutorial0.scala
error: scala.tools.nsc.MissingRequirementError: object scala not found.
at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:655)
at scala.tools.nsc.symtab.Definitions$definitions$.getModule(Definit
[/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'
@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); }'
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