Skip to content

Instantly share code, notes, and snippets.

View kwmiebach's full-sized avatar

kwmiebach kwmiebach

View GitHub Profile
@kwmiebach
kwmiebach / get_toml_value.sh
Last active September 13, 2025 17:26
Read values from a simple toml file in bash
#######################################################################################
# Bash function get_toml_value() to get the value of a key in a section of a TOML file.
# Versioned here: https://gist.github.com/kwmiebach/e42dc4a43d5a2a0f2c3fdc41620747ab
# Call it like this:
# value=$(get_toml_value "./conf/config.toml" "server_b" "domain")
# Result should be "my123.example.com" in the case of this example file:
# ---------------------------
# [server_a]
# proto = "https"
# domain = "test.example.net"
@kwmiebach
kwmiebach / petl_sequence.py
Last active August 2, 2023 15:56
add a 1-based seqence column to a petl table
'''
Versioned here:
https://gist.github.com/kwmiebach/362a41b0fbf0cad6db36a1e037bcfbe6
'''
def add_seq(tab,name='seq',position=0):
# NO, PETL IS CURRENTLY BROKEN - depending on python version
# tab = ETL.addrownumbers(tab, 'seq')
import petl as ETL
@kwmiebach
kwmiebach / tutor.txt
Created April 16, 2022 11:16
helix-editor tutor
_ _ __ __
| | | | _ \ \ / /
| |_| | ___ | | (_) \ \/ /
| _ | / _ \ | | _ ) (
| | | | | __/ | | | | / /\ \
|_| |_| \___| |_| |_| /_/ \_\
A post-modern modal text editor.
_________________________________________________________________
@kwmiebach
kwmiebach / SpaceVim.md
Created March 9, 2022 18:31 — forked from bespokoid/SpaceVim.md
SpaceVim cheatsheet #tools
@kwmiebach
kwmiebach / .tmux.conf
Created March 6, 2022 10:19 — forked from mortn/.tmux.conf
tmux F key bindings on FreeBSD - since there's no Byobu :-/
# First remove *all* keybindings
unbind-key -a
source ~/.tmux.conf-f-keys
source ~/.tmux.conf-colors
@kwmiebach
kwmiebach / notes.py
Last active October 6, 2025 19:14 — forked from IdanBanani/notes.py
Fork of IdanBanani/notes.py
# -*- coding: utf-8 -*-
# To list this file sections: $ grep '^"" ' notes.py
"""""""""""""
"" Why Python ?
"""""""""""""
- extremely readable (cf. zen of Python + [this 2013 study](http://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/))
- simple & fast to write
- very popular (taught in many universities)
- has an extremely active development community
@kwmiebach
kwmiebach / amazon.txt
Last active April 20, 2021 05:13
amazon dhl gls dpd
https://sellercentral-europe.amazon.com/gp/help/202068180?language=de_DE&ref=ag_202068180_cont_201817070
Name des Transportunternehmens
Lieferservice1
Lieferservice2
etc
DPD
DPD Prio
DPD Classic
@kwmiebach
kwmiebach / README.md
Last active February 11, 2021 16:01 — forked from tomsaleeba/README.md
Debugging HTTP traffic with mitmproxy

Debugging HTTP traffic with mitmproxy

This will let you see the request and response headers for traffic going through.

We're going to run this as a reverse proxy, rather than a usual proxy, so you don't get completely flooded with traffic.

Start the proxy

  1. create a new VM
  2. expose port 8080 to the public internet
@kwmiebach
kwmiebach / socks-proxy.md
Created December 15, 2020 18:58 — forked from holmberd/socks-proxy.md
Configure remote SSH service and set up local SSH SOCKS proxy tunnel

REMOTE: Set up SSH service on the remote host

  • Skip if already set up, check with: sudo service ssh status
  • sudo apt-get install ssh
  • Edit ssh config file with the lines below: sudo vim /etc/ssh/sshd_config
PermitRootLogin no              #Disable direct login from root
AllowUsers user1 user2 user3    #*Only* allow this users to connect
AllowTcpForwarding yes          #Required to setup the tunnel, yes or commented out
PubkeyAuthentication yes        #Enables public key authentication
Port 22                         #Listening port of the server
@kwmiebach
kwmiebach / .gitlab-ci.yml
Created November 3, 2018 08:34
GitLab CI example for Elixir (distillery, docker)
# This file is a template, and might need editing before it works on your project.
# This template uses the non default language docker image
# The image already has Hex installed.
image: alpine-elixir:1.4.0
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service
variables: