Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| #!/bin/bash | |
| # store the current dir | |
| CUR_DIR=$(pwd) | |
| # Let the person running the script know what's going on. | |
| echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
| # Find all git repositories and update it to the master latest revision | |
| for i in $(find . -name ".git" | cut -c 3-); do |
| // ==UserScript== | |
| // @id www.youtube.com-2925af97-1b59-4d38-bc09-e2fff53f9d6a@defb5eb4-0168-463d-913b-8b4fbfa18502 | |
| // @name YouTube + MP3 Downloader | |
| // @version 1.3.2.1 | |
| // @namespace defb5eb4-0168-463d-913b-8b4fbfa18502 | |
| // @author atmega | |
| // @description Download YouTube videos with a single click of a button! | |
| // @include http://www.youtube.com/watch?v=* | |
| // @include http://www.youtube.com/watch?feature=* | |
| // @run-at document-end |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| #!/bin/bash | |
| decode() { | |
| to_decode='s:%([0-9A-Fa-f][0-9A-Fa-f]):\\x\1:g' | |
| printf "%b" `echo $1 | sed 's:&:\n:g' | grep "^$2" | cut -f2 -d'=' | sed -r $to_decode` | |
| } | |
| data=`wget http://www.youtube.com/get_video_info?video_id=$1\&hl=pt_BR -q -O-` | |
| url_encoded_fmt_stream_map=`decode $data 'url_encoded_fmt_stream_map' | cut -f1 -d','` | |
| signature=`decode $url_encoded_fmt_stream_map 'sig'` | |
| url=`decode $url_encoded_fmt_stream_map 'url'` | |
| test $2 && name=$2 || name=`decode $data 'title' | sed 's:+: :g;s:/:-:g'` |
| -- AppleScript -- | |
| -- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
| -- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| -- This method is as good as its JXA counterpart. | |
| -- Webkit variants include "Safari", "Webkit", "Orion". | |
| -- Specific editions are valid, including "Safari Technology Preview". | |
| -- "Safari" Example: | |
| tell application "Safari" to return name of front document |
Collection of some of my fav terminal aliases that I use often & collected from the web. This file will be updated with more aliases as I find more. Feel free to comment and share your fav aliases you use :)
vim ~/.bash_profilei and then paste the following at the top of the file:| 1033edge.com | |
| 11mail.com | |
| 123.com | |
| 123box.net | |
| 123india.com | |
| 123mail.cl | |
| 123qwe.co.uk | |
| 126.com | |
| 150ml.com | |
| 15meg4free.com |
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...
| if application "Spotify" is running and application "iTunes" is not running then | |
| tell application "Spotify" | |
| if player state is stopped then | |
| set display to "No Track Playing" | |
| else | |
| set track_artist to artist of current track | |
| set track_name to name of current track | |
| set track_duration to duration of current track | |
| set seconds_played to player position | |
| set state to "" |
| # BASH Configuration and Aliases | |
| # source: http://natelandau.com/my-mac-osx-bash_profile/ | |
| # source: https://github.com/mathiasbynens/dotfiles | |
| # Sections: | |
| # 0. Execute Only Once (if you want) | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching |