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/bash | |
main() { | |
# exit if not root | |
if [ $(id -u) -ne 0 ]; then | |
echo "This installer must be run as root." | |
exit 4 | |
fi | |
# install deps | |
apt-get install g++ bison flex libasound2-dev libjack-jackd2-dev |
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/bash | |
# Run magic lantern bash files | |
function run_scripts { | |
local -i n=$1; shift | |
local scripts="$@" | |
while [[ $(echo $scripts | tr ' ' '\n' | wc -l) -gt $n ]] | |
do | |
local head=$(echo $(echo $scripts | tr ' ' '\n' | head -"$n")) |
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/bash | |
function main { | |
local card="$1"; shift | |
local vol="$1"; shift | |
for n in 0 1 2 3 4 5 6 7 8 9 | |
do | |
amixer -c $card sset Multi,$n ${vol}%,${vol}% unmute | |
done | |
} |
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
mkcd() { mkdir -p "$@" && cd "$@"; } |
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
#!/usr/bin/env expect | |
set login [lindex $argv 0] | |
set password [lindex $argv 1] | |
set cmd [lrange $argv 2 end] | |
spawn ssh $login | |
expect { | |
"assword:" { |
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
#!/usr/bin/env expect | |
set timeout 120 | |
set login [lindex $argv 0] | |
set password [lindex $argv 1] | |
set f [lindex $argv 2] | |
set r [lindex $argv 3] | |
spawn scp $f $login:$r |
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
static int | |
read_packet(midi_t midi, | |
unsigned char *buf, | |
unsigned int channel_num, | |
unsigned int modded_packet_num, | |
err_t err) { | |
const int checksum_byte = 125; | |
const time_t timeout_sec = 1; | |
int raw_bytes_read, bytes_read; | |
char strbuf[500]; strbuf[0] = '\0'; |
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
sed ':a;N;$!ba;s/\n/ /g' |
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/bash | |
# | |
# Convert all soundfiles of a particular type located in the | |
# current directory to wav. | |
# | |
function convertToWav { | |
local ext="$1"; shift | |
for f in *.${ext}; do |
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
{ SinOsc.ar }.play; |
OlderNewer