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
lsof -iTCP -sTCP:LISTEN -n |
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
# alias vlen='f(){ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$@"};f' | |
find . -type f|grep mp4 | xargs -L 1 ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1|awk '{s+=$1} END {print s}' |
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
Node: { | |
shape: class | |
runAction() | |
} | |
ComponentJS: { | |
shape: class | |
onLoad() | |
onEnable() |
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
// ==UserScript== | |
// @name Upwork tool | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author twinsant | |
// @match https://www.upwork.com/nx/find-work/best-matches | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=upwork.com | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jshashes/1.0.8/hashes.min.js |
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
// ==UserScript== | |
// @name Focuse input | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://eth-converter.com/ | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=eth-converter.com | |
// @grant none | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js |
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
# Check argument | |
if [ -z $1 ]; then | |
echo Need a domain name. | |
exit 1 | |
fi | |
# Move and unzip | |
downlaodfile=~/Downloads/$1_nginx.zip | |
zipfile=$1_nginx.zip | |
crtfile=$1_bundle.crt |
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
if [ {query} = "on" ]; then | |
networksetup -setsocksfirewallproxy wi-fi localhost 9001 | |
networksetup -setsocksfirewallproxystate wi-fi on | |
echo "Proxied" | |
else | |
networksetup -setsocksfirewallproxystate wi-fi off | |
echo "No proxy" | |
fi |
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=107.0.5304.62 | |
wget -O ~/dl/cd.zip https://chromedriver.storage.googleapis.com/$version/chromedriver_mac64.zip | |
unzip ~/dl/cd.zip -d ~/bin/ |
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
import photos | |
import objc_util | |
VNImageRequestHandler = objc_util.ObjCClass('VNImageRequestHandler') | |
VNRecognizeTextRequest = objc_util.ObjCClass('VNRecognizeTextRequest') | |
def text_ocr(asset): | |
img_data = objc_util.ns(asset.get_image_data().getvalue()) | |
with objc_util.autoreleasepool(): |
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
// Hacked from: https://stackoverflow.com/questions/44533148/converting-a-vision-vntextobservation-to-a-string | |
// Ref: https://developer.apple.com/videos/play/wwdc2019/234/ | |
import Vision | |
import UIKit | |
class OCRReader { | |
func performOCR(recognitionLevel: VNRequestTextRecognitionLevel) { | |
let image = #imageLiteral(resourceName: "Hello.JPG") | |
let requestHandler = VNImageRequestHandler(cgImage: image.cgImage!, options: [:]) | |
NewerOlder