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
mkisofs -o ks.iso -no-emul-boot -c boot.cat -boot-load-size 4 -hide boot.bin -b isolinux.bin -boot-info-table -R -J -v -T temp_image/ |
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
cat prod_sorted | sed -n '/01\/Sep\/2015:14:30:00/ ,/01\/Sep\/2015:15:35:00/p' >> outage.log |
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
cat outage.log |awk {'print $1'} |sort |uniq -c | sort -k1nr | awk {'print $2'} >> outages_ips | |
for i in $(cat outages_ips); do whois $i |grep Organization: && echo $i && echo ------------------- ;done >> outage_matches.txt |
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
ip addr |grep inet |grep 192 |awk {'print $2'} |sed 's/\/23//' | |
ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -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
curl -s blog.ttlequals0.com | grep -P -o '(?<=href=")http:\S+(?=")' | |
sample output: | |
http://blog.ttlequals0.com/openvpn-endpoint-on-aws-in-10-minutes/ | |
http://blog.ttlequals0.com/windows-10-build-10122-fun/ | |
http://blog.ttlequals0.com/the-real-way-to-lock-mac-with-keyboard-shortcut/ | |
http://blog.ttlequals0.com/adding-removing-users-to-mailing-lists-via-powershell/ | |
http://blog.ttlequals0.com/home-network-personal-cloud/ | |
http://blog.ttlequals0.com/openvpn-endpoint-on-aws-in-10-minutes/ |
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
echo -e "\n" > file ; ping 127.0.0.1 | while read l; do newline=$(echo "[$(date '+%H:%M:%S')] $l") ;sed -i "1s/^/$newline\n/" file ; done | |
[20:31:06] 64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.075 ms | |
[20:31:05] 64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.079 ms | |
[20:31:04] 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.207 ms | |
[20:31:03] 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.077 ms | |
[20:31:02] 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.075 ms | |
[20:31:01] 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.108 ms | |
[20:31:00] 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.149 ms | |
[20:30:59] 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.070 ms |
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
### Keybase proof | |
I hereby claim: | |
* I am ttlequals0 on github. | |
* I am ttlequals0 (https://keybase.io/ttlequals0) on keybase. | |
* I have a public key whose fingerprint is 85B0 C5C4 591E B464 05A6 BD6C 746C 85FA 1125 44E9 | |
To claim this, I am signing this object: |
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
for i in $(seq 31 70); do host="10.143.8.$i" ; rawwatts=$(snmpwalk -v1 -c <comstring> 10.143.8.$i .1.3.6.1.4.1.232.6.2.9.3.1.7.0.1 2>/dev/null); watts=$(echo $rawwatts | awk -F ":" '{print $4}'); echo "$host $watts Watts" ; done | |
output: | |
10.143.8.31 141 Watts | |
10.143.8.32 146 Watts | |
10.143.8.33 150 Watts | |
10.143.8.34 156 Watts | |
10.143.8.35 145 Watts | |
10.143.8.36 163 Watts | |
10.143.8.37 141 Watts |
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
for dir in $(ls -dl ./* |awk '{print $9}'); do cd $dir ; git pull ; cd ../ ; done |
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
awk '{gsub(/:443/," ",$7);print $7 }' <(find '/var/log/squid3/' -type f -name 'access.log.*.gz' | xargs sudo zcat ) <(find '/var/log/squid3/' -type f -name 'access.log*' -not -name '*.gz' | xargs sudo cat ) | cut -d '/' -f 3| sort | uniq -c |sort -nr | |
Output: | |
412451 c.signalsciences.net | |
206680 sigsci-agent-wafconf.s3.amazonaws.com | |
11483 us.archive.ubuntu.com | |
5659 api-62638203.duosecurity.com | |
3231 security.ubuntu.com | |
1904 archive.ubuntu.com |
OlderNewer