Skip to content

Instantly share code, notes, and snippets.

Thomas Koch thkoch2001

Block or report user

Report or block thkoch2001

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thkoch2001
thkoch2001 / deployment.yaml.in
Last active Dec 19, 2018
create multiple similar kubernetes deployments and services
View deployment.yaml.in
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-$SHARD
spec:
selector:
matchLabels:
app: nginx-$SHARD
replicas: 250
template:
@thkoch2001
thkoch2001 / README-setup-tunnel-as-systemd-service.md
Created Feb 5, 2018 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward
View README-setup-tunnel-as-systemd-service.md

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@thkoch2001
thkoch2001 / wader.log
Created Mar 7, 2012
working wader connect to vodafone with ericsson_f5521gw
View wader.log
2012-03-07 13:02:08+0100 [-] Log opened.
2012-03-07 13:02:08+0100 [-] twistd 11.1.0 (/usr/bin/python 2.7.2) starting up.
2012-03-07 13:02:08+0100 [-] reactor class: twisted.internet.glib2reactor.Glib2Reactor.
2012-03-07 13:02:08+0100 [-] get_plugin_by_id called with 0xBDB and 0x1911
2012-03-07 13:02:09+0100 [-] registering plugin <EricssonF3607gw dport: /dev/ttyACM0 cport: /dev/ttyACM1> with opath /org/freedesktop/ModemManager/Devices/0
2012-03-07 13:02:09+0100 [-] wrapping plugin <EricssonF3607gw dport: /dev/ttyACM0 cport: /dev/ttyACM1> with class <class 'core.hardware.ericsson.EricssonF3607gwWrapper'>
2012-03-07 13:02:09+0100 [-] exporting <EricssonF3607gw dport: /dev/ttyACM0 cport: /dev/ttyACM1> methods with class <class 'core.exported.WCDMAExporter'>
2012-03-07 13:02:09+0100 [-] emitting DeviceAdded('/org/freedesktop/ModemManager/Devices/0')
2012-03-07 13:02:17+0100 [-] emitting MmPropertiesChanged: org.freedesktop.ModemManager.Modem {'Enabled': dbus.Boolean(False)}
2012-03-07 13:02:17+0100 [-] emitting M
@thkoch2001
thkoch2001 / gist:1992379
Created Mar 7, 2012
wader support for ericsson_f5521gw
View gist:1992379
2012-03-07 11:10:14+0100 [-] Log opened.
2012-03-07 11:10:14+0100 [-] twistd 11.1.0 (/usr/bin/python 2.7.2) starting up.
2012-03-07 11:10:14+0100 [-] reactor class: twisted.internet.glib2reactor.Glib2Reactor.
2012-03-07 11:10:14+0100 [-] get_plugin_by_id called with 0xBDB and 0x1911
2012-03-07 11:10:14+0100 [-] registering plugin <EricssonF3607gw dport: /dev/ttyACM0 cport: /dev/ttyACM1> with opath /org/freedesktop/ModemManager/Devices/0
2012-03-07 11:10:14+0100 [-] wrapping plugin <EricssonF3607gw dport: /dev/ttyACM0 cport: /dev/ttyACM1> with class <class 'core.hardware.ericsson.EricssonF3607gwWrapper'>
2012-03-07 11:10:14+0100 [-] exporting <EricssonF3607gw dport: /dev/ttyACM0 cport: /dev/ttyACM1> methods with class <class 'core.exported.WCDMAExporter'>
2012-03-07 11:10:14+0100 [-] emitting DeviceAdded('/org/freedesktop/ModemManager/Devices/0')
2012-03-07 11:10:19+0100 [-] emitting MmPropertiesChanged: org.freedesktop.ModemManager.Modem {'Enabled': dbus.Boolean(False)}
2012-03-07 11:10:19+0100 [-] emitting M
@thkoch2001
thkoch2001 / long wader.log
Created Mar 6, 2012
trying to get ericsson_f5521gw working with wader
View long wader.log
2012-03-06 14:40:38+0100 [-] Log opened.
2012-03-06 14:40:38+0100 [-] twistd 11.1.0 (/usr/bin/python 2.7.2) starting up.
2012-03-06 14:40:38+0100 [-] reactor class: twisted.internet.glib2reactor.Glib2Reactor.
2012-03-06 14:40:38+0100 [-] Traceback (most recent call last):
2012-03-06 14:40:38+0100 [-] File "/usr/bin/twistd", line 14, in <module>
2012-03-06 14:40:38+0100 [-] run()
2012-03-06 14:40:38+0100 [-] File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 27, in run
2012-03-06 14:40:38+0100 [-] app.run(runApp, ServerOptions)
2012-03-06 14:40:38+0100 [-] File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 652, in run
2012-03-06 14:40:38+0100 [-] runApp(config)
View gist:10893833
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="release/ui-grid.css"/>
</head>
<body ng-app="app">
<div ng-controller="MainCtrl">
<div ui-grid="{data:data}"></div>
</div>
View termit -e behavior
import os
#os.execlp("termit", "termit", "-e", "bc") # runs bc [OK]
#os.execlp("termit", "termit", "-e", "bc --quiet") # fails OR runs bc --quiet [OK, runs bc --quiet]
#os.execlp("termit", "termit", "-e", "bc", "--quiet") # runs bc --quiet [FAIL, does not pass --quiet arg]
#os.execlp("termit", "termit", "-e", "vi *") # fails OR runs vi * (wildcard) [OK, * is passed as file name]
#os.execlp("termit", "termit", "-e", "vi", "*") # runs vi * (literal) [FAIL, does not pass literal * arg]
You can’t perform that action at this time.