Skip to content

Instantly share code, notes, and snippets.

View test-dac.ck
SinOsc s => dac;
3::second => now;
View test-adc.ck
adc => dac;
3::second => now;
@premek
premek / g.ck
Created Dec 28, 2016
ChucK reverb guitar effect
View g.ck
adc => NRev r => Gain AM => SinOsc od => dac;
3 => AM.op;
1 => od.sync;
day => now;
View .travis.yml
language: bash
sudo: false
install: true
addons:
apt:
packages:
- lua5.1
- python2.7
- luarocks
before_install:
View build.sh
#!/usr/bin/env bash
set -x
P="enjoy"
LV="0.10.1" # love version
LZ="https://bitbucket.org/rude/love/downloads/love-${LV}-win32.zip"
### clean
if [ "$1" == "clean" ]; then
rm -rf "target"
@premek
premek / guitar.sh
Created Jan 21, 2017
guitar start/restart/record scripts
View guitar.sh
if test "$1" = "record"; then
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck /home/pi/chuck/rec.ck:/home/pi/rec.wav &
exit
fi
if test "$1" = "play"; then
killall chuck.alsa; chuck.alsa --dac3 --adc3 --in1 --bufsize100 /home/pi/chuck/g.ck &
exit
fi
@premek
premek / AT
Created Apr 18, 2017
ESP8266 AT
View AT
AT+CWMODE=1
AT+CWJAP="SSID","secret"
AT+CIPSTART=1,"TCP","google.com",80
1,CONNECT
OK
AT+CIPSEND=1,9 (GET /)
OK
>
Recv 9 bytes
SEND OK
View parser.lua
local lpeg = require "lpeg"
lpeg.locale(lpeg)
local S,C,Ct,Cc,Cg,Cb,Cf,Cmt,P,V =
lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cc, lpeg.Cg, lpeg.Cb, lpeg.Cf, lpeg.Cmt,
lpeg.P, lpeg.V
local eof = -1
local sp = S" \t" ^0 + eof
local wh = S" \t\r\n" ^0 + eof
View sleep-at-work.sh
mpv https://www.youtube.com/watch?v=pF-3S-HTJSg -ao none -fullscreen -loop 0
View xev-back-forward.txt
Outer window is 0x2800001, inner window is 0x2800002
ButtonPress event, serial 25, synthetic NO, window 0x2800001,
root 0xdf, subw 0x0, time 1502519276, (82,51), root:(884,310),
state 0x0, button 8, same_screen YES
ButtonRelease event, serial 25, synthetic NO, window 0x2800001,
root 0xdf, subw 0x0, time 1502519424, (82,51), root:(884,310),
state 0x0, button 8, same_screen YES