Skip to content

Instantly share code, notes, and snippets.

View genevera's full-sized avatar

genevera (she/her) genevera

  • Queens, NY
View GitHub Profile
@genevera
genevera / mkappbundle6
Created July 31, 2021 16:58
Makes an app bundle for ardour 6
#!/bin/sh
PREFIX=$1
mkdir -p $PREFIX/Ardour6.app/Contents/MacOS
mkdir -p $PREFIX/Ardour6.app/Contents/Resources
sed -e "s?@ENV@??g" \
-e "s?@VERSION@?6?g" \
-e "s?@INFOSTRING@??g" \
-e "s?@IDSUFFIX@?Ardour6?g" \
-e "s?@BUNDLENAME@?Ardour6?g" \
-e "s?@EXECUTABLE@?Ardour6?g" < Info.plist.in > $PREFIX/Ardour6.app/Contents/Info.plist
@genevera
genevera / .skhdrc
Created March 23, 2021 22:01 — forked from armand1m/.skhdrc
⚙️ My yabai and skhd configuration files.
# open terminal
cmd - return : open -n -a kitty.app
# open chrome
cmd + shift - return : open -n -a "Google Chrome"
# moves focus between windows in the current focused display
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
@genevera
genevera / termux
Last active May 16, 2021 17:53 — forked from rewida17/termux
Run termux env via eg adb shell
#!/data/data/com.termux/files/usr/bin/bash
#Based on https://github.com/termux/termux-app/issues/77
export PREFIX='/data/data/com.termux/files/usr'
export HOME='/data/data/com.termux/files/home'
export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib'
export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:$PATH"
export LANG='en_US.UTF-8'
export SHELL='/data/data/com.termux/files/usr/bin/bash'
export BIN='/data/data/com.termux/files/usr/bin'
export TERM=screen
@genevera
genevera / svc_bounce.zsh
Last active April 13, 2019 20:54
ZSH function to stop and restart a service under launchd - written on high sierra 10.13.6 for zsh 5.7.1
################################################################################
# restarts a service in launchd. assumes you have
# https://github.com/MarkTiedemann/countdown-cli installed. but will run `sleep`
# if you don't.
#
# usage: svc_bounce domain/svc_target timeout
# timeout is needed so launchd can shut the service down gracefully.
################################################################################
function svc_bounce() {
local -r svc="${1}";
@genevera
genevera / docker-x11.bash
Created January 20, 2019 06:31 — forked from kiki67100/docker-x11.bash
Docker macOS X11 display
### Script to install xquartz and set the DISPLAY variable correctly, find the listen port and add current ip to connect to X11.
#skip if you want, install xquartz
brew cask reinstall xquartz
#get ip
IP=$(ifconfig|grep -E inet.*broad|awk '{ print $2; }')
#open XQuartz
open -a XQuartz &
#Go to preference Security check allow network, restart :
read -p "Go to preference Security check allow network and press a key to continue"
@genevera
genevera / strace.sh
Last active May 23, 2023 10:41
spoofing strace for htop on mac os x
#!/usr/local/bin/genv /usr/local/bin/bash
args_modded="-a $(echo ${*}| sed 's/-s 512//')";
exec /usr/bin/sudo -E /usr/bin/dtruss ${args_modded}
@genevera
genevera / gist:ca2b3fdf59236948b692d76f56581a4c
Created June 5, 2018 21:04
vim regex to fix bash variable name formatting
:%s/\$\([A-Za-z_]\+\)/${\1}/g
:'<,'>s/export \(.*\)="\$\({.*}\)"/export \1="\${\1}"/g 
@genevera
genevera / vpnnat.conf
Last active June 8, 2020 01:25
pfctl NAT for VPN
lan="{192.168.64.0/24}"
vpn="{ VPN_RANGE_GOES_HERE }"
ext_if="bridge100"
vpn_if="utun0"
nat on $ext_if from $lan to $vpn -> ($ext_if)
nat on $vpn_if from $lan to $vpn -> ($vpn_if)
@genevera
genevera / rename-apk-namespace
Created February 15, 2017 18:59 — forked from vavrecan/rename-apk-namespace
Script that allows renaming namespace of Android APK so you can install same application multiple times
#!/bin/bash
# author Marek Vavrecan ([email protected])
# show usage
[ $# -eq 0 ] && { echo "Usage: $0 [apk path] [source namespace] [target namespace]"; exit 1; }
APK_PATH="$1"
NAMESPACE_FROM="$2"
NAMESPACE_TO="$3"