Skip to content

Instantly share code, notes, and snippets.

View untoreh's full-sized avatar
🐭
munch...

Francesco Giannelli untoreh

🐭
munch...
View GitHub Profile
@untoreh
untoreh / getalp.md
Last active March 19, 2018 11:46
fetch an alpine chroot

getalp

wget -qO- https://raw.githubusercontent.com/untoreh/scripts/utils/deploy/getalp | bash

@untoreh
untoreh / PATH.md
Created January 18, 2018 14:23
default path

PATH

echo "export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> ~/.profile
@untoreh
untoreh / gitsync.md
Last active January 16, 2018 11:15
sync files over git

gitsync

GIT_SYNC_FILES=${GIT_SYNC_FILES:-$(find -name "*.?db")}
GIT_REPO_PATH=${GIT_REPO_PATH:-~/chain}

for f in "$GIT_SYNC_FILES"; do
  ln $f $GIT_REPO_PATH
done
@untoreh
untoreh / compile with custom libs and ld folder.md
Created January 5, 2018 14:48
ld.so name of custom dynamic linker path

compile with custom libs and ld folder

VARS

LD_RUN_PATH='$ORIGIN' RPATH='$ORIGIN'

FLAGS

-Wl,--dynamic-linker=ld.so

@untoreh
untoreh / build static go.md
Created January 5, 2018 06:57
build a stripped golang binary with statically linked c

build static go

-s -w for stripping

go build --ldflags '-s -w -linkmode external -extldflags "-static"' main.go

@untoreh
untoreh / i3-move
Created April 10, 2017 11:27
incremental steps i3wm window move command
#!/bin/sh
verse=$1
stu=20
tapf=/tmp/i3-tap
stepf=/tmp/i3-step
verf=/tmp/i3-verse
if [ ! -f $tapf ] ; then
echo `date +%s` > $tapf
fi