Skip to content

Instantly share code, notes, and snippets.

@tckmn
tckmn / gist:29944a7b8e757a7586d4
Created July 18, 2014 12:39
List of languages used on codegolf.stackexchange.com
PYTHON : 1828
JAVASCRIPT : 993
RUBY : 893
C : 856
PERL : 810
GOLFSCRIPT : 663
MATHEMATICA : 537
HASKELL : 530
PHP : 507
JAVA : 422
@tckmn
tckmn / gist:e339f05adc303681b8eb
Created November 8, 2014 16:12
(Almost) all Nethack messages
src/allmain.c:31: You("are lucky! Full moon tonight.");
src/allmain.c:34: pline("Be careful! New moon tonight.");
src/allmain.c:38: pline("Watch out! Bad things can happen on Friday the 13th.");
src/allmain.c:202: You("pass out from exertion!");
src/allmain.c:367: You("sink below the surface and die.");
src/allmain.c:370: Norep("You sink deeper into the lava.");
src/allmain.c:434: You("stop %s.", occtxt);
src/allmain.c:569: pline(new_game ? "%s %s, welcome to NetHack! You are a%s %s %s."
src/apply.c:59: pline("Using your camera underwater would void the warranty.");
src/apply.c:65: pline(nothing_happens);
@tckmn
tckmn / gist:8078a34e3287ec32dadf
Created November 8, 2014 16:31
(Almost) all Nethack messages, more gooder version (much better)
pager.c:344 pline("Cannot open data file!")
pager.c:467 pline("? Seek error on 'data' file!")
pager.c:482 pline("I don't have any information on those things.")
pager.c:578 pline("Please move the cursor to %s.", what_is_an_unknown_object)
pager.c:581 pline("Pick an object.")
pager.c:815 pline("%s", out_str)
pager.c:825 pline("I've never heard of such things.")
pager.c:865 pline("That is %s%s%s.", an(defsyms[trap_to_defsym(tt)].explanation), !trap->madeby_u ? "" : (tt == WEB) ? " woven" : <x> <x> <x> (tt == HOLE || tt == PIT) ? " dug" : " set", !trap->madeby_u ? "" : " by you")
pager.c:876 pline("I can't see a trap there.")
pager.c:891 pline("Cannot open data file!")
@tckmn
tckmn / browserquest-autosetup.sh
Created February 1, 2015 04:38
Local Browser Quest autosetup
#!/bin/bash
git clone https://github.com/mozilla/BrowserQuest.git
cd BrowserQuest
sudo sed -i 's/>0/>0.0.0/' package.json
sudo sed -i '/websocket-server/d' package.json
git clone https://github.com/miksago/node-websocket-server node_modules/websocket-server
sudo npm install
@tckmn
tckmn / so-survey.txt
Created February 2, 2015 22:50
My Stack Overflow survey answers
In what country do you currently reside?
United States
What city or town do you live in?
Houston
How old are you?
<20
What is your gender?
Male
Tabs or Spaces?
Spaces
@tckmn
tckmn / pentachatdyl.user.js
Last active October 20, 2015 23:51
Pentachatdyl: Fix chat + Firefox + Pentadactyl
// ==UserScript==
// @name Pentachatdyl
// @namespace http://keyboardfire.com/
// @description Fix chat + Firefox + Pentadactyl
// @include *://chat.stackexchange.com/*
// @include *://chat.meta.stackexchange.com/*
// @include *://chat.stackoverflow.com/*
// @include *://dystroy.org/miaou/*
// @include *://*.slack.com/*
// @version 1
@tckmn
tckmn / languages.txt
Created June 25, 2015 07:52
Language usage on codegolf.SE, updated version
python: 3325
javascript: 1823
ruby: 1366
c: 1320
perl: 1239
golfscript: 933
haskell: 877
mathematica: 818
java: 804
php: 774
@tckmn
tckmn / nethack-scroll-priceid-chart.rb
Created July 4, 2015 13:51
ASCII price ID chart for scrolls in Nethack
#!/usr/bin/env ruby
base_prices = [20, 50, 60, 80, 100, 200, 300]
rows = ['Base', 'Ch<6', '6-7', '8-10', '11-15', '16-17', '18', '19-25', 'Sell']
rows.map! {|x| [x] }
cha_mods = [
nil, # (base)
->x { x*2 }, # <6
@tckmn
tckmn / fractal.py
Created November 7, 2015 19:36
fractal test thing
#!/usr/bin/env python
from PIL import Image
import random
import math
w = 500
h = 500
img = Image.new('RGB', (w, h))
@tckmn
tckmn / a.pl
Created November 21, 2015 02:41
Me trying to learn Perl...
#!/usr/bin/perl
use strict;
use warnings;
use 5.10.0; # for "say"
# scalar: $ array: @ hash: %
# FOR NUMBERS: < > <= >= == != <=> + * []
# FOR STRINGS: lt gt le ge eq ne cmp . x {}
# array basics