Skip to content

Instantly share code, notes, and snippets.

View flokli's full-sized avatar
🐑
Määh!

Florian Klink flokli

🐑
Määh!
View GitHub Profile
@flokli
flokli / strace.c
Last active January 3, 2016 11:29
strace -fvv /sbin/init --system
execve("/sbin/init", ["/sbin/init", "--system"], ["HOSTNAME=bef7f6801a3d", "TERM=xterm", "PATH=/usr/local/sbin:/usr/local/"..., "PWD=/", "SHLVL=1", "HOME=/", "container=lxc", "_=/usr/sbin/strace"]) = 0
brk(0) = 0x1097000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_dev=makedev(0, 330), st_ino=34, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=40, st_size=17670, st_atime=2014/01/16-14:34:29, st_mtime=2014/01/16-14:34:29, st_ctime=2014/01/16-14:34:29}) = 0
mmap(NULL, 17670, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd45f1fc000
close(3) = 0
open("/usr/lib/libsystemd-daemon.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_dev=makedev(0, 330), st_ino=756, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=32, st_size

Keybase proof

I hereby claim:

  • I am flokli on github.
  • I am flokli (https://keybase.io/flokli) on keybase.
  • I have a public key whose fingerprint is D581 720C FA3E 9BC3 610C D996 89F2 59B8 FA0D 181F

To claim this, I am signing this object:

@flokli
flokli / gist:c1381b9328c2bce861ff
Created January 14, 2015 08:19
gluon-announce to nodeinfo
diff --git a/gluon/gluon-alfred/Makefile b/gluon/gluon-alfred/Makefile
index bb6926a..ee8ee74 100644
--- a/gluon/gluon-alfred/Makefile
+++ b/gluon/gluon-alfred/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/gluon-alfred
SECTION:=gluon
CATEGORY:=Gluon
- DEPENDS:=+gluon-core +gluon-announce +gluon-cron +alfred
+ DEPENDS:=+gluon-core +gluon-nodeinfo +gluon-cron +alfred
@flokli
flokli / gist:12165b60b749dc3e0788
Last active August 29, 2015 14:17
Download all activities from runtastic as tcx
$.each(index_data,function(){
$('<iframe/>', {
src: 'https://'+app_config.domain+user.run_sessions_path+this[0]+'.tcx'
}).appendTo('body');
});
@flokli
flokli / raspberry_pi_touch.md
Last active October 20, 2023 09:50
Raspberry Pi with LCD display

Raspberry Pi with Touch Display - Installation Instructions

Operating System

  • prepare an SD Card as described on archlinuxarm.org
  • SSH into your system, add your public key (initial root password is "root")
  • disable root password by calling passwd -d root
  • set a useful hostname by calling echo $hostname > /etc/hostname
  • run pacman -Suy to update packages

Hardware support

LCD Module

@flokli
flokli / mjpg2jpg.py
Created June 13, 2016 10:16
Serve current JPG frame via HTTP get from an MJPG stream
#!/usr/bin/env python3
import cv2
import time
from threading import Thread
from flask import Flask, Response
app = Flask(__name__)
out = None
@flokli
flokli / postgresql-docker-container.service
Last active October 6, 2016 11:39 — forked from andir/postgresql-docker-container.service
postgresql-tmpfs via socket activation
[Service]
ExecStartPre=-/usr/bin/docker rm psql-tmpfs
ExecStart=/usr/bin/docker run --rm --shm-size=2g -name psql-tmpfs -p 127.0.0.1:5434:5432 -t andir/postgresql-tmpfs
ExecStartPost=/bin/sleep 15
ExecStop=/usr/bin/docker stop psql-tmpfs
@flokli
flokli / 0001-libcap-already-patch-Make.Rules-in-prePatch.patch
Created October 22, 2017 14:59
0001-libcap-already-patch-Make.Rules-in-prePatch.patch
From 43650a93d6714236f88a202e99971e75d2c94d2c Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Sun, 22 Oct 2017 13:58:28 +0200
Subject: [PATCH] libcap: already patch Make.Rules in prePatch
Make.Rules gets already included during compilation, so set paths before
invoking make. This fixes wrong paths in libcap.pc.
---
pkgs/os-specific/linux/libcap/default.nix | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From 4a9b8648657b14382f69efd4ba70241e2d4b14f3 Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Sun, 19 Nov 2017 00:46:09 +0100
Subject: [PATCH] nm-pptp-service: remove manual path calculations, use
G_SPAWN_SEARCH_PATH
---
src/nm-pptp-service.c | 87 +++++++++------------------------------------------
1 file changed, 14 insertions(+), 73 deletions(-)
From 15a7a469957bc37915e8428f77cbcc6f2c54b364 Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Fri, 2 Feb 2018 00:37:37 +0100
Subject: [PATCH 1/2] libvirtd: remove unused imports
---
nixops/backends/libvirtd.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/nixops/backends/libvirtd.py b/nixops/backends/libvirtd.py