Skip to content

Instantly share code, notes, and snippets.

View teemow's full-sized avatar

Timo Derstappen teemow

View GitHub Profile
#!/bin/sh
ns=my-namespace
in_ns="ip netns exec $ns"
# set up namespace
ip netns add $ns
$in_ns ip link set dev lo up
# add veth interfaces and move one to the namespace
lxc.utsname=my-container
lxc.autodev=1
lxc.tty=1
lxc.pts=1024
lxc.rootfs=/home/teemow/.lxc/my-container/rootfs
lxc.mount=/home/teemow/.lxc/my-container/fstab
lxc.cap.drop=mknod sys_module mac_admin mac_override
lxc.kmsg=0
lxc.stopsignal=SIGRTMIN+4
#networking

ambassador.service

[Service]
Type=notify
ExecStart=/bin/bash /home/core/ambassador.sh %n registry 5000
ExecStop=/usr/bin/docker stop %n
ExecStopPost=/usr/bin/docker rm %n
NotifyAccess=all

[Unit]

Keybase proof

I hereby claim:

  • I am teemow on github.
  • I am teemow (https://keybase.io/teemow) on keybase.
  • I have a public key whose fingerprint is 43F3 8C03 302C CD02 D29E C068 C8A8 E3F2 3BAB 4599

To claim this, I am signing this object:

#include <ESP8266WiFi.h>
#include <ESP8266httpUpdate.h>
#include <PubSubClient.h>
#include <DHT.h>
#include <EEPROM.h>
const char *ssid = "";
const char *pass = "";
const char *room = "";
const char *update_server = "192.168.15.1";
@teemow
teemow / sign-intel-ucode.hook
Created October 2, 2019 15:23
pacman hooks for kernel signing
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = intel-ucode
[Action]
Description = Sign the intel ucode for secure boot
Depends = sbsigntools
When = PostTransaction
@teemow
teemow / fetch_subtitles.sh
Last active May 14, 2023 18:03
fetch youtube playlist with title, description and subtitles of each video and train gpt with the information
#!/bin/bash
set -eu
FOLDER=$1
PLAYLIST=$2
rm -f playlist.txt
mkdir -p $FOLDER
yt-dlp --flat-playlist -i --print-to-file url playlist.txt $PLAYLIST