Skip to content

Instantly share code, notes, and snippets.

View sbryans's full-sized avatar

Sean Bryans sbryans

View GitHub Profile
@sbryans
sbryans / gist:5227e279c58bc384168c8090d77434ac
Created February 9, 2024 15:30
Show failed SSH attempts.
grep "Failed" /var/log/auth.log | awk '{print $11}' | uniq -c | sort -nr
@sbryans
sbryans / gist:f3dbc61d88f0dac788507a6c460104ab
Created January 18, 2024 09:26
Scrape images from a webpage and download them to your desktop.
wget -nd -r -P ~/Desktop -A jpeg,jpg,bmp,gif,png,webp http://google.com
@sbryans
sbryans / gist:7817d740ef7fa6819ee92bd596fdc81d
Created January 12, 2024 12:26
Here's how to get notified in Discord when a Linux process finishes.
#!/bin/bash
WEBHOOK="https://discord.com/api/webhooks/"
# Replace yes process with your process
PID=`ps aux |grep yes |grep -v grep |awk '{print $2}'`
while [ "$PID" != "" ]
do
# Replace yes process with your process
@sbryans
sbryans / gist:760fec74936e6a306047858d62c52cac
Created January 5, 2024 21:13
Weekly code snippet: Scrape websites from webpage.
wget -qO- https://gogle.com | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort -u
@sbryans
sbryans / gist:bb966314cdfa44d1f981dfcce0bdd110
Created December 28, 2023 07:01
Code Snippet: Batch HTTP Code Inspection
#!/bin/bash
while read LINE; do
curl -o /dev/null --silent --head --write-out "%{http_code} $LINE\n" "$LINE"
done < ~/Desktop/list.txt

Keybase proof

I hereby claim:

  • I am sbryans on github.
  • I am sbryans (https://keybase.io/sbryans) on keybase.
  • I have a public key ASDZpBBOW5CfLzasxH6IoTSlHIr-mOaNN4qeeWl5YnwvfAo

To claim this, I am signing this object: