Skip to content

Instantly share code, notes, and snippets.

View mattrobenolt's full-sized avatar
🀠
πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”

Matt Robenolt mattrobenolt

🀠
πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”πŸ€”
View GitHub Profile
@mattrobenolt
mattrobenolt / gist:4580442
Created January 20, 2013 18:18
lol Python
>>> class Foo(object): pass
...
>>> foo = Foo()
>>> setattr(foo, 'β˜ƒ', 'snowman')
>>> getattr(foo, 'β˜ƒ')
'snowman'
// jQuery
Raven.plugin({
// the main, base object
object: $,
// the keys within that object to wrap
keys: ['success', 'failure'],
// optionally wrap the arguments to the callbacks, if they are themselves functions
args: true
})
@mattrobenolt
mattrobenolt / cramermath.py
Created February 28, 2013 02:23
David Cramer math
"""
cramermath
~~~~~~~~~~
Usage:
>>> import cramermath
>>> cramermath.log(10)
0.014728067495500818
"""
>>> import sourcemap
>>> index = sourcemap.load(open('jquery.min.map')) # Parses the map
>>> index.lookup(line=1, column=3000)) # Search in index for a Token
@mattrobenolt
mattrobenolt / wtf.py
Last active December 21, 2015 11:59 — forked from anonymous/wtf.py
class A(object):
def hook(self, f):
def intime(*args):
print intime.atime
intime.atime += 1
return f(*args)
intime.atime = 0
return intime
>>> f = A().hook(lambda b: b + 1)
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"os/exec"
"time"
β–“β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–“ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
β–’β–ˆβ–ˆβ–€ β–ˆβ–ˆβ–Œβ–“β–ˆβ–ˆβ–’β–’β–ˆβ–ˆ β–’ β–’β–ˆβ–ˆβ–“ β–ˆβ–ˆβ–’ β–ˆβ–ˆ β–“β–ˆβ–ˆβ–’β–’β–ˆβ–ˆ β–’
β–‘β–ˆβ–ˆ β–ˆβ–Œβ–’β–ˆβ–ˆβ–’β–‘ β–“β–ˆβ–ˆβ–„ β–’β–ˆβ–ˆβ–’ β–ˆβ–ˆβ–‘β–“β–ˆβ–ˆ β–’β–ˆβ–ˆβ–‘β–‘ β–“β–ˆβ–ˆβ–„
β–‘β–“β–ˆβ–„ β–Œβ–‘β–ˆβ–ˆβ–‘ β–’ β–ˆβ–ˆβ–’β–‘β–ˆβ–ˆ β–ˆβ–€ β–‘β–“β–“β–ˆ β–‘β–ˆβ–ˆβ–‘ β–’ β–ˆβ–ˆβ–’
β–‘β–’β–ˆβ–ˆβ–ˆβ–ˆβ–“ β–‘β–ˆβ–ˆβ–‘β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–’β–‘β–’β–ˆβ–ˆβ–ˆβ–’β–ˆβ–„ β–’β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–“ β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–’
β–’β–’β–“ β–’ β–‘β–“ β–’ β–’β–“β–’ β–’ β–‘β–‘β–‘ β–’β–’β–‘ β–’ β–‘β–’β–“β–’ β–’ β–’ β–’ β–’β–“β–’ β–’ β–‘
β–‘ β–’ β–’ β–’ β–‘β–‘ β–‘β–’ β–‘ β–‘ β–‘ β–’β–‘ β–‘ β–‘β–‘β–’β–‘ β–‘ β–‘ β–‘ β–‘β–’ β–‘ β–‘
β–‘ β–‘ β–‘ β–’ β–‘β–‘ β–‘ β–‘ β–‘ β–‘ β–‘β–‘β–‘ β–‘ β–‘ β–‘ β–‘ β–‘
β–‘ β–‘ β–‘ β–‘ β–‘ β–‘
β–‘
--- cassandra.orig 2014-08-17 14:45:54.000000000 +0000
+++ cassandra 2014-08-20 01:27:53.000000000 +0000
@@ -38,6 +38,8 @@
exit 3
fi
+export JVM_OPTS
+
# Export JAVA_HOME, if set.
[ -n "$JAVA_HOME" ] && export JAVA_HOME
@mattrobenolt
mattrobenolt / gzippedtext.py
Last active August 29, 2015 14:05
A GzippedTextField for Django
import zlib
from django.db import models
from django.utils import six
from django.utils.encoding import force_bytes
__all__ = ('GzippedTextField',)
class GzippedTextField(six.with_metaclass(models.SubfieldBase, models.BinaryField)):
import re
import json
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse, HttpResponseBadRequest
# Reserved words list from http://javascript.about.com/library/blreserved.htm
JAVASCRIPT_RESERVED_WORDS = frozenset((
'abstract', 'as', 'boolean', 'break', 'byte', 'case', 'catch', 'char',
'class', 'continue', 'const', 'debugger', 'default', 'delete', 'do',