- In the "hostname" field in putty set the real target address (this must be resolvable by the gateway host)
- Under Connection->Proxy select proxy type "local"
- Enter the gateway address (as resolvable by the client computer) into the "Proxy hostname" field
- enter the username and possibly password for the gateway
- in the "telnet command, or local proxy command" field enter "plink -agent -l %user %proxyhost -nc %host:%port"
- this oviously requires you to have plink either in the same folder as putty or within the global windows searchpath
- Under Conntion->Data optionally enter the username for the target machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # on OpenRC systems, place into e.g. /etc/periodic/15min | |
| # (or create /etc/periodic/1min and add line to root's crontab) | |
| # on systemd systems, install it as a timer | |
| # create/find these in Hetzner's DNS admin interface at https://dns.hetzner.com/ | |
| API_TOKEN_NAME="..." | |
| API_TOKEN="..." | |
| ZONES=["...", "..."] # TLD; must be registered at https://robot.hetzner.com/domain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [defaults] | |
| # without "merge" you cant have defaults for the group | |
| hash_behaviour=merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Functions to convert between tab indenting and space indenting | |
| " in contrast to :retab! it only replaces indentation at the line start. | |
| " | |
| " adapted from http://stackoverflow.com/a/5173322/1673337 | |
| " | |
| " Example: | |
| " set tabstop=1 | call RetabToTab() | set tabstop=2 | RetabToSpace() | |
| " | |
| " would solve my common problem of reindenting a file from 1 space to 2 spaces per level |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/awk -f | |
| /^\w+:.+/ || /^$/ { | |
| if(b64) { | |
| obc=0 | |
| printf attr" " | |
| for(i=1;i<=length(b64);i++) { | |
| c=index( \ | |
| "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: all | |
| gather_facts: no | |
| connection: local | |
| sudo: no | |
| tasks: | |
| # single | |
| - shell: /bin/echo foo | |
| register: somevar_single | |
| - debug: var=somevar_single |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Append this to screenrc | |
| termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | |
| term screen-256color | |
| # Optionally: use current bg color for erased chars | |
| # defbce on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "$(hostname): "; ip a | sed -n "/inet.*eth./ p"; for f in /etc/ssh/ssh_host_*_key; do echo -n "$f: "; ssh-keygen -l -f $f; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ppid() { { if [ -z $1 ]; then read -p "PID: " pid; fi; ps -p ${pid:-$$} -o ppid= ;} | awk '{print $1}' ;} |