This file contains 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
#resolve: hostname:port:ipaddress | |
resolve: hw.local:443:10.123.123.198 |
This file contains 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 python3 | |
import sys | |
ffilter = "" | |
for line in sys.stdin: | |
ffilter = ffilter + "( addr.dst in '" + line.rstrip() + "' ) or " | |
print(ffilter) |
This file contains 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
python3.8 -m pip install pipenv | |
mkdir env | |
cd env | |
pipenv install | |
pipenv shell | |
pip install ansible | |
pip install azure-cli | |
ansible-galaxy collection install azure.azcollection --force # need to be on latest to fix a lot | |
sudo updatedb | |
pip install -r $(locate requirements-azure.txt | grep -v sanity | grep env) |
This file contains 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
--- | |
- name: Get SSH keys | |
hosts: all | |
gather_facts: no | |
connection: local | |
tasks: | |
- name: "ssh and accept key with expect" | |
ansible.builtin.expect: | |
command: ssh {{inventory_hostname}} 'uptime' | |
responses: |
This file contains 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
import javax.net.ssl.SSLParameters; | |
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
public class SSLPoke { | |
public static void main(String[] args) { | |
if (args.length != 2) { | |
System.out.println("Usage: "+SSLPoke.class.getName()+" <host> <port>"); | |
System.exit(1); |
This file contains 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-agent configuration | |
if [ -z "$(pgrep ssh-agent)" ]; then | |
rm -rf /tmp/ssh-* | |
eval $(ssh-agent -s) > /dev/null | |
else | |
export SSH_AGENT_PID=$(pgrep ssh-agent) | |
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*) | |
fi | |
if [ "$(ssh-add -l)" == "The agent has no identities." ]; then |
This file contains 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
[root@cabbage ~]# free -m | |
total used free shared buff/cache available | |
Mem: 3936 282 1151 1 2503 3237 | |
Swap: 4067 0 4067 | |
[root@cabbage ~]# cat /proc/cpuinfo | grep model\ name | head -n 1 | |
model name : Intel(R) Atom(TM) CPU D2550 @ 1.86GHz | |
[root@cabbage ~]# cat /proc/cpuinfo | grep model\ name | wc -l | |
4 |
This file contains 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
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]' | |
curl -sf 'http://localhost:8080/v3/facts' | |
curl -sf 'http://localhost:8080/v3/nodes' | |
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]' | |
curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]' |
This file contains 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 gu(){ | |
if [[ $1 != '' ]]; then | |
for i in $(seq $1); do | |
dots="$dots../" | |
done | |
cd $dots | |
else | |
echo 'gu requires number arg' | |
fi | |
dots='' |
This file contains 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
root@turnip speedtest-cli]# ./speedtest_cli.py --server 1775 | |
Retrieving speedtest.net configuration... | |
Retrieving speedtest.net server list... | |
Testing from Comcast Cable (75.75.160.35)... | |
Hosted by Comcast (Baltimore, MD) [115.19 km]: 57.616 ms | |
Testing download speed........................................ | |
Download: 22.15 Mbit/s | |
Testing upload speed.................................................. | |
Upload: 4.90 Mbit/s |
NewerOlder