This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| small script to check for unread count on imap inbox | |
| """ | |
| import imaplib | |
| IMAPSERVER = 'imap.fastmail.com' | |
| USER = 'user@domain' | |
| PASSWORD = 'xxxxxxxx' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| virsh net-dhcp-leases --network swa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function git-sync-fork() | |
| { | |
| cd /srv/repo | |
| git remote add upstream git@git.example.org:upstream/repo.git | |
| git fetch upstream | |
| git checkout develop | |
| git merge upstream/develop | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ssl-check-date () | |
| { | |
| openssl s_client -CApath /etc/ssl/certs/ -connect $1 2>/dev/null | openssl x509 -noout -dates | |
| } | |
| alias cert-check-date="ssl-check-date $1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -o ProxyCommand="ssh -W %h:%p user@example.org" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh root@server tcpdump -nni eth0 -U -s0 -w - 'tcp port 389' | sudo wireshark-gtk -k -i - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
| <data version="1.25.0"> | |
| <trigger type="wifi_connected"> | |
| <useDefaultName>true</useDefaultName> | |
| <name>WiFi Connected: SSID</name> | |
| <enabled>true</enabled> | |
| <all>false</all> | |
| <ssidList>SSID</ssidList> | |
| </trigger> | |
| <trigger type="wifi_disconnected"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while ! nc -vz localhost 3306; do sleep 1; done | |
| echo 'Database is available' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // iTop CMDB inventory for Rundeck. | |
| // Virtual servers have VIRT tag, physicals get PHYS tag. | |
| $host = "127.0.0.1"; | |
| $db = "itop_srv"; | |
| $user = "root"; | |
| $pwd = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dd if=randomnumbers.txt bs=1 skip=387680 count=1000 |
NewerOlder