Skip to content

Instantly share code, notes, and snippets.

View armstnp's full-sized avatar
🏗️

Nathan Armstrong armstnp

🏗️
View GitHub Profile

Shard Warband - The Murkden Assault

Roster

Officers

  • Legionnaire Traikill Stormshard
  • 'Breadvet' Soho Moonshard

Soldiers

@armstnp
armstnp / ShardWB-BigIcyBridge.md
Created March 9, 2016 05:48
Shard Warband - Battle on the Big Icy Bridge

Battle on the Big Icy Bridge

Roster

  • Traikill Stormshard (Legionnaire)
  • Soho Moonshard (Breadvet)
  • Tarveth Shardblade (Quaestor)
  • Bocifus Ironhorns (Vigil Warmaster)
  • Alku Grizzlysinner
@armstnp
armstnp / micro-interpreter.clj
Created December 3, 2016 06:56
A micro interpreter presuming error-free input, based on a community challenge from codingame.
(ns Solution
(:require [clojure.string :as str])
(:gen-class))
(defn parse-int
"Parses an integer from the beginning of the given string
(in lieu of Java's Integer class)"
[s]
(with-in-str s (read)))
@armstnp
armstnp / brainf.clj
Last active June 4, 2017 23:25
Brainf*** Interpreter
(ns brainf
(:require [clojure.string :as str]))
(defn new-machine
"Creates a new untouched machine running the given instructions
and accepting the given input."
[instructions input]
{:data [0] ;; Data tape
:pos 0 ;; Data pointer index
:input input ;; Current input stream
@armstnp
armstnp / arrows-and-literals.js
Last active March 19, 2018 14:44
A Javascript Mystery...
var inlineArrowFunc = (x, y) => true;
var multilineArrowFunc = (x, y) => {
console.log(x);
return x + y;
};
var objectLiteral = { content: true };
gotoLabel:
require_relative 'api/endpoints'
module SDK
# Sheet resource endpoints
class Sheets
extend SDK::API::Endpoints
attr_reader :token
private :token
Desert Highlands - Cave near [&BCUKAAA=] (Wayment Seep) - High Vault
Ability:
DisplayName: "Cloak & Dagger"
RefName: skill_cloakanddagger_2
Description: "Expertly move past two opponents, switching places and bleeding them in the process!"
ShortDescription: "Switch places with and attack two targets in a row. Requires two targets."
ExtraDescription: "Damage: 150% of Weapon Power as Physical, adds Mild Bleed (45% Weapon Power per turn). Deals 20% more damage to enemies in a Smoke Cloud."
IconSprite: SkillIcons_28
DisplayInList: 0
Range: 1
CooldownTurns: 7
@armstnp
armstnp / AdventOfCode2016-Day1.st
Last active November 2, 2017 19:40
Advent of Code 2016 - Day 1 in Pharo Smalltalk
Object subclass: #AdventInputFile
instanceVariableNames: 'content'
classVariableNames: ''
poolDictionaries: ''
category: 'AdventOfCode2016'
!
!AdventInputFile methodsFor: 'parsing' stamp: 'NathanArmstrong 10/30/2017 00:01'!
splitBy: separator
@armstnp
armstnp / navi.rb
Created January 21, 2018 04:54
Discord Rollbot 'Navi'
require 'discordrb'
require 'discordrb/webhooks'
require 'discordrb/webhooks/embeds'
if ARGV[0] == "-d" then
$stdout.reopen("~/out.log", "w")
$stderr.reopen("~/err.log", "w")
Process.daemon(true, true)
end