Skip to content

Instantly share code, notes, and snippets.

Avatar

val314159 val314159

View GitHub Profile
@val314159
val314159 / %filter.py
Last active Aug 22, 2020
karabiner json, stick this in ~/.config/karabiner/assets/complex_modifications/keys.json
View %filter.py
#!/usr/bin/env python3
import os, sys
from sys import argv
from os import system
prog = argv.pop(0)
frst = argv.pop(0)
last = argv.pop()
system('cat '+frst)
for fn in argv:
system('cat '+fn)
@val314159
val314159 / .README.md
Last active Jul 4, 2020
red-black trees
We couldn’t find that file to show.
View Makefile
all: ; sbcl --script test.lisp
@val314159
val314159 / Makefile
Last active Jan 1, 2020 — forked from kylemcdonald/three.js.shader.html
Minimal three.js shader example.
View Makefile
all:
open three.js.shader.html
View Makefile
combobulate:
sbcl --script $*.lisp
ecl -load $*.lisp -eval '(quit)'
ccl64 --load $*.lisp --eval '(quit)'
@val314159
val314159 / normalize.lisp
Last active Sep 6, 2019
normalize lisp syntax
View normalize.lisp
#| -*- lisp -*-
exec sbcl --script $0 $* # |#
;;≈ç√Ωπøπøˆøˆˆ©ƒ√∂
(set-dispatch-macro-character
#\# #\/ (lambda(stream subchar arg)
(declare (ignore subchar arg))
(list (quote quote) (read stream t nil t))))
(defun concat(&rest r) (apply #'concatenate #/string r))
(import #/(sb-impl::quasiquote sb-impl::unquote-splice
sb-impl::unquote-nsplice sb-impl::unquote))
@val314159
val314159 / +README.md
Created Dec 9, 2018 — forked from quiver/README.md
Who says PostgreSQL can't Pub/Sub like Redis?
View +README.md

Pub/Sub pattern with PostgreSQL's LISTEN/NOTIFY command

This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.

Publish

publish message to foo channel from user nickname.

$ python pub.py foo nickname
PUBLISH to channel #foo
@val314159
val314159 / Dockerfile
Created Oct 19, 2018
emscripten Dockerfile, slightly updated
View Dockerfile
FROM buildpack-deps:bionic
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install apt-utils
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8
RUN mkdir -p /root/emscripten/
COPY emscripten /root/emscripten/
RUN cd /root/ \
@val314159
val314159 / Makefile
Created Oct 18, 2018
Let's get explicit
View Makefile
PROG=hi
all: test
test: $(PROG) ; ./$(PROG)
clean: ; rm -fr *.{o,a,so} *~ $(PROG)
hi: hi.o
$(LD) $(LDFLAGS) $^ -o $@
hi.o: hi.c
$(CC) $(CFLAGS) -c $^ -o $@
@val314159
val314159 / Makefile
Created Oct 18, 2018
Real Quick Example
View Makefile
PROG=hi
all: test
test: $(PROG) ; ./$(PROG)
clean: ; rm -fr *.{o,a,so} *~ $(PROG)