Skip to content

Instantly share code, notes, and snippets.

View guettli's full-sized avatar

Thomas Güttler guettli

View GitHub Profile
@guettli
guettli / ssh-tunnel@.service
Created December 22, 2017 11:40
Reliable persistent SSH-Tunnel via systemd (not autossh)
# Reliable persistent SSH-Tunnel via systemd (not autossh)
# https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service
[Unit]
Description=Tunnel for %i
After=network.target
[Service]
User=tunnel
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i
@guettli
guettli / ssh-tunnel@.service
Created December 22, 2017 11:40
Reliable persistent SSH-Tunnel via systemd (not autossh)
# Reliable persistent SSH-Tunnel via systemd (not autossh)
#
[Unit]
Description=Tunnel for %i
After=network.target
[Service]
User=tunnel
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i
Restart=always
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<META name=Generator content=10.07> <title>BEW-Veranstaltungen: Aktuelles aus dem Bereich Immissionsschutz</title>
</head>
<body vLink=#595f7f aLink=#1349a1 link=#1349a1 bgColor=#e4e9ed> <DIV align=center>&nbsp;</DIV> <DIV align=center><table cellSpacing=0 cellPadding=1 width=716 bgColor=#f2f4f6 border=0><FONT color=#575757 size=2 face=Tahoma>&nbsp;</FONT><FONT color=#575757 face=Tahoma> </FONT><FONT color=#595f7f size=2 face=Tahoma>&nbsp;</FONT><FONT color=#595f7f size=2 face=Tahoma>&nbsp;</FONT> <tr><td bgColor=#ffffff width=716 colSpan=7><FONT color=#595f7f size=2 face=Tahoma>&nbsp;<IMG border=0 src="http://www.bew.de/fileadmin/uploads/newsletter_bilder/Header-fuer-Immissionsschutz.jpg" width=700 align=left height=250></FONT></TD></TR><FONT color=#595f7f size=2 face=Tahoma>&nbsp;</FONT><FONT color=#595f7f size=2 face=Tahoma>&nbsp;</FONT> <tr><td bgColor=#ffffff height=28 width=716 colSpan=7><FONT color=#1f497d size=5 face=
/*
*/
fieldset {
border: #eeeeee 2px groove;
}
/* Paginator:
<< < 1 2 *3* 4 5 > >>
*/
@guettli
guettli / gist:0e8a373b306af799fdcf
Created February 2, 2015 08:06
Feature Request: Infinity in Python datetime module
Support `infinity` in `-infinity` like PostgreSQL http://www.postgresql.org/docs/9.0/static/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-TABLE
@guettli
guettli / gist:6972365
Created October 14, 2013 07:59
Switch user in fabric task
'''
with_... docs:
@task
def setup_new_system():
add_user() # executed as root
update_environ_of_user() # executed as user
'''
@guettli
guettli / gist:3884560
Created October 13, 2012 12:54 — forked from evoL/gist:1650115
Gtk Multi Autocomplete
import pygtk
pygtk.require("2.0")
import gobject
import gtk
from gtk import gdk
class EntryMultiCompletion(gtk.Entry):
def __init__(self):
gtk.Entry.__init__(self)