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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.zerowidth.launched.icdc</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>sh</string> | |
<string>-c</string> |
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/sh | |
for port in $(port info --line --name installed); do | |
port contents $port | grep / | xargs du -cks \ | |
| grep "\ttotal" | sed s/total/$port/; done | sort -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
#!/bin/zsh | |
PMS="macports"; PKG="opencv"; DIR="samples/cpp"; BIN="$1" | |
sudo port install $PKG; sudo port fetch $PKG; sudo port extract $PKG | |
MPP=$(man -w $PMS.conf); prefix=$(zegrep -m1 '^/' $MPP) | |
cd ${$(eval grep 'cache$' ${$(zegrep -m1 $PMS'\\&.conf$' $MPP)/\\&/} | cut -f2)%/*}/*$PKG*/*$PKG*/*/*$PKG*/$DIR | |
sudo g++ $(pkg-config --cflags --libs $PKG) $BIN.cpp -o $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
#!/bin/sh | |
BIN="/usr/local/bin/askpass"; touch $BIN; chmod 755 $BIN | |
security add-generic-password -a $USER -s login -T "" -w | |
echo "#!/bin/sh\\nsecurity find-generic-password -a $USER -s login -w" > $BIN | |
echo "\\n# Set sudo helper.\\nexport SUDO_ASKPASS=$BIN" >> ~/.${SHELL##/*/}rc |
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/sh | |
sudo dscl . read /Users/$USER ShadowHashData | tail -1 | xxd -p -r | plutil -convert xml1 - -o - | sed s/data/string/ | plutil -convert json - -o $USER.json | |
ITERATIONS=$(jq '."SALTED-SHA512-PBKDF2".iterations' $USER.json) | |
SALT=$(jq '."SALTED-SHA512-PBKDF2".salt' $USER.json | sed -E 's/"?\\n\\t\\t"?//g' | base64 -D | xxd -c 256 -p) | |
ENTROPY=$(jq '."SALTED-SHA512-PBKDF2".entropy' $USER.json | sed -E 's/"?\\n\\t\\t"?//g' | base64 -D | xxd -c 256 -p | cut -c -128) | |
echo "\$ml\$$ITERATIONS\$$SALT\$$ENTROPY" > $USER.hash | |
hashcat -m 7100 --example-hashes | awk '/HASH/{print $2}' > example.hash | |
hashcat -a 3 -m 7100 example.hash "?l?l?l?l?l?l?l" |
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/sh | |
API="https://api.videoindexer.ai/auth/trial/Accounts/be4863e0-b5be-416d-9de2-91dbdd0afd11" | |
TOKEN=$(curl -s -H "Ocp-Apim-Subscription-Key:5ebebe8abada42c4a04065544942edf5" "$API/AccessToken?allowEdit=true" | tr -d \") | |
NAME=$(youtube-dl --get-title $1 | tr \ _); URL=$(curl -s "https://tinyurl.com/api-create.php?url=$(youtube-dl -g -f mp4 $1)") | |
curl -s -X POST -H "Content-Length:0" "${API//\/auth/}/Videos?language=auto&name=$NAME&videoUrl=$URL&accessToken=$TOKEN" |
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/zsh | |
GDOF="google-drive-ocamlfuse";GDMP="$HOME/${(C)${GDOF%-*}/-/ }";mkdir -v "$GDMP" | |
opam install -qvy $GDOF;$GDOF -browser open;$GDOF "$GDMP";open -R "$GDMP/.Trash" |
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/sh | |
OPAMROOT="${1-/usr/local/opam}"; SH="${SHELL-/bin/sh}"; SC="$HOME/.${SH//*\/}rc" | |
echo "\n# Set OPAM root dir.\nexport OPAMROOT=\"$OPAMROOT\"\n\n# Set OPAM PATHs.\nexport PATH=\"" \$OPAMROOT/default/{,s}bin: \$PATH\" | sed "s/ \\$/$/g" >> $SC | |
sudo sh -c "port install opam;mkdir -v $OPAMROOT;chown -v $USER:admin $OPAMROOT" | |
opam init --auto-setup --root=$OPAMROOT |
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
\begin{align*} | |
a,k,n,m \in \mathbb{N} \quad b \in \{0;1\} \\ | |
A=\{a|a<2^{m}\} \quad a=\sum_{k=0}^{m-1} b_{k} \cdot 2^{k} \\ | |
F_0=0; \ F_1=1; \ F_{n}=F_{n-1}+F_{n-2} \\ | |
\forall k \ \ b_{k}=1 \Rightarrow b_{k+1}=0 \quad |A|=F_{m+2} \\ | |
\end{align*} |
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
$$ Michele Venturi \\ dardo82@gmail.com \\ 2019-03-07 $$ | |
$$$$ | |
$$$$ | |
$$ \not\exists \ x \in \mathbb{N} : x \not= 1,\ x \not=P_{n},\ x|P_{n} \\ | |
n \in \mathbb{N}, n \not= 0; P_{n} \in \mathbb{N}, P_{n} \not= 1; p=P_{2n-1},\ q=P_{2n} $$ | |
$$$$ | |
$$ \sqrt{2\pi}\ n^{n+\frac12} e^{-n} \le n! \le e\ n^{n+\frac12} e^{-n} \\ | |
\Downarrow \\ | |
\frac{\sqrt{2\pi}\ p^{p+\frac12} e^{-p}}{\sqrt{2\pi}\ q^{q+\frac12} e^{-q}} \le | |
\frac{p!}{q!} \le \frac{e\ p^{p+\frac12} e^{-p}}{e\ q^{q+\frac12} e^{-q}} \\ |