I hereby claim:
- I am paulmr on github.
- I am paulmr (https://keybase.io/paulmr) on keybase.
- I have a public key ASDkCIflwoPxEaoMW6rMUjLEzKeX33uGQgLAdj-XnCdTSwo
To claim this, I am signing this object:
#!/bin/fish | |
set -l histfile ~/.x-shell-command-history | |
set -l lastcmd "" | |
if test -f $histfile | |
set lastcmd (cat $histfile) | |
end |
I hereby claim:
To claim this, I am signing this object:
AGENT_DATA_PATH=~/.ssh/agent-data | |
function s { | |
. $AGENT_DATA_PATH | |
if ssh-add -l >/dev/null 2>&1 | |
then | |
true | |
else | |
echo "not running" | |
ssh-agent >$AGENT_DATA_PATH |
// -*- mode: scala -*- | |
import scala.io.Source | |
def input(fname: String): List[List[Int]] = input(Source.fromFile(fname)) | |
def input(in: Source): List[List[Int]] = in.getLines.toList.map(_.split("[\t ]+").toList.map(_.toInt)) | |
def calc(data: List[List[Int]]) = | |
data.map(row => { |
diff --git a/def/flashepr.def b/def/flashepr.def | |
index 5e19937a..a483dfef 100644 | |
--- a/def/flashepr.def | |
+++ b/def/flashepr.def | |
@@ -73,18 +73,21 @@ DEFC FE_I28F008S5 = $89A6 ; 1Mb memory, 16 x 64K erasable sectors, 64 x 16K ba | |
; ========================================================================================== | |
-; AMD Flash Memory constants: | |
+; AMD/STMicroelectronics Flash Memory constants: |
/* testing the prose mirror bits */ | |
import jsdom from 'node-jsdom' | |
import { Document } from 'xmldom' | |
import { Node, DOMSerializer, DOMParser } from 'prosemirror-model' | |
import { EditorState } from 'prosemirror-state' | |
import * as basic from 'prosemirror-schema-basic' | |
const parser = DOMParser.fromSchema(basic.schema) |
-module(advent11). | |
-export([main/1]). | |
-record(state, { elevator = 1, floors }). | |
-define(TOP_FLOOR, 4). | |
-define(LIMIT, 120). | |
%% some housekeeping funcs for creating items | |
-define(MICRO(Cat), { microchip, Cat }). |
-module(advent25). | |
-export([main/1]). | |
-define(Start, {{1,1}, 20151125}). | |
nextN(Last) -> Last * 252533 rem 33554393. | |
nextXY({ X, 1 }) -> { 1, X + 1 }; | |
nextXY({ X, Y }) -> { X + 1, Y - 1 }. |
-module(advent21). | |
-export([main/0, main/1]). | |
winner(PD, PA, BD, BA, PHP, BHP) -> | |
Req = BHP / max(1, (PD - BA)), | |
Avail = PHP / max((BD - PA), 1), | |
Req =< Avail. | |
-define(Weapons, [ { 8, 4, 0 }, | |
{ 10, 5, 0 }, |
-module(advent18). | |
-export([main/1]). | |
-record(state, { width, height, lights }). | |
deltas() -> | |
[ { X, Y } || X <- lists:seq(-1, 1), Y <- lists:seq(-1, 1), (X =/= 0) or (Y =/= 0) ]. | |
neighbours(X, Y) -> | |
[ { X + Xd, Y + Yd } || { Xd, Yd } <- deltas() ]. |