Skip to content

Instantly share code, notes, and snippets.

Working from home

Ramanan Sivaranjan funkaoshi

Working from home
Block or report user

Report or block funkaoshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
funkaoshi / gist:4102490
Created Nov 18, 2012
4d6 drop the lowest
View gist:4102490
import random
[sum(sorted((random.randint(1,6) for _ in range(4)), reverse=True)[:3]) for _ in range(6)]
funkaoshi / gist:4120563
Created Nov 20, 2012
d(100) Random D&D Character Classes and their Attributes.
View gist:4120563
1 Fighter 14 9 10 10 10 7
2 Magic-User 9 11 5 9 10 12
3 Thief 10 11 10 13 17 12
4 Cleric 4 11 12 8 6 12
5 Elf 11 16 10 9 4 7
6 Cleric 12 6 14 10 9 15
7 Thief 10 11 10 13 11 13
8 Dwarf 17 10 14 13 12 3
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:
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 / 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 /
Last active Dec 15, 2015
The Hackenbrack by Zak Smith and Friends.

The Hexenbrack


Well. 3 crocodiles.


Mulk human settlement. excellent glassblowers.

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:

View XSS Strings
<IMG SRC="javascript:alert('XSS');">
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:
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
You can’t perform that action at this time.