Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
excited

Greg Burek gregburek

👀
excited
View GitHub Profile
@gregburek
gregburek / rateLimitDecorator.py
Created Dec 7, 2011
Rate limiting function calls with Python Decorators
View rateLimitDecorator.py
import time
def RateLimited(maxPerSecond):
minInterval = 1.0 / float(maxPerSecond)
def decorate(func):
lastTimeCalled = [0.0]
def rateLimitedFunction(*args,**kargs):
elapsed = time.clock() - lastTimeCalled[0]
leftToWait = minInterval - elapsed
if leftToWait>0:
View gist:4ac229ec076910814bd31bcdd18ef274
### Keybase proof
I hereby claim:
* I am gregburek on github.
* I am gregburek (https://keybase.io/gregburek) on keybase.
* I have a public key ASAcdCj-CcnUVWdMJ84MHSEosEOWnx1LOGGiXSaLzYVEowo
To claim this, I am signing this object:
View PHD_event_types.csv
Category Code Service
EVENTTYPES issue AWS_ABUSE_EC2_BOTNET_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_CC_FRAUD_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_COPYRIGHT_DMCA_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_COPYRIGHT_NON_DMCA_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_DOS_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_EMAIL_SPAM_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_FORUM_SPAM_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_ILLEGAL_CONTENT_REPORT ABUSE
EVENTTYPES issue AWS_ABUSE_EC2_INTRUSION_ATTEMPT_REPORT ABUSE
View gist:32b999496b522f84ce3d8d7d0ca6c4fc
[3370077.979925] carbon-cache.py[69842]: segfault at 24 ip 0000000000537388 sp 00007ffd105d0ed0 error 6 in python2.7[400000+2bc000]
[3370077.981359] carbon-cache.py[69810]: segfault at 24 ip 00000000004c4bce sp 00007ffc0f523a90 error 6 in python2.7[400000+2bc000]
[3370077.987527] Process 70244(apport) has RLIMIT_CORE set to 1
[3370077.987531] Aborting core
[3370077.987869] carbon-cache.py[69802]: segfault at 24 ip 00000000004c4bce sp 00007ffd9893b8e0 error 6 in python2.7[400000+2bc000]
[3370077.988510] carbon-cache.py[69898]: segfault at 24 ip 0000000000537388 sp 00007ffdf3594470 error 6 in python2.7[400000+2bc000]
[3370077.988915] Core dump to |/usr/share/apport/apport 69802 11 0 69802 pipe failed
[3370077.988926] Core dump to |/usr/share/apport/apport 69898 11 0 69898 pipe failed
[3370077.991585] carbon-cache.py[69874]: segfault at 24 ip 00000000004c4bce sp 00007ffd4bc78d00 error 6 in python2.7[400000+2bc000]
[3370077.991813] Core dump to |/usr/share/apport/apport 69874 11 0 69874 pipe failed
View gist:7472711
For someone that is rather technical, you should be able to just pound the online exams and take the exam.
As for a radio, HRO (http://hamradio.com) has stores in Sunnyvale and Oakland
# Study Materials
- http://www.eham.net/exams/
- http://qrz.com/hamtest/
- https://ssl.qrz.com/bookstore (The Gordon West Book is used qute a bit)
# Register for an Exam
View whisper-clean.py
import os
import os.path
import sys
from graphite.render.hashing import ConsistentHashRing
instances = []
unwelcome_instances = []
for arg in sys.argv[1:]:
unwelcome = False
View caveatPatchor.js
// ~/Library/Application Support/Propane/unsupported/caveatPatchor.js
var mapping = {};
var loadEmotes = function(response) {
response.forEach(function(a){a.emoticons.forEach(function(b){mapping[b.code] = b.image})});
window.chat.speaker.filters.unshift(
function(m){
var match;
if(match=m.match(/^:(.*):$/)){
return mapping[match[0]];
@gregburek
gregburek / hack.sh
Created Jun 18, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@gregburek
gregburek / ideal ops.md
Created May 24, 2012 — forked from bhenerey/ideal ops.md
ideal ops checklist
View ideal ops.md

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@gregburek
gregburek / vagrant.org
Created Jan 12, 2012
CentOS Box for Vagrant
View vagrant.org