Skip to content

Instantly share code, notes, and snippets.

View 3tty0n's full-sized avatar

YUSUKE IZAWA 3tty0n

View GitHub Profile
@3tty0n
3tty0n / build-emacs.sh
Created March 12, 2023 04:54
Build emacs on Ubuntu 22.04
#!/bin/sh
sudo apt install autoconf
sudo apt-get install build-essential texinfo libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev gnutls-dev libgtk-3-dev
./autogen.sh
./configure --with-native-compilation --with-x-toolkit=gtk3
#!/bin/sh
trap break INT
while true
do
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video10
done
trap - INT
id = lambda v: v
def trampoline(f, *args):
v = f(*args)
while callable(v):
v = v()
return v
def fact_cps_thunked(n, k):
#lang racket
(define (trampoline fn . args)
(if (empty? args)
(let ([ret (fn)])
(if (procedure? ret)
(trampoline ret)
ret))
(trampoline (lambda () (apply fn args)))))
type msg = int list
type key = int
let string_of_msg msg =
msg |> List.map (fun x -> string_of_int x) |> String.concat ""
let rot key msg =
msg |> List.map begin fun x ->
(x + key) mod 26
@3tty0n
3tty0n / global.sbt
Created September 21, 2018 17:10
My global.sbt
import org.ensime.EnsimeKeys._
ensimeIgnoreMissingDirectories := true
@3tty0n
3tty0n / _gol
Last active August 28, 2017 05:18
completion for gol in zsh
#compdef gol
function _gol {
local context curcontext=$curcontext state line
declare -A opt_args
local ret=1
_arguments -C \
'(-h --help)'{-h,--help}'[show help]' \
'(-v --version)'{-v,--version}'[print the version]' \