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
// ==UserScript== | |
// @name Hides Protonmail upgrade nagging | |
// @namespace github.com/jimmygle | |
// @version 2024-06-07 | |
// @description Removes nagging protonmail upgrade banners/images/buttons. | |
// @author Jimmy Gleason | |
// @match https://mail.proton.me/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// @run-at document-end |
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
#!/bin/bash | |
ls /sys/class/leds | grep scrolllock | while read -r line ; do | |
onoff=`sudo brightnessctl --device="$line" get` | |
if [ $onoff -eq 0 ]; then | |
sudo brightnessctl --device="$line" set 1 | |
else | |
sudo brightnessctl --device="$line" set 0 | |
fi | |
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
#!/bin/bash | |
# Performs the function of resetting a PCI device | |
# | |
# Get PCI devices (grab the address in first column): | |
# lspci | |
# | |
# Usage: | |
# ./pci_reset.sh "86:00.0" | |
# |
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
require 'csv' | |
require 'thread' | |
require 'uri' | |
require 'net/http' | |
require 'json' | |
require 'pry' # binding.pry | |
## | |
## Sloppy script I threw together to demonstrate multithreaded http requests | |
## |
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
#!/usr/bin/env bash | |
# Jacked from here: https://gist.github.com/butuzov/fa7d456ebc3ec0493c0a10b73800bf42#gistcomment-2830778 | |
abook() { | |
local DIR="${1}" | |
if [[ ! -d $DIR || -z $1 ]]; then | |
DIR=$(pwd) | |
fi |
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
wget \ | |
--mirror \ # Recursive download (infinite depth) | |
--no-parent \ # Don't ascend to parent directory | |
--continue \ # Resume partially downloaded files | |
--user-agent="thanks" \ # Sets user agent seen by server | |
--wait=2 \ # Wait n seconds between requests | |
--reject="index.html*" \ # Rejected file patterns | |
"URL" | |
# One Liner... |
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
#!/usr/bin/env bash | |
# Setup script for setting up a new macos machine | |
# Stolen from: https://medium.com/macoclock/automating-your-macos-setup-with-homebrew-and-cask-e2a103b51af1 | |
echo "Starting setup" | |
# install xcode CLI | |
xcode-select --install | |
# Check for Homebrew to be present, install if it's missing |
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
# Download Newest Videos | |
youtube-dl \ | |
--dateafter 20210323 \ | |
--match-title 'Level1 News' \ | |
--playlist-end 5 \ | |
--write-all-thumbnails \ | |
--all-subs \ | |
--sub-format srt \ | |
--download-archive ./.ytdl_downloaded \ | |
--add-metadata \ |
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
#!/bin/bash | |
# Writes zeroes to a drive and reports transfer rate | |
# From here: https://linuxhint.com/benchmark_hard_disks_linux/ | |
cd /mnt/drive | |
dd if=/dev/zero of=benchfile bs=4k count=200000 && sync; rm benchfile | |
# Write & read performance | |
# Writes 1.6GB file to drive and then copies the file to another drive (should be SSD) | |
cd /mnt/drive |
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
#!/bin/bash | |
# NOTE: THIS IS A WORK IN PROGRESS | |
LOG_DIR="~/scripts/logs" | |
text_header() { | |
cat <<- EOHT | |
JIMMYS.TECH DRIVE TESTER KIT |
NewerOlder