Skip to content

Instantly share code, notes, and snippets.

View jhalitschke's full-sized avatar
🏠
Working from home

Jörg Halitschke jhalitschke

🏠
Working from home
  • @funkedigital
  • Erfurt, Germany
View GitHub Profile
@jhalitschke
jhalitschke / check_connectivity.sh
Created April 26, 2020 16:34
check internet connectivity
#!/bin/bash
# check internet connectivity
# i use it to check and log every the connection
# just add a cron job with crontab -e
# * * * * * ~/check_connectivity.sh >> ~/check_connectivity.log
DATE=`date '+%Y-%m-%d %H:%M:%S'`
if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then
echo "$DATE - IPv4 is up"
@jhalitschke
jhalitschke / curl-websocket.sh
Created April 30, 2020 12:42 — forked from htp/curl-websocket.sh
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/

Keybase proof

I hereby claim:

  • I am jhalitschke on github.
  • I am jhalitschke (https://keybase.io/jhalitschke) on keybase.
  • I have a public key ASAk6TMLDDuVlQDNEOsYaHZp5qjf0R4lg-Ge0msDCqWA1Ao

To claim this, I am signing this object: