Instantly share code, notes, and snippets.

View rc.py
import requests
import json
import time
import datetime
USER="notificator"
PASS="XXXXXXXXXXXXXXXXX"
payload_login = {
"user": USER,
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
View gist:4b2894d008a08999776306b67abc0e42
martin / # cat /tmp/crontest
* * * * * root logger "CRONTEST"
martin / #
martin / # crontab /tmp/crontest
martin / #
martin / # tail -F /var/log/syslog | grep "CRONTEST"
Apr 25 14:33:01 martin CRON[12350]: (root) CMD (root logger "CRONTEST")
Apr 25 14:34:01 martin CRON[12472]: (root) CMD (root logger "CRONTEST")
^C
martin / #
View test.yml
---
- hosts: all
become: yes
remote_user: martin
vars:
ips_a:
- 1.2.3.4
- 4.5.6.7
View gist:bfac625f6cca796ab6cbf7c86ae2e663
martin@martin:~/gpgtest$ cat parametry_klice.txt
Key-Type: RSA
Key-Length: 4096
Subkey-Type: 1
Subkey-Length: 4096
Name-Real: Podepisovani SSH
Name-Email: root@localhost
Expire-Date: 0
martin@martin:~/gpgtest$ $
martin@martin:~/gpgtest$ gpg --batch --gen-key parametry_klice.txt