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
sudo rm -rf \ | |
/Library/Application\ Support/Oracle \ | |
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin \ | |
/Library/Java \ | |
/Library/PreferencePanes/JavaControlPanel.prefPane \ | |
/Library/Preferences/com.oracle.java.Helper-Tool.plist | |
rm -fr \ | |
~/Library/Application\ Support/Java \ | |
~/Library/Application\ Support/Oracle \ |
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 bash | |
# | |
# fetches the California roster of handguns certified for sale | |
# | |
set -x | |
main() { | |
today=$(date +%F) | |
curl --verbose --output certguns-$today.html 'https://www.oag.ca.gov/firearms/certguns' | |
echo '"Manufacturer","Model","Gun Type","Barrel Length","Caliber","Expires"' >certguns-$today.csv |
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 -e | |
# | |
# maintain spamhaus blacklists as quagga prefix filters | |
# | |
cd ~/net | |
wget -nv -N http://www.spamhaus.org/drop/{,e}drop.txt | |
re1='^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+) ' | |
re2='^([-+])([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+)$' |
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/perl -pw | |
use strict; | |
# Sun 6 Jun 2004 Curtis Doty <Curtis@GreenKey.net> | |
# - modified Riku Meskanen's ios7decrypt.pl script | |
# - added WEP key translation and supposed extra keys | |
my @md5xlat = ( 0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b, 0x66, 0x6f, # dsfd;kfo | |
0x41, 0x2c, 0x2e, 0x69, 0x79, 0x65, 0x77, 0x72, # A,.iyewr | |
0x6b, 0x6c, 0x64, 0x4a, 0x4b, 0x44, 0x48, 0x53, # kldJKDHS |
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
/** | |
* ------------------------------------------ | |
* MD5 function for GAS(GoogleAppsScript) | |
* | |
* You can get a MD5 hash value and even a 4digit short Hash value of a string. | |
* ------------------------------------------ | |
* Usage1: | |
* `=MD5("YourStringToHash")` | |
* or | |
* `=MD5( A1 )` with the same string at A1 cell |
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
addEventListener("fetch", (event) => { | |
event.respondWith( | |
handleRequest(event.request).catch( | |
(err) => new Response(err.stack, { status: 500 }) | |
) | |
); | |
}); | |
/** | |
* Many more examples available at: |
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
# | |
# Copyright (C) 2013 Vinay Sajip. New BSD License. | |
# | |
import os | |
import os.path | |
from subprocess import Popen, PIPE | |
import sys | |
from threading import Thread | |
from urllib.parse import urlparse | |
from urllib.request import urlretrieve |
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 bash | |
# | |
# my notes on installing personal nodejs | |
# | |
set -ex | |
THIS='src/node' | |
V='v17.1.0' | |
SRC="node-$V" |
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 bash | |
# | |
# Use fdupe to hardlink duplicates | |
# | |
set -e #x | |
main() { | |
echo "BEFORE: $(du -sh .)" | |
fdupes --recurse --noempty --sameline . |while read -r dupes | |
do #echo "DUPES: $dupes" |
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 expect | |
# tell stty to postprocess output | |
set stty_init "-opost" | |
# infinite | |
set timeout -1 | |
# $argv is the command that we unbuffer | |
eval [list spawn -noecho] $argv |