Usage:
fun main(){
val canvas = document.createElement("canvas") as HTMLCanvasElement
canvas.width = 800
canvas.height = 600
val gl = canvas.getContext("webgl2") as WebGL2RenderingContext
# git branch -vv (verbose) marks deleted branches with : gone | |
git branch -vv | rg gone | fzf -m --bind ctrl-a:select-all | awk '{print $1}' | xargs -I {} git branch -D '{}' |
docker run --rm -it --network=host -e http_proxy="$HTTP_PROXY" -e https_proxy="$HTTPS_PROXY" -v $PWD/corporate_proxy.crt:/usr/local/share/ca-certificates/proxy.crt --entrypoint /bin/sh alpine -c "cat /usr/local/share/ca-certificates/proxy.crt >> /etc/ssl/certs/ca-certificates.crt; /bin/sh" |
# output path to child directories which contain a .git folder | |
alias findgitdirs='find . -maxdepth 2 -type d -name ".git" | sed -e "s|/.git||"' | |
gitall(){ | |
# execute the argument as a git command in all (git) subdirectories | |
# if there are no arguments then print all of the directorries that would be used | |
if [ "$#" -eq 0 ]; then findgitdirs; return; fi | |
findgitdirs | xargs -I{} git -C {} "$@" | |
} |
echo "enable proxy for http/https traffic" | |
gsettings set org.gnome.system.proxy.http host 'localhost' | |
gsettings set org.gnome.system.proxy.http port '8089' | |
gsettings set org.gnome.system.proxy.https host 'localhost' | |
gsettings set org.gnome.system.proxy.https port '8089' | |
gsettings set org.gnome.system.proxy mode 'manual' | |
mitmweb --listen-port 8089 --web-port 8083 | |
gsettings set org.gnome.system.proxy mode 'none' | |
echo "" | |
echo "disable proxy" |
source ~/.vimrc | |
set ideamarks | |
set ideaput | |
set showmode | |
" ideavim plugins | |
" https://github.com/JetBrains/ideavim/wiki/Emulated-plugins | |
set NERDTree | |
set commentary | |
set argtextobj |
package util.coroutines.restorable | |
import screeps.api.MutableRecord | |
import screeps.api.get | |
import screeps.api.keys | |
import screeps.api.set | |
import screeps.utils.unsafe.delete | |
import kotlin.coroutines.Continuation | |
import kotlin.coroutines.CoroutineContext | |
import kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED |
docker_ps_formatted(){ docker ps -a --format "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}" } | |
# dockerg [ARGS] SEARCH | |
# basically docker ps | grep SEARCH | xargs docker ARGS | |
# but all args are optional | |
# e.g. 'dockgerg bank' -> check which services are found; dockgerg logs --tail 15 bank -> log the service | |
# e.g. 'dockerg start Exited' -> start all containers with status 'Exited' | |
dockgerg(){ | |
if [ "$#" -eq 0 ]; then docker_ps_formatted; return; fi | |
SEARCH=${@:$#}; | |
if [ "$#" -eq 1 ]; then docker_ps_formatted | grep $SEARCH; return; fi |
.soutv : print an expression to System.out | |
ARRAY → System.out.println("\n\n$escapedExpr*:escapeString(expr)$ = " + java.util.Arrays.toString($expr$) + "\n"); | |
NON_VOID → System.out.println("\n\n$escapedExpr*:escapeString(expr)$ = " + $expr$ + "\n"); |