Skip to content

Instantly share code, notes, and snippets.

@chicken-suop
chicken-suop / svn_stash
Created March 17, 2024 23:34
# Stashes svn files (tracked & untracked)
#!/bin/bash
rootDir=~/code/svn-stash
function stash {
today=$(date +"%Y-%m-%d-%H-%M-%S")
patchName=$rootDir/$today.patch
newFiles=$(svn status --no-ignore | grep -E '(^\?)|(^\I)' | sed -e 's/^. *//')
echo 'Include unversioned files?'
# !/bin/bash -x
set -e -o pipefail
# I follow [this](https://emscripten.org/docs/getting_started/downloads.html) to install emscripten manually
# then source the env file
source ../emsdk/emsdk_env.sh
# I manually run these steps to compile x264
# cd ~/ffmpeg/
# FFmpeg config args:
# Base CONFIG_ARGS
--target-os=none # use none to prevent any os specific configurations
--arch=x86_32 # use x86_32 to achieve minimal architectural optimization
--enable-cross-compile # enable cross compile
--disable-x86asm # disable x86 asm
--disable-inline-asm # disable inline asm
--disable-stripping # disable stripping
--disable-programs # disable programs build (incl. ffplay, ffprobe & ffmpeg)
const timeout = 1000;
this.stream = await navigator.mediaDevices.getUserMedia({ audio: true });
const recorder = new MediaRecorder(this.stream);
recorder.addEventListener('dataavailable', ({ data }) => this.upload(data));
recorder.addEventListener('stop', () => {
recorder.start();
setTimeout(() => recorder.stop(), timeout);
});
recorder.start();
[user]
name = Elliot Schep
email = ****
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=1,5 -R
editor = /usr/bin/atom
[credential]
helper = osxkeychain
[alias]
@chicken-suop
chicken-suop / regenMac
Last active May 12, 2022 20:09
Disassociate, generate new mac, reconnect
#!/bin/bash
# arp -ani en0
# ^^ Get MAC addrs of other users on same network.
# Change en0 to your network interface.
# On macos, this can be seen through:
# networksetup -listallhardwareports
# sudo ifconfig en0 ether $MAC
# ^^ replace $MAC with an addr from above command