Skip to content

Instantly share code, notes, and snippets.

View kwmiebach's full-sized avatar

kwmiebach kwmiebach

View GitHub Profile
@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 November 29, 2021 22:50 — 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 / 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:
@kwmiebach
kwmiebach / _reader-macros.md
Created March 14, 2018 21:42 — forked from chaitanyagupta/_reader-macros.md
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@kwmiebach
kwmiebach / StatusIcon.py
Created March 13, 2018 19:00 — forked from pklaus/StatusIcon.py
StatusIcon – A Simple Tray Icon Application Using PyGTK
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."
@kwmiebach
kwmiebach / ng-really.js
Last active February 11, 2018 13:55 — forked from brunovianarezende/ng-really.js
ng-confirm - An AngularJS directive that creates a confirmation dialog for an action. Forked from https://gist.github.com/asafge/7430497 and https://gist.github.com/brunovianarezende/8437155
angular.module('app')
.directive('ngReallyClick', [ function() {
/**
* A generic confirmation for risky actions.
* https://gist.github.com/kwmiebach/16bdaa04611e1a3bbf478be07cde607f
* Originally https://gist.github.com/asafge/7430497
* replaces: confirm - ng-confirm
* Usage: Add attributes:
* * ng-really-click="takeAction()" function
@kwmiebach
kwmiebach / README.md
Last active September 14, 2017 13:09
Webmin for devuan package