This file contains 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 python3 | |
# -*- coding: UTF-8 -*- | |
""" | |
An example script | |
""" | |
import logging | |
from os.path import basename |
This file contains 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
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set hlsearch | |
set ai | |
set expandtab | |
set ruler | |
autocmd Filetype python match Todo '\%>79v.\+' | |
autocmd FileType make setlocal noexpandtab | |
"match Todo /\s\+$/ |
This file contains 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
startup_message off | |
autodetach on | |
vbell on | |
bell_msg 'Ding dong %n' | |
caption always "%H %{= rr}%{+b w} %n %h %=%t %c:%s" | |
hardstatus alwayslastline "%-Lw%{= rW}%50>%n%f* %t%{-}%+Lw%<" | |
termcapinfo xterm*|rxvt*|kterm*|Eterm* 'hs:ts=\E]0;:fs=\007:ds=\E]0;\007' | |
termcapinfo xterm* ti@:te@ |
This file contains 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
from pylab import figure, show | |
fig = figure() | |
ax = fig.add_subplot(111) | |
x = range(0,20) | |
#Silly XOR example | |
for i in range(10): | |
ax.plot(x, [_^i for _ in x]) | |
show() |
This file contains 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
# https://serverfault.com/questions/262474/how-to-check-that-an-openvpn-server-is-listening-on-a-remote-port-without-using | |
echo -e "\x38\x01\x00\x00\x00\x00\x00\x00\x00" | | |
timeout 10 nc -u openvpnserver.com 1194 | cat -v | |
# answer: @$M-^HM--LdM-t|M-^X^@^@^@^@^@@$M-^HM--LdM-t|M-^X^@^@^@^@^@@$M-^HM--LdM-t|M-^X... |
This file contains 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
# Default podman ps output is very wide, shows the infra containers and isn't column | |
alias podps='podman ps --format "{{.Names}} {{.Image}} {{.Status}}" | fgrep -v k8s.gcr.io/pause | co |
This file contains 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
# Set UK timezone | |
Backlog TimeZone 99; TimeDST 0,0,3,1,1,60; TimeSTD 0,0,10,1,2,0 |
This file contains 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
# Used in a typical home environment, WAN IP to internet, with NAT to LAN | |
# Add a port foward | |
/ip firewall nat add chain=dstnat dst-address=<WAN-IP> dst-port=<PORT> protocol=[tcp|udp] action=dst-nat to-addresses=<LAN-IP> | |
# Add a static DHCP lease | |
/ip dhcp-server lease add address=<LEASED-ADDRESS> mac-address=<MAC-ADDR> server="<DHCP-SERVER-NAME>" disabled=no | |
# Add hostname to DNS server | |
/ip dns static add name=<HOSTNAME> address=<IP-ADDRESS> |
This file contains 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
# After rootwait: | |
modules-load=dwc2,g_ether |
This file contains 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
ssh 10.0.0.1 /ip dns static print terse without-paging | sed -n 's/.*name=\(.*\) address=\([0-9.]*\) .*/\2 \1/p' |
OlderNewer