Skip to content

Instantly share code, notes, and snippets.

View richo's full-sized avatar

richö butts richo

View GitHub Profile
class Butts(object):
def __init__(self):
self.a = 0
n = Butts()
for n.a in xrange(10):
print n.a
#!/usr/bin/env python
import os
import sys
import re
COMMIT_RE = re.compile("commit ([a-f0-9]{40})")
GEOTAG_RE = re.compile("richo_geotag: ([-0-9.]+,[-0-9.]+)")
@richo
richo / darwin
Last active December 14, 2015 05:49
elektra ⚡ php test_pwuid.php
Uname: Darwin
Username: richo
elektra ⚡
<html>
<head>
<title>butts lol</title>
</head>
<body>
<style type="text/css">
h1.myclass {
border-width: 1;
border: solid;
ext-align: center;
.\" Copyright (c) 1987, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
@richo
richo / gist:5061389
Last active December 14, 2015 08:59
class Object
def method_missing(sym, *args)
method = methods.select do |m|
method(m).arity == args.length
end.sample
send(method, *args)
end
end
#!/bin/sh
links=$(curl "$p" | grep -Po '"https?://.*?"')
import functools
class Foo(object):
def __init__(self):
self.__dict__["overridden_methods"] = {}
def __setattr__(self, key, value):
"""Blindly assume that if we're setting attrs it's with new methods"""
self.overridden_methods[key] = value
def __getattr__(self, key):
elektra ⚡ unset RPS1 ~/.ssh (1.9.3-p374) home:2789eelektra ⚡ cd
elektra ⚡ pushd code
~/code ~
elektra ± pwd
/Users/richo/code
elektra ± pushd
/tmp/tmp ~/code ~
elektra % pwd
/tmp
elektra % popd
var draw_plumbing = (function() {
var anchors = {
0: {
connector:"StateMachine",
paintStyle:{lineWidth:3,strokeStyle:"#056"},
endpoint:"Blank",
anchor:[[1, 0, 1, 0], [1, 1, 1, 0]],
overlays:[ ["PlainArrow", {location:1, width:7, length:3} ]]
},
1: {