I hereby claim:
- I am ivangonekrazy on github.
- I am IvanTam (https://keybase.io/IvanTam) on keybase.
- I have a public key whose fingerprint is 92A4 A414 9C77 BEC7 2097 97BC F46D 97C8 44F0 5D8E
To claim this, I am signing this object:
import re | |
from collections import defaultdict | |
SHORT_WORD_LEN = 4 | |
WORD_REGEX = '\w+' | |
TEXT_FILE_PATH = 'text.txt' | |
word_counter = defaultdict(int) | |
# read in all the words, cull out the ones that aren't long enough |
import inspect | |
def collect_frame_contexts(attr='__frame__', start_depth=1, **immediatecontext): | |
""" | |
Bubbles up the call stack, accumulating | |
__frame__ context dicts. | |
""" | |
contexts = [] | |
frames = inspect.getouterframes( inspect.currentframe() ) |
// Draw pie charts | |
var charts = []; | |
function createPie(statsjson, type, div, title) { | |
if(document.getElementById(div)){ | |
data = createDataArray(statsjson, type, title, 'reg'); | |
if(data.getNumberOfRows() > maxResults){ | |
data.removeRows(maxResults, 999999) | |
} |
from django.http import HttpResponse | |
from piston.resource import Resource | |
from piston.handler import AnonymousBaseHandler, BaseHandler | |
class CORSResource(Resource): | |
""" | |
Piston Resource to enable CORS. | |
""" | |
# headers sent in all responses |
#!/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 | |
# |
from inspect import ismethoddescriptor, getmembers | |
def all_the_methods(_type): | |
""" | |
example usage: | |
all_the_methods(str) | |
sample elided output: | |
capitalize() ALL THE <type 'str'>!!!! | |
center() ALL THE <type 'str'>!!!! |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
import flash.net.URLRequestMethod; | |
import flash.net.URLVariables; | |
import flash.events.Event; | |
import flash.events.ErrorEvent; | |
import flash.events.IOErrorEvent; | |
import flash.events.SecurityErrorEvent; |
function basicAuth() { | |
return "Basic " + btoa("<username>:<password>"); | |
}; | |
$.ajax({ | |
url: 'https://<subdomain>.loggly.com/apiv2/customer', | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader("Authorization", basicAuth()); | |
}, | |
success: function(data) { |
I hereby claim:
To claim this, I am signing this object:
Last login: Fri Aug 22 16:51:51 on ttys000 | |
Traphaus:~ ivan$ nslookup community.loggly.com | |
Server: 8.8.8.8 | |
Address: 8.8.8.8#53 | |
Non-authoritative answer: | |
community.loggly.com canonical name = loggly-haproxy-1333703238.us-west-2.elb.amazonaws.com. | |
Name: loggly-haproxy-1333703238.us-west-2.elb.amazonaws.com | |
Address: 54.201.53.220 | |
Name: loggly-haproxy-1333703238.us-west-2.elb.amazonaws.com |