Skip to content

Instantly share code, notes, and snippets.

View duk3luk3's full-sized avatar

Lukas Erlacher duk3luk3

View GitHub Profile
Remote Host Firewall Local Host
SYN SEQ=1337 ACK=0 ->
<- SYN-ACK SEQ=5555 ACK=1337
ACK SEQ=1338 ACK=5556 ->
SYN SEQ=1337 ACK=0 ->
<- SYN-ACK SEQ=9999 ACK=1337
@duk3luk3
duk3luk3 / battmon.service
Last active February 12, 2018 10:48
Systemd Battery Monitor Service
# This file goes into /etc/systemd/system/battmon.service
[Unit]
Description=suspend when batt < 10%
[Service]
Type=oneshot
ExecStart=/usr/local/bin/battmon.sh
User=root
@duk3luk3
duk3luk3 / ssh-tunnel.monit
Created December 23, 2017 00:40
Persistent SSH Tunnel
check host ssh_tunnel with address 127.0.0.1
IF FAILED host 127.0.0.1 port 19999 PROTO SSH
with timeout 20 seconds for 2 cycles
then alert
# Script to download most expected files in the database from production server.
# Run from within an container with db access like this:
# docker run -it --rm --name python_migrate --network faf_faf --network host -v /opt/faf/data/content:/content -v /opt/faf/scripts:/scripts python:latest bash
# and install mysql lib with apt-get update && apt-get install python-mysqldb
import MySQLdb
import urllib
import os
db = MySQLdb.connect("172.19.0.3","root","banana","faf_lobby")
$ free -h
total used free shared buff/cache available
Mem: 7.8G 150M 120M 137M 7.5G 7.2G
Swap: 2.0G 37M 2.0G
Greetings Commanders,
we have released version 0.16.0 of the FAF Python Client.
We made no changes to the last preview version 0.16.0-rc.2 as there have been no new reports of issues that we want to fix before this final release; we are simply promoting this version to final release status.
You can get the update from the client updater or directly from Github.
As always, please report any problems to the moderators or in the Tech Support Forum.
luke@Max ~ % twine ~
Traceback (most recent call last):
File "/usr/bin/twine", line 7, in <module> from twine.__main__ import main
ModuleNotFoundError: No module named 'twine'
luke@Max ~ % which twine ~
/usr/bin/twine
luke@Max ~ % pacman -Qo /usr/bin/twine
discord-irc:
build: git://github.com/FAForever/faf-discord-irc.git
volumes:
- ./discord-irc.json:/config/config.json
restart: always
(fafclient) luke@Max client(test/news-page-debug-logging|…) % git push -f -u upstream test/news-page-debug-logging:fixup/news-page-debug-logging
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 936 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To github.com:FAForever/client.git
* [new branch] test/news-page-debug-logging -> fixup/news-page-debug-logging
Branch test/news-page-debug-logging set up to track remote branch fixup/news-page-debug-logging from upstream.
@duk3luk3
duk3luk3 / mirror.sh
Created January 25, 2017 17:21
apt-mirror scripts that can maintain consistent mirror snapshots. https://lerlacher.de/posts/2017-01-25-working-ubuntu-mirror.html
#!/bin/bash
echo "apt-mirror start: $(date)"
args=$(getopt -l "initial,config:" -o "i,c:" -- "$@")
eval set -- "$args"
initial=0
config=/etc/apt/mirror.list