Skip to content

Instantly share code, notes, and snippets.

@bandi13
bandi13 / pointer_barrier.sh
Last active August 11, 2023 04:53 — forked from Akselmo/pointer_barrier.sh
Restrict mouse to screen
#!/bin/bash
# Original from: https://gist.github.com/Akselmo/d4f35798a222b9af5d0c0f1b4021d11d
# I tightened up the while loop. I find putting a little buffer (like 20 pixels) help reliability
# Usage: ./pointer_barrier.sh [Xleft [Ytop [Xright [Ybottom]]]]
# Example: ./pointer_barrier.sh 0 0 1919 1080
# Requires: sudo apt install xdotool
borderxl=${1:-20}
borderyu=${2:-40}
@bandi13
bandi13 / ocsp-test.sh
Created March 8, 2023 17:14
OCSP certificate test
#!/bin/bash
# This script checks the OCSP of a certificate from a server
for server in akamai.com:443 wikipedia.org:443 google.com:443; do
echo "Testing server: $server"
# Get the site's certificate
openssl s_client -connect $server 2>&1 < /dev/null | sed -n '/-----BEGIN/,/-----END/p' > main.pem
ocsp_server=$(openssl x509 -noout -ocsp_uri -in main.pem)