Skip to content

Instantly share code, notes, and snippets.

@Xom
Xom / .vimrc
Last active October 12, 2015 04:18
.vimrc
" http://stevelosh.com/blog/2010/09/coming-home-to-vim
set modelines=0
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set encoding=utf-8
set scrolloff=3
@Xom
Xom / fizzbuzz.pl
Last active December 20, 2015 04:19
fizzbuzz.pl
#!/usr/bin/env perl
use constant ANIMATE => 0;
use if ANIMATE, Time::HiRes => qw( usleep );
$anim_delay = 10000;
$_ = 100;
$_ .= 'n';
@Xom
Xom / anags.pl
Created July 27, 2013 21:00
anags.pl This is a xchat2 plugin. Get dict.txt from http://xomnom.com/dict.txt
#!/usr/bin/perl
#
# Anagrams game script by Xomnom
# last modified: 2010 Mar. 4
use strict;
use Math::Random::MT::Perl qw(srand rand);
my $version = '1.8';
Xchat::register 'ANAGS', $version, '', '';
srand();
my $status = 0;
@Xom
Xom / devnotes.txt
Last active December 20, 2015 21:09
pongvoll.asm Get binary from http://xomnom.com/pongvoll.zip
PONG VOLLEYBALL
--
NOTES FROM 2013:
Xomnom
https://gist.github.com/xomnom
Pong Volleyball and this report on it were originally written for a class
project. Some personal information has been removed from these files.
@Xom
Xom / helper.html
Last active December 21, 2015 03:38
saltybayes.pl See readme.txt for excuses.
<html>
<head>
<title>SaltyBayes Helper</title>
<script type="text/javascript">
function heightcomp()
{
if (document.getElementById("hc_same").checked) {
return " = ";
} else if (document.getElementById("hc_mtt").checked) {
return " } ";
@Xom
Xom / hsas.pl
Created October 7, 2013 01:32
Inserts HSAS comments into IRC logs.
#!/usr/bin/env perl
use strict;
use warnings;
use lib '/home/frobozz/perl5/lib/perl5';
use Text::CSV;
use File::Slurp;
use JSON -support_by_pp;
use Time::Format qw( time_strftime );
@Xom
Xom / checkboxen.html
Last active January 5, 2017 09:14
Firebase checklist
<html>
<head>
<title>A checklist that syncs via Firebase</title>
<script type='text/javascript' src='https://cdn.firebase.com/v0/firebase.js'></script>
<script>
var fbref_checkboxen = new Firebase('https://checkboxen.firebaseio.com/');
fbref_checkboxen.on('child_added', function(snapshot) {
var sid = sanitize_id(snapshot.name());
var sstr_text = sanitize(snapshot.val().text, true);
@Xom
Xom / Back Template.txt
Created November 20, 2014 19:36
Card Types for Tsumego
{{FrontSide}}{{Extra}}
@Xom
Xom / xhr.js
Created February 26, 2017 04:04
XMLHttpRequest wrapped in ES6 Promise
// https://github.com/mdn/js-examples/blob/master/promises-test/index.html
xhr = function(url, responseType) {
return new Promise(function(resolve, reject) {
var request = new XMLHttpRequest();
request.open('GET', url, true);
request.responseType = responseType;
request.onload = function() {
if (request.status === 200) {
resolve(request.response);
} else {
@Xom
Xom / cincopaus_orderedpairs.csv
Last active June 2, 2018 16:24
Cinco Paus wand effects ordered-pairs cooccurrence table using atseajournal.com data as of May 2018
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 50 columns, instead of 23. in line 4.
Cinco Paus wand effects ordered-pairs cooccurrence table using atseajournal.com data as of May 2018,Bleed,Break Wall,Build Wall,Called Shot,Charge Right,Chargeable,Charm Ghost,Continuing Ray,Corpse Explode,Corpse Treasure,Double Hit,Duplicate,Earthquake,Execute,Explode,Find Treasure,Forget,Freeze Left,Gem Kill,Grab Treasure,Heal Bottom,Hit,Identify,Instant,Kill Frog,Kill Lizard,Kill Rooster,Kill Twin,Move Door,Next Man Down,Niche Treasure,Penetrating Ray,Pillar Treasure,Polymorph,Proc Hit,Protect,Refracting Ray,Refresh Top,Short Ray,Shrimp Cocktail,Side Hit,Sleep,Slingshot,Spawn Shrimp,Teleport Other,Teleport Self,Thorn,Wall Hit,Wormhole
Bleed,0,4,7,0,15,2,0,3,0,1,0,1,0,0,7,3,0,4,0,3,8,0,2,6,0,0,0,4,3,0,4,7,7,6,10,8,4,9,3,0,6,9,0,3,5,6,4,9,1
Break Wall,2,0,0,5,5,3,5,2,1,1,1,2,3,6,9,1,1,1,4,5,3,3,5,5,8,6,1,2,3,6,0,8,0,1,5,4,2,5,3,5,6,3,1,1,1,2,3,4,2
Build Wall,5,6,0,6,6,3,7,0,2,0,3,0,6,0,7,1,2,1,2,2,9,2,4,3,6,2,5,3,1,3,3,5,2,4,5,8,1,5,1,2,8,5,2,1,6,3,8,5,2
Called Shot,3,3,2,0,5,2,2,2,1,1,1,1,2,6,6,0,0,3,0,3,6,