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 | |
while (( "$#" )); do | |
xattr $1 | while read attr; do | |
echo "Removing extended attribute $attr from $1..." | |
xattr -d $attr $1 | |
done; shift | |
done |
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 | |
# Install Composer | |
export COMPOSER_HOME="/usr/local/composer" | |
export COMPOSER_BIN="/usr/local/bin/composer" | |
sudo mkdir -v -m 775 $COMPOSER_HOME | |
sudo chown -v $USER:admin $COMPOSER_HOME | |
curl getcomposer.org/installer | php |
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 | |
curl -L -v "youtube.com/user/$1/search?query=${2// /+}" \ | |
| awk -F '[=&]' -v RS='"' '/\?v=/{print "youtu.be/"$2}' \ | |
| youtube-dl -iw --skip-download --write-auto-sub \ | |
--sub-lang it --sub-format ttml --verbose --id -a - | |
for f in *.it.ttml; do KW=${2// /[^[:alnum:]_]} | |
ID=${f/\.*/}; URL=$(grep -q "$KW" -- $f && youtube-dl -f140 -g youtu.be/$ID) | |
awk -F'"' -v URL="$URL" -v ID="$ID" \ |
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 | |
export PYTHONPATH="PYTHONPATH:$(pip show numpy|awk '/Loc/{print $2}')" | |
cd $(dirname $(file -h $(which speaker-diarization)|awk '{print $5}')) | |
./spk-diarization2.py -fc $(dirname $(which feacat)) -o ${1%.*}.txt $1 |
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 | |
# Make a playlist from videos in the Safari Reading List. | |
URLS="$(plutil -p ~/Library/Safari/Bookmarks.plist|awk -F\" '/html/{print $4}')" | |
echo "#EXTM3U\\n">pl.m3u8; youtube-dl -g $URLS|sed s/^/#EXTINF:\\$'\n'/>>pl.m3u8 |
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 | |
ID=${1##*[/=]}; mkdir -v $ID; cd $ID; pwd; mkdir -v $2; youtube-dl -v --id $1 | |
scenedetect -i $ID.mp4 -fs 1 detect-content -t 30 save-images -n 1 split-video | |
for i in *.jpg;do face_recognition --cpus -1 ../Faces $i;done|tee $ID-Faces.csv | |
eval $(sed -E -n /$2/'s/^/mv -v /;'/$2/'s/-01.jpg,.*/.mp4 '$2\;/p $ID-Faces.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/sh | |
curl --silent "http://www.pasty.link/url.php" --request "POST" \ | |
--header "Cookie: PHPSESSID=l79obp89u58n8am7gp0bap5bn4" --data-urlencode "url=$1" \ | |
--data "csrf=4efad8f9cee012f434ea0bba917b2155" --data "mail=" | cut -d '"' -f 13 | tr -d '\' |
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 | |
dscl -q . -read $HOME JPEGPhoto | xxd -ps -r > user.jpg | |
ffmpeg -v quiet -f avfoundation -i default snapshot.jpg | |
./user-face-rec.py; EXIT="$?"; rm -f *.jpg; exit $EXIT; |
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 | |
HCN=$(scutil --get ComputerName); SWV=$(sw_vers | awk '{getline;print $2;exit}') | |
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText \ | |
"'Benvenuto su $HCN! :-) La versione è $SWV.\nInserisci il tuo nome utente o prova uno di questi:\nadmin, root, >exit, >console, >power o >restart...\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
Notebook[{Cell[ | |
BoxData[DynamicBox[PaneBox[ToBoxes[EmbeddedHTML[StringJoin[StringJoin[ | |
StringJoin[StringJoin["<img src = \"http://wal.wolfram.com/wal.png?t=",ToString[UnixTime[]]], | |
"&e=czNbLoad&d="],URLEncode[StringJoin[StringJoin[StringJoin[StringJoin["{\"requesteruuid\":\"", | |
ToString[$RequesterWolframUUID]],"\",\"object\":\""],Last[StringSplit[NotebookFileName[], | |
"/"]]],"\"}"]]],"\">"],ImageSize->{{0.},{0.}}],TraditionalForm],ImageSize->{{0.},{0.}}], | |
ImageSizeCache->{0.,{0.,0.}}]],"Output",CellFrame->0,ShowCellBracket->False,CellMargins->-2, | |
CellElementSpacings->{"CellMinHeight"->5,"ClosedCellHeight"->0.01},CellOpen->True, | |
FontSize->1,CellTags->"tracking",ExpressionUUID->"df837d52-a462-4b86-8ccd-8ce3e75ed617"],Cell[ | |
BoxData[ |