Setup new MacOS installation
Homebrew
brew tap homebrew/dupes
brew update
brew upgrade
brew install \
"awscli" \
"bash" \
#!/usr/bin/env bash | |
set -e | |
while [ true ] | |
do | |
if ifconfig | pcregrep -M -o '^[^\t:]+(?=:([^\n]|\n\t)*status: active)' | grep awdl0; | |
then | |
echo "Shutting down awdl0..." | |
ifconfig awdl0 down | |
else |
brew tap homebrew/dupes
brew update
brew upgrade
brew install \
"awscli" \
"bash" \
Converts a directory of images into a modern EPUB3 ebook. Use a tool to extract CBZ/CBR/CBT files and then run this program to generate a nice fixed-layout EPUB ebook of it. You can optionally set the reading direction to right-to-left (e.g. for manga). For Kobo ereaders, use the file extension .kepub.epub to get the modern reader and correct reading direction.
Install dependencies with pip install imagesize lxml
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 ) | |
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) | |
# without using Razer's official uninstall tool. | |
# Tested on OS X 10.11.5 in July 2016. | |
# Edited with additional steps for later OS X versions, | |
# contributed by commenters on this gist. | |
# Step 1: In your terminal: stop and remove launch agents | |
launchctl remove com.razer.rzupdater |
I hereby claim:
To claim this, I am signing this object:
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
heroku restart
heroku pg:reset DATABASE
(no need to change the DATABASE
)heroku run rake db:migrate
heroku run rake db:seed
(if you have seed)One liner
heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate
heroku restart
heroku pg:reset DATABASE
(no need to change the DATABASE
)heroku run rake db:migrate
heroku run rake db:seed
(if you have seed)One liner
heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
Is a useful one-liner which will give you the full directory name of the script no matter where it is being called from
These will work as long as the last component of the path used to find the script is not a symlink (directory links are OK). If you want to also resolve any links to the script itself, you need a multi-line solution:
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink