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
#!/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 |
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
#!/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 |
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
id = lambda v: v | |
def trampoline(f, *args): | |
v = f(*args) | |
while callable(v): | |
v = v() | |
return v | |
def fact_cps_thunked(n, k): |
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
#lang racket | |
(define (trampoline fn . args) | |
(if (empty? args) | |
(let ([ret (fn)]) | |
(if (procedure? ret) | |
(trampoline ret) | |
ret)) | |
(trampoline (lambda () (apply fn args))))) |
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
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 |
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 org.ensime.EnsimeKeys._ | |
ensimeIgnoreMissingDirectories := true |
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
#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]' \ |