Skip to content

Instantly share code, notes, and snippets.

@Zarkonnen
Zarkonnen / worldgen1.txt
Created March 6, 2012 21:53
Sample output from the Pulp Scifi World Generator
run:
0:
IN THE BEGINNING, ALL WAS DARK.
THEN, PLANETS BEGAN TO FORM:
Orra III
Bynow VI
Aomep V
Eylox II
Auliu V
Ziggurat VI
@Zarkonnen
Zarkonnen / gist:2365716
Created April 12, 2012 09:00
What does this return? That's right! "undefined"!
return
a ||
b ||
c;
package ager;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
public class PooledPagingByteArray {
public static class Pool {
private RandomAccessFile raf;
private long offset = 0;
Start Firefox (like a boss)
(When you follow these steps, make sure page content is loaded before clicking, etc... Since you're a human, this is probably what you do already)
- Navigate to http://saucelabs.com/test/guinea-pig/
- Click the link which says "i am a link"
- Let's create a virtual bucket in your brain which we'll use to "remember" something. And let's call that bucket 'title'. Ok, into that bucket, put the title of the page
- Wait until the page title is "(whatever's in the bucket in your brain we named 'title')"
- Make sure the title of the website is "(whatever's in the bucket in your brain we named 'title')"
- Make sure the title of the website is not "asdf"
- If the title of the website is not "(whatever's in the bucket in your brain we named 'title')", scream at the coders
@Zarkonnen
Zarkonnen / gist:2961818
Created June 20, 2012 19:50
Magic Targeted Advertising
"Why do some people say that if they have to have advertising, they'd prefer it to be targeted?" @katzenfabrik asked me.
Good question. The idea of targeted advertising, or rather, the idea of the detailed file on people's habits such targeting requires, creeps us both the hell out. And we both aggressively ignore ads. I'd certainly agree with George Monbiot when he calls advertising a poison that distorts our view of the world and relies on destroying self-confidence to get you to buy something.
Still, the preference for targeted advertising is pretty commonly voiced. I think this preference requires two things: a lack of worry about the details of your identity being public, and a belief in something I'm going to call the magic advertising targeter.
Targeted advertising works by putting people into buckets based on characteristics that distinguish their buying behaviour. Women buy handbags. Men buy beer. Geeks buy computer games. These rules don't have to be absolute, they just have to be good enough to
~/Projects/SeBuilderSiteNew/se-builder $ git status
# On branch gh-pages
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: repository.json
#
no changes added to commit (use "git add" and/or "git commit -a")
~/Projects/SeBuilderSiteNew/se-builder $ git add .
@Zarkonnen
Zarkonnen / Gfx.java
Created November 17, 2012 12:05
Graphics interface sketch
public interface Gfx {
public int width();
public int height();
public void blit(Img img, int x, int y);
public void line(Clr clr, int x1, int y1, int x2, int y2);
public void rect(Clr clr, int x, int y, int w, int h);
}
public class Img {
public String source;
@Zarkonnen
Zarkonnen / gist:4235265
Created December 7, 2012 18:25
Lovecraft 1817 Rules
Each character has six stats. Five of these are shared between all character, and the sixth is different for each of them. Stats are checked using d20 < stat -> success.
The following stats are shared between all characters:
- Sanity
- Fighting
- Willpower
- Constitution
- Dexterity
Characters also have one of the following special stats:
@Zarkonnen
Zarkonnen / gist:4235317
Created December 7, 2012 18:31
Myra Keaton
Myra Keaton (Detective)
Description
Keaton is well-known as the woman to call in when the jewels have gone missing and all the servants are behaving strangely. She usually resolves these cases to her client's satisfaction. Unfortunately, the culprit in her most recent case was a rather powerful nobleman, and she now suddenly finds herself out of favour. Lord Keyes has promised to use his considerable influence to shore up her social standing. Apart from that, this trip to Switzerland promises to be both refreshing and potentially full of mysteries to unravel.
Hold on sanity
She can trust her own eyes.
@Zarkonnen
Zarkonnen / gist:4235528
Created December 7, 2012 18:58
All other characters
Laurette Petrova (Thief)
Description
Petrova is said to be the most accomplished thief in all of London - or perhaps only the most accomplished one Keyes knows about. It is the rare lock that manages to stand in her way for long, and she uses both disguises and acrobatic skill to make her thefts. Unfortunately, Keyes has acquired proof of her crimes. He has offered to destroy this proof and furnish Petrova with a nice sum for her troubles if she works for him a little while.
Hold on sanity
She can always break out of any place and make her escape.