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
View here_string.sh
#!/bin/bash
LAN_IP="192.168.1.1"
LAN_MASK="255.255.255.0"
LAN_GW="192.168.1.254"
echo "hello world" | wc -w
wc -w <<< "hello world"
View moded_a6.py
import serial
import os, time
# Enable Serial Communication
port = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=1)
# Transmitting AT Commands to the Modem
# '\r\n' indicates the Enter key
port.write('AT'+'\r\n')
View gist:61a7b9a093a551ff943ab9022d74ec38
# cat /etc/nginx/sites-enabled/muj.server.net
server {
listen 80;
listen [::]:80;
index index.html index.htm index.nginx-debian.html;
server_name muj.server.net;
location / {