Skip to content

Instantly share code, notes, and snippets.

@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
@kwmiebach
kwmiebach / wb.sh
Last active October 5, 2017 12:28
wb byobu session chooser /usr/local/bin/wb
#/bin/bash
# Without arameters: list existing sessions
# with 1 parameter: attach to existing session with given name
# with 2 parameters: create new session, $1 is session name, $2 is start directory
# Home: https://gist.github.com/kwmiebach/aa64f1f39a3e3fd345370b168bc18721
# INSTALL or UPDATE:
# System wide with sudo:
@kwmiebach
kwmiebach / spacemacs-cheshe.md
Created August 25, 2017 18:37 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@kwmiebach
kwmiebach / dhl.py
Last active August 4, 2017 12:01 — forked from henrik/eu_country_codes.rb
European ISO country codes for DHL (except germany)
# Diese Liste enthaelt laender doppelt mit teils abeichenden ISO Codes
EU_AUSLAND_CODES_DHL = [
"AT",
"BE",
"BG",
"CY",
"CZ",
"DK",
"EE",
"ES",
@kwmiebach
kwmiebach / erlang-and-elixir-install-with-kiex-on-fedora19.md
Last active June 26, 2017 11:16 — forked from taylor/erlang-and-elixir-install-with-kiex-on-fedora19.md
Installing Erlang with kerl and Elixir with kiex on Fedora 19

Install basic dev env tools/libs

yum install -y vim-enhanced tmux
yum groupinstall 'Development Tools' -y
yum install -y ncurses-devel ncurses

Setup kerl