mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm mohan-cao
💻
This file contains hidden or 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
| /// This code is functionally equivalent to the filter code in IFTTT | |
| /// Gets largest dimension image from FB RSS <content> in the RSS entry | |
| function GetBiggestImage(content) { | |
| if (!content) return ""; | |
| if (Array.isArray(content)) { | |
| return content.map(function(e){return e.map(function(f){return GetBiggestImage(f)})}) | |
| } | |
| var re = /src\s*=\s*"(.+?)"/g; | |
| var biggestDim = [0, 0]; |
This file contains hidden or 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
| # put this in .zshrc or .bashrc or whatever | |
| # depends on youtube-dl and mac-version iTunes obviously | |
| alias yt-mp3="youtube-dl --extract-audio --embed-thumbnail --audio-format mp3 --audio-quality 0 --exec 'mv {} ~/Music/iTunes/iTunes\ Media/Automatically\ Add\ to\ iTunes.localized/' " |
This file contains hidden or 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 | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run as root" | |
| exit | |
| fi | |
| cd /usr/lib/slack/resources/app.asar.unpacked/src/static/ | |
| # Make sure we don't append the script multiple times |
This file contains hidden or 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 | |
| mvn clean | |
| find . -type f -name .DS_STORE -delete | |
| find . -type d -name .idea -exec rm -r "{}" \; | |
| find . -name .gitignore -delete | |
| find . -type f -name "*.iml" -delete |