This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This will not work with set -e because killing ffmpeg means whole script | |
# ends. | |
set -xuo pipefail | |
dorecord() { | |
local filename="$(date "+%F_%V_%H-%M-%S").webm" | |
local start="$(date "+%s")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src | |
├── ai | |
│ ├── mage.ts | |
│ ├── merchant.ts | |
│ ├── pathfinding | |
│ │ └── pathfinder.ts | |
│ ├── priest.ts | |
│ └── ranger.ts | |
├── behaviors | |
│ ├── DeadBehavior.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Map | |
{ | |
private Dictionary<Tuple<int,int>, Tile> specialTileMap = new Dictionary<Tuple<int, int>, Tile>(); | |
private Dictionary<Tuple<int,int>, Tile> allTileMap = new Dictionary<Tuple<int, int>, Tile>(); | |
private List<Tile> fillerTileList; | |
private List<Tile> resourceTileList; | |
private List<Tile> constructionTileList; | |
const int tileCount = 40; | |
int tileWidth; | |
int tileHeight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webpack from "webpack"; | |
import path from "path"; | |
import fs from "fs"; | |
import http from "http"; | |
import querystring from "querystring"; | |
// These (1) must each match one of (2) -- see (2) below | |
const fileSlots: string[] = ["priest", "mage", "ranger", "merchant"]; | |
// get this by looking for the authentication header in an authenticated request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Day1 where | |
import Data.List | |
import qualified Data.Set as S | |
readInput :: IO [Int] | |
readInput = | |
(map (read . clean) . lines) <$> readFile "input/day1" | |
where | |
clean ('+':xs) = xs | |
clean xs = xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Day1 where | |
import Data.List | |
import qualified Data.Set as S | |
readInput :: IO [Int] | |
readInput = | |
(map (read . clean) . lines) <$> readFile "input/day1" | |
where | |
clean ('+':xs) = xs | |
clean xs = xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import timeit | |
from math import floor | |
import matplotlib.pyplot as draw | |
import scipy.io | |
import numpy as np | |
import cProfile | |
import math |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import timeit | |
from math import floor | |
import matplotlib.pyplot as draw | |
import scipy.io | |
import numpy as np | |
import cProfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.UrgencyHook | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Util.Run(spawnPipe, safeSpawn) | |
import XMonad.Util.NamedScratchpad | |
import XMonad.Util.EZConfig |