Skip to content

Instantly share code, notes, and snippets.

@timvisher
timvisher / -
Created November 28, 2014 04:37
==> /var/log/syslog <==
Nov 27 23:34:48 ssm-netbook bluetoothd[1057]: Discovery session 0x7f841c580220 with :1.121 activated
Nov 27 23:34:53 ssm-netbook bluetoothd[1057]: Discovery session 0x7f841c584e60 with :1.112 activated
Nov 27 23:35:03 ssm-netbook bluetoothd[1057]: Stopping discovery
Nov 27 23:35:05 ssm-netbook bluetoothd[1057]: Discovery session 0x7f841c580220 with :1.112 activated
Nov 27 23:35:15 ssm-netbook bluetoothd[1057]: Stopping discovery
Nov 27 23:35:22 ssm-netbook bluetoothd[1057]: Discovery session 0x7f841c583a90 with :1.122 activated
package main
import (
"fmt"
"io/ioutil"
"math/rand"
"os"
"strings"
"time"
)
(ns async-playground
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :refer [>! <! chan]]))
(def ichan (chan))
(go (while true
(let [o (<! ichan)]
(println o))))
(ns nhss.ui
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [goog.events :as events]
[goog.events.KeyCodes]))
(defn init []
(events/listen (.-body js/document)
(.-KEYUP events/EventType)
(fn [e]
(.log js/console (.-keyCode e))
@timvisher
timvisher / -
Created December 12, 2014 21:08
what-does-test-check-do-qmark.core-test> (pprint (test-straight-flush-vs-four-of-a-kind
))
{:result false,
:seed 1418418372176,
:failing-size 0,
:num-tests 1,
:fail
[[{:color "White", :cards [[3 \C] [5 \C] [7 \C] [6 \C] [4 \C]]}
{:color "Black", :cards [[6 \D] [8 \D] [8 \C] [8 \H] [8 \S]]}]],
:shrunk
@timvisher
timvisher / -
Created December 17, 2014 19:47
==> Reinstalling nethack4
rm /usr/local/bin/nethack4
rm /usr/local/bin/tilecompile
rm /usr/local/share/doc/nethack4
rm /usr/local/share/games
rm /usr/local/share/man/man5/nh4ct.5
rm /usr/local/share/man/man6/nethack4.6
rm /usr/local/share/man/man6/tilecompile.6
==> Cloning https://gitorious.org/nitrohack/ais523.git
git --git-dir /Library/Caches/Homebrew/nethack4--git/.git status -s
@timvisher
timvisher / -
Created December 17, 2014 19:48
==> Reinstalling nethack4
rm /usr/local/bin/nethack4
rm /usr/local/bin/tilecompile
rm /usr/local/share/doc/nethack4
rm /usr/local/share/games
rm /usr/local/share/man/man5/nh4ct.5
rm /usr/local/share/man/man6/nethack4.6
rm /usr/local/share/man/man6/tilecompile.6
==> Cloning https://gitorious.org/nitrohack/ais523.git
git --git-dir /Library/Caches/Homebrew/nethack4--git/.git status -s
(ns nhss.standard-level-data-macros)
(defn features []
{:down-stair \>
:up-stair \<
:space \·
:boulder \0
:hole \^
:player \@
:empty \space
@timvisher
timvisher / playerselect.h
Last active August 29, 2015 14:13
Test Random Players in nh4?
#ifndef PLAYERSELECT_H
#define PLAYERSELECT_H
nh_bool
player_selection(int *out_role, int *out_race, int *out_gend, int *out_align, int randomall);
#endif
@timvisher
timvisher / -
Created January 13, 2015 13:40
🐘 ../aimake -i ~/testplayerselect --without=gui ..
Please use an empty directory for starting new builds. at ../aimake line 7900.
at ../aimake line 6270.
main::__ANON__('Please use an empty directory for starting new builds. at ../...') called at ../aimake line 7900