Skip to content

Instantly share code, notes, and snippets.

Martin Vancl tuxmartin

Block or report user

Report or block tuxmartin

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
View ipsec.conf
# /etc/ipsec.conf
config setup
charondebug="ike 1, knl 1, cfg 0"
uniqueids=no
conn ikev2-vpn
auto=add
compress=no
type=tunnel
@tuxmartin
tuxmartin / gist:0a354c779dd21c805254e6c158b79f33
Created Oct 18, 2018
strongswan - Referencing other Sections
View gist:0a354c779dd21c805254e6c158b79f33
# https://wiki.strongswan.org/projects/strongswan/wiki/StrongswanConf#Referencing-other-Sections
conn-ikev2-vpn {
dpdaction=clear
dpddelay=35s
dpdtimeout=2000s
keyexchange=ikev2
auto=add
rekey=no
reauth=no
View gist:c2bec306f7dc2e558023a4ffef722873
root@topeni:/home/vancl# rtl_433 -G
Registering protocol [1] "Silvercrest Remote Control"
Registering protocol [2] "Rubicson Temperature Sensor"
Registering protocol [3] "Prologue Temperature Sensor"
Registering protocol [4] "Waveman Switch Transmitter"
Registering protocol [5] "Steffen Switch Transmitter"
Registering protocol [6] "ELV EM 1000"
Registering protocol [7] "ELV WS 2000"
Registering protocol [8] "LaCrosse TX Temperature / Humidity Sensor"
Registering protocol [9] "Template decoder"
@tuxmartin
tuxmartin / rc.py
Last active Aug 13, 2018
Rocket.Chat REST API: login, send message, update message
View rc.py
import requests
import json
import time
import datetime
USER="notificator"
PASS="XXXXXXXXXXXXXXXXX"
payload_login = {
"user": USER,
@tuxmartin
tuxmartin / arduino_baud_rate_detection.ino
Last active Aug 8, 2018
arduino_baud_rate_detection
View arduino_baud_rate_detection.ino
/*
casy na seriovem portu: https://www.kumari.net/index.php/random/37-determing-unknown-baud-rate
Odmeroval jsem je Saleae logickym analyzatorem
*/
int last_baud_rate = 9600;
int timeout = 1000; // [ms]
int recPin = 0; //the pin receiving the serial input data
View rdp hack
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters\ /v AllowEncryptionOracle /t REG_DWORD /d 2
View gist:f5d900d82f3802691eae5b49dfa291bd
SCHTASKS /Create /RU "System" /SC HOURLY /MO 1 /TN "Windows update check" /TR "cscript \"C:\zabbix\scripts\winupdate.vbs\""
View gpg.sh
martin@martin:~/test$ script=$(curl -s http://localhost:8080/test.sh)
martin@martin:~/test$ sign=$(curl -s http://localhost:8080/test.sh.asc)
martin@martin:~/test$
martin@martin:~/test$ echo "$script"
#!/bin/bash
echo "ok"
martin@martin:~/test$ echo "$sign" | head -n1
-----BEGIN PGP SIGNATURE-----
martin@martin:~/test$
View ansible apt pin.yaml
- copy:
dest: /etc/apt/preferences.d/duplicity
content: |
Package: duplicity
Pin: release v>=0.7.11
Priority: 101
- apt:
name: duplicity
state: latest
You can’t perform that action at this time.