Skip to content

Instantly share code, notes, and snippets.


Mr. However rolfen

View GitHub Profile

Setting up multiple user write permission to WWW directory

addgroup www-admin
adduser joe
adduser www-admin joe
setfacl -R -m g:www-admin:rwx /var/www
setfacl -R -m -d g:www-admin:rwx /var/www
chmod -R g+s /var/www

Warning These are for educative purposes (examples, tips, etc.). Do not blindly execute them.

Fix double separator in hash-file (double or more space -> single space)

cat meta/hash-file.list | sed -E 's/^(\S+)\s{2,}(\S.+)$/\1 \2/'

Fix windows newlines in file

rolfen /
Last active Oct 28, 2020
Git Cheatcheet

Push the local inferno branch onto the master branch on the remote named origin

git push inferno origin:master

rolfen /
Last active Apr 15, 2020
Alpine Desktop / Laptop

Using Alpine on my Old Laptop

apk add xfce4

Xfce4 Battery Widget

sudo apk add xfce4-battery-plugin
rolfen /
Last active Mar 6, 2020
Remote (wifi) control your android device through ADB

You will need to connect your phone first, using USB.

With the USB cable:

adb tcpip 5555

Find out the IP address of your phone

View DeutscheWö
De En
störrischer stubborn
bemühunngen efforts
vorübergehend temporarily
verdrangen to displace
Einschätzung assessment
fällig due
Gegenstand object
Reichweite reach
rolfen /
Last active Aug 18, 2018
Setting up a Linux server
rolfen / 0000
Last active Nov 19, 2020
Media Archive
View 0000

My Media Archive

Life without Lightroom

rolfen /
Last active May 22, 2019
Exporting multiple blobs/images from an SQL database

Exporting multiple blobs from an SQL database.

This is tested for MySQL with Linux or OSX

I was in a situation where I had images saved into an SQL table, as "blobs" and needed to export them into proper jpg files.

This relies on the SQL syntax SELECT INTO DUMPFILE. However this command can only export one row at a time.

1. Get the IDs of the rows we want to export

rolfen /
Last active May 11, 2018
Privacy Tunnel

I am concerned with:

  • Network administrator(s), ISP snopping on communications, knowing which sites I have visited
  • Cloud service providers such as Facebook, google knowing where I am through my IP

You need a Linux VPS or computer as remote. I have a Debian VPS.

Method 1: SSH tunnel

The remote should be running SSHd.