Skip to content

Instantly share code, notes, and snippets.

View selfup's full-sized avatar
💻
doing the most

Regis Boudinot selfup

💻
doing the most
View GitHub Profile
defmodule Encrypto do
@encrypto_secret_key System.get_env("ENCRYPTO_SECRET_KEY")
@encrypto_aad_context System.get_env("ENCRYPTO_AAD_CONTEXT")
def encrypt(msg) do
decoded_key = Base.decode16!(@encrypto_secret_key)
iv = :crypto.strong_rand_bytes(32)
{ct, tag} = :crypto.block_encrypt(:aes_gcm, decoded_key, iv, {@encrypto_aad_context, msg})
@selfup
selfup / computer_burn_in.go
Last active June 14, 2020 00:40
Burn in new CPU/RAM (otherwise completely useless) | Example: go run main.go -s 128 -w 4
package main
import (
"flag"
"fmt"
"math/rand"
"os"
"sync"
"time"
)
##########################
# THIS ONLY WORKS ON LINUX
##########################
# $ amidi -l
# Dir Device Name
# IO hw:1,0,0 Elektron Digitone MIDI 1
set -e
package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
"runtime"
"strings"
"sync"
package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
"runtime"
"strings"
"sync"
#!/usr/bin/env bash
######
# This script assumes you are on Ubuntu 18.04 LTS
# Everything will be setup/installed in your home dir
######
set -e
cd $HOME
mkdir -p /usr/local
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/include
cp hl /usr/local/bin
cp libhl.dylib /usr/local/lib
cp *.hdll /usr/local/lib
cp src/hl.h src/hlc.h src/hlc_main.c /usr/local/include
#!/usr/bin/env bash
set -e
if [[ $1 == '' ]]
then
echo 'please provide a branch name to savagely squash from'
echo 'exiting'
exit 1
fi
<?xml version="1.0" encoding="UTF-8"?>
<Ableton MajorVersion="4" MinorVersion="9.0_305" SchemaChangeCount="10" Creator="1010 music bitbox">
<LiveSet>
<Tracks>
<AudioTrack Id="0">
<Name>
<EffectiveName Value=""/>
<UserName Value=""/>
</Name>
<ColorIndex Value="152"/>
<?xml version="1.0" encoding="UTF-8"?>
<document>
<session>
<cell row="0" column="0" layer="0" filename="SoundtrackLoops\SL LoFi Hip Hop Kit\KI O LoFi Pad01 Kick.WAV" type="sample">
<params gaindb="0" pitch="0" panpos="0" samtrigtype="0" loopmode="1" loopmodes="0" midimode="0" midioutchan="0" reverse="0" cellmode="0" envattack="0" envdecay="0" envsus="1000" envrel="200" samstart="0" samlen="33691" loopstart="0" loopend="33691" quantsize="3" synctype="5" actslice="1" outputbus="0" monomode="0" slicestepmode="0" chokegrp="0" dualfilcutoff="0" rootnote="60" beatcount="0" fx1send="0" fx2send="0" multisammode="0" interpqual="0" grainsize="0" graincount="3" gainspreadten="0" grainreadspeed="1000" recpresetlen="0" recquant="3" recinput="0" recusethres="0" recthresh="-20000" recmonoutbus="0"/>
<modsource dest="gaindb" src="midivol" slot="2" amount="1000"/>
<modsource dest="panpos" src="midipan" slot="2" amount="1000"/>
<modsource dest="gaindb" src="velocity"