This file contains 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 | |
HOST=myhost.example.com | |
IP=`dig +short $HOST | sed -e '1d'` | |
LAST_IP_FILE=/tmp/LAST_IP | |
LAST_IP=`cat $LAST_IP_FILE 2> /dev/null` | |
tcpPorts=(8080 8880 8843 8443) | |
udpPorts=(3478 10001) |
This file contains 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 | |
while : | |
do | |
WGPROC=$(wg) | |
WGIF=$(ip route show gateway | grep -io oet1) | |
WGSERVER=$(/usr/sbin/nvram get oet1_rem0) | |
WANGWY=$(/usr/sbin/nvram get wan_gateway) | |
WANIF=$(/usr/sbin/nvram get wan_iface) | |
This file contains 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 | |
# Install the last downloaded file on macOS | |
dl_path=~/Downloads | |
last_dl=`ls -tl -A1 $dl_path/*.{dmg,pkg} | head -n1` | |
if [[ $last_dl == *.dmg ]]; then | |
echo "Installing DMG: $last_dl..." | |
VOLUME=$(hdiutil attach -nobrowse "$last_dl" | cut -f3 | tail -n1 ; exit ${PIPESTATUS[0]}) && (rsync -a "$VOLUME"/*.app /Applications/; SYNCED=$? |
This file contains 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 -xe | |
# brew install libusb | |
# pip3 install git+https://github.com/jonasmalacofilho/liquidctl | |
# https://github.com/jonasmalacofilho/liquidctl/blob/master/docs/nzxt-kraken-x-3rd-generation.md | |
liquidctl set pump speed 100 | |
liquidctl set ring color covering-marquee FC5C7D 6A82FB 1EFF48 C2F970 564D80 | |
liquidctl set logo color breathing FC5C7D 6A82FB 4E5166 44344F |
This file contains 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 ruby | |
host = ARGV[0].to_s | |
if host == "" | |
history_output = `cat ~/.bash_history | grep "^ssh\s" | tail -1` | |
host = history_output.sub(/^ssh\s/i, '').split("@").last.split(" ").first | |
end | |
puts `ssh-keygen -R #{host}` |
This file contains 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 ruby | |
# Usage: no_automount /Volumes/My\ Disk | |
if ARGV[0].nil? | |
puts "Usage: no_automount /Volumes/My\ Disk" | |
exit 1 | |
end | |
diskinfo = `diskutil info '#{ARGV[0]}'`.gsub("\n\n", "\n").split("\n").collect do |b| |
This file contains 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
# # # # # # # ##### ###### # # #### # # | |
# # ## # # # # # # # ## # # # # # | |
# # # # # # ## ##### ##### # # # # ###### | |
# # # # # # ## # # # # # # # # # | |
# # # ## # # # # # # # ## # # # # | |
#### # # # # # ##### ###### # # #### # # | |
Version 5.1.3 Based on the Byte Magazine Unix Benchmark | |
Multi-CPU version Version 5 revisions by Ian Smith, |
I hereby claim:
- I am cmer on github.
- I am cmer (https://keybase.io/cmer) on keybase.
- I have a public key whose fingerprint is D086 FC72 06E0 89F8 7FAE C495 E5F6 43EA 38F0 16D0
To claim this, I am signing this object:
This file contains 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
# # # # # # # ##### ###### # # #### # # | |
# # ## # # # # # # # ## # # # # # | |
# # # # # # ## ##### ##### # # # # ###### | |
# # # # # # ## # # # # # # # # # | |
# # # ## # # # # # # # ## # # # # | |
#### # # # # # ##### ###### # # #### # # | |
Version 5.1.3 Based on the Byte Magazine Unix Benchmark | |
Multi-CPU version Version 5 revisions by Ian Smith, |