2014-11-03

Color Coded iTerm2 Windows

As a systems administrator, I often have many many terminal windows open. To help ensure I am fully aware of which of them are on Production hosts, I color code them.

I have finally taken that bit of helpful code and made it as easy for you, dear reader, to use: TimZehta/painted-iterm.


Some of the neat things I learned about during the course of this project:

  • 256 terminal colors
  • Bash
    • PROMPT_COMMAND
    • clean/simple way to remove leading zeros
  • SSH LocalCommand



2014-04-02

Star Wars: Edge of the Empire Dice Probabilities

Overview

Each of the graphs below was created by simulating 100,000 dice rolls for each die in each graph (400,000 to 900,000 rolls per graph and 6,000,000 total rolls). The work was inspired by A Treatise on Different Dice-rolling Mechanics in RPGs. The graphs were created using TimZehta/rpgdice · GitHub.

Graphs

The 2nd line of the title is an attempt to describe the dice simulated. They are shown in the top left corner of the graph.

While Despair and Triumph do not cancel each other out, Despair is graphed to the left of zero to maintain its sinister meaning.

Probabilties below 0.5% were discarded.









2014-03-31

Troubleshooting collectd / statsd / Graphite

Troubleshooting Graphite can be a bother. Determining where a problem lies requires verification of the data at all of the points of communication. The best tool I've found for this is ngrep:

sudo ngrep -lqd any ping tcp dst port 2003


The following one-line command finds ping metrics submitted over TCP to Graphite and highlights them using grep:

match='ping'; sudo ngrep -lqd any "${match}" tcp dst port 2003 | grep -E --line-buffered --color=tty "${match}"


Changing the protocol and port allows easy inspection of metrics sent to a statsd listener, from carbon-aggregator to carbon-cache, etc.

See the man page for more information:

2014-03-30

Dungeon World Dice Probabilities

Overview

Each of the graphs below was created by simulating 100,000 dice rolls per Ability Score (500,000 rolls per graph and 1,500,000 total rolls). The work was inspired by A Treatise on Different Dice-rolling Mechanics in RPGs. The graphs were created using TimZehta/rpgdice · GitHub.

Graphs




2014-04-01 edit: updated graph labels.

RPG Dice

Overview

I wrote a Python program that simulates different RPG dice mechanics (rulesets) and creates graphs showing the probability of the different outcomes: TimZehta/rpgdice · GitHub!

matplotlib install

matplotlib is super painful to install on OS X Mavericks 10.9.2. I ended up creating an installation script (install_requirements.sh) to help with debugging the mess and allowing me to reliably reproduce success.

ggplot

This project was the first time I've worked with ggplot. I'm very glad for the shortcuts it provided. I would love to see it become more well known and successful.

2014-02-27

Dungeon World Monster Cards

Overview

I wrote a Python program that allows the generation of Dungeon World Monster Cards. They can be made from the source files containing the Dungeon World monsters or from custom YAML files.

I am pleased with the outcome. The formatting does not match the Dungeon World text, but the most significant changes are intentional. I think they make the cards easier to use. I especially like the way I categorized and ordered the tags.

ReportLab

This project was the first time that I've worked with the ReportLab Python module. It was very refreshing to do non-WYSIWYG layout. Overall my experience was very positive.

Results