Skip to content

Instantly share code, notes, and snippets.

Working from home

Ramanan Sivaranjan funkaoshi

Working from home
View GitHub Profile
View osr.opml
<opml version="2.0">
<outline text="Subscriptions" title="Subscriptions">
<outline xmlUrl='' />
<outline xmlUrl='' />
<outline xmlUrl='' />
<outline xmlUrl='' />
<outline xmlUrl='' />
<outline xmlUrl='' />
<outline xmlUrl='' />
class classproperty(property):
Marries @property and @classmethod
Why doesn't python have this? Grr..
def __new__(cls, fget, *args):
return super(classproperty, cls).__new__(cls, classmethod(fget), *args)
def __get__(self, obj, type=None):
return self.fget(type)
funkaoshi / mh-ram.zsh-theme
Last active Aug 29, 2015
mh-ram, my fork of the mh theme for zsh
View mh-ram.zsh-theme
# mh theme
# preview:
# features:
# path is autoshortened to ~30 characters
# displays git status (if applicable in current folder)
# turns username green if superuser, otherwise it is white
# if superuser make the username green
if [ $UID -eq 0 ]; then NCOLOR="green"; else NCOLOR="white"; fi
View gist:094905157649f655ee4e
### Keybase proof
I hereby claim:
* I am funkaoshi on github.
* I am funkaoshi ( on keybase.
* I have a public key whose fingerprint is BBBC 136E 4036 5070 D219 AE3D 09B9 4D37 D8E6 9C6D
To claim this, I am signing this object:
View XSS Strings
<IMG SRC="javascript:alert('XSS');">
funkaoshi / gist:5291901
Created Apr 2, 2013
The Nymph's Shadow Realm by Harald Wagener for the Hexenbracken project.
View gist:5291901

The Nymph's Shadow Realm

[Hex 0125][1]

Truth be told, the Shadow Realm is as much the Nymph's as the sunlight is the humans or the mountains are the Dwarves' -- they appropriated as they encountered it at the core of the millenial oaks that are their immortal ancestors.

The Shadow Realm is more dangerous than you may think when you see a Druid open it during their moon-bare nightly ritual. It is as if the shadow of the oaken mother ripples, like a pond after a dryad kissing you returns to her watery home.

A druid can learn the ritual to call forward an opening to the shadow realms, but at a price. Usually it is a day and a year in service to the nymphs, an ordeal that ages humans by decades (1d10x5 years); elves can only learn it by offering one of their offspring into eternal bondage; very few are willing to pay the price. No-one ever heard of dwarves or halflings being privy to the secret ritual, which can be observed as follows:

funkaoshi /
Last active Dec 15, 2015
The Hackenbrack by Zak Smith and Friends.

The Hexenbrack


Well. 3 crocodiles.


Mulk human settlement. excellent glassblowers.

funkaoshi / md2html.rb
Created Mar 28, 2013
A simple script that takes a template, markdown file, and an optional foreword and spits out an HTML file.
View md2html.rb
#!/usr/bin/env ruby
require 'liquid'
require 'redcarpet'
if ARGV.length < 2
puts "Usage: md2html <template> <markdown_doc> [markdown_foreword]"
funkaoshi / gist:4965672
Last active Dec 13, 2015
I was curious what the distribution was when you ask a player to try and roll under a D&D attribute, in general.
View gist:4965672
import collections
import random
def d(die): return random.randint(1, die)
def xdy(x,y): return sum(d(y) for _ in xrange(x))
# How many times we will peform our simulation
TEST_RUN = 1000000
# Roll up an attribute score 3d6 and proceed to try and roll under it, storing
funkaoshi / gist:4827204
Created Feb 13, 2013
Merge versions in two puppet files.
View gist:4827204
import sys
import re
from pkg_resources import parse_version
updates =
records = updates.split(';')
packages = {}
for record in records:
fields = [r.strip() for r in record.split('\n') if r.strip()]
if not fields: