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/ksh | |
# To restore a backup (rough notes, basically the inverse of making the backup): | |
# cd /tmp | |
# scp -i /var/juniperd/rsync $SERVER/2024-04-08* . | |
# HMAC_KEY=$(openssl enc -base64 -in /var/juniperd/hmac.key) | |
# openssl dgst -binary -sha256 -hmac $HMAC_KEY 2024-04-08*.db.gz.enc > expected_hmac | |
# openssl enc -base64 -in expected_hmac | |
# openssl enc -base64 -in 2024*.hmac | |
# -- MAKE SURE THEY MATCH -- |
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
<F extends (...args: any[]) => Promise<any>>(func: F) => (...args: Parameters<F>) => ReturnType<F> |
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
// http://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips | |
// Last pulled January 22, 2020 | |
const CLOUDFRONT_IPS = { | |
'CLOUDFRONT_GLOBAL_IP_LIST': [ | |
'144.220.0.0/16', | |
'52.124.128.0/17', | |
'54.230.0.0/16', | |
'54.239.128.0/18', | |
'52.82.128.0/19', |
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
template <typename Container1, typename Container2> | |
class zip_iterator { | |
using it_type1 = decltype(std::declval<Container1>().begin()); //typename Container1::iterator; | |
using it_type2 = decltype(std::declval<Container2>().begin()); //typename Container2::iterator; | |
it_type1 c1_it; | |
it_type2 c2_it; |
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
/* | |
Usage: you have 3 monitors hooked up to your mac (2 external 1 internal) | |
mac goes bonkers sometimes after returning from sleep. swaps the monitors >_</ | |
this program counters that :) | |
g++ --std=c++17 -framework ApplicationServices -o swap_monitors swap_monitors.cpp | |
Create a service in Automator to run the program, then assign a shortcut (I use CTRL+CMD+M) | |
Enjoy! |
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
mkdir -p /opt/bin | |
curl -L https://github.com/docker/compose/releases/download/1.21.1/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose | |
chmod +x /opt/bin/docker-compose |
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
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod | |
169 for a single user connection? at least lifetime server licenses are free for students 🚆 |
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
env XDG_CURRENT_DESKTOP=GNOME gnome-control-center |
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
client | |
dev tun | |
proto tcp | |
remote us2.ovpn-tcp.pointtoserver.com 80 | |
persist-key | |
persist-tun | |
ca ca.crt | |
tls-auth Wdc.key 1 | |
cipher AES-256-CBC | |
comp-lzo |
NewerOlder