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 / alpine glibc.md
Last active March 15, 2018 15:22
download alpine glibc

alpine glibc

apk add --update ca-certificates wget
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-2.27-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-bin-2.27-r0.apk
apk add glibc-2.27-r0.apk glibc-bin-2.27-r0.apk
@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