Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
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
zip -r files.zip ./directory -x "*.git*" -x "*.DS_Store" |
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/sh | |
# | |
# Here is the software that is needed for the conversion to take place: | |
# 1. DjVuLibre . | |
# 2. LibTiff . | |
# | |
# NOTE: The ddjvu utility has an option to convert specific layers. One common mistake is to convert only the mask layer | |
# or the foreground layer . Technically speaking, the mask layer is the one that should have the actual text but in | |
# practice I have seen that the the DjVu encoder occasionally puts portions of the text in the background layer. Thus, | |
# if you only take the foreground or mask layers, you will lose those bits in the background. If your specific files |
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/zsh | |
#mkicns.sh | |
FN=${1##*/} | |
DN=${1%/**} | |
BN=${FN%.*} | |
IS=iconset | |
ID=$BN.$IS |
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
if [ $# -ne 1 ]; then | |
echo "Usage: make-icns icon.png" | |
exit 1 | |
fi | |
IMAGE=$1 | |
OUT=`basename ${IMAGE%\.*}`.iconset | |
mkdir $OUT | |
sizes=(16 32 128 256 512) |
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.
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 | |
# convert DjVu -> PDF | |
# usage: djvu2pdf.sh <file.djvu> | |
# depends on ddjvulibre package, To install package run `sudo apt-get install ddjvulibre` | |
i="$1" | |
echo "------------ converting $i to PDF ----------------"; | |
o="`basename $i .djvu`" | |
o="$o".pdf |
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
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
set chrome_running to is_running("Google Chrome") | |
if chrome_running then | |
tell application "Google Chrome" | |
repeat with w in (windows) | |
if mode of w is "incognito" then | |
set index of w to 1 |
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
if application "Google Chrome" is running then | |
tell application "Google Chrome" to make new window with properties {mode:"incognito"} | |
else | |
do shell script "open -a /Applications/Google\\ Chrome.app --args --incognito" | |
end if | |
tell application "Google Chrome" to activate |
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
#!/usr/bin/env bash | |
size=1024 # MB | |
mount_point=$HOME/tmp | |
name=$(basename "$mount_point") | |
usage() { | |
echo "usage: $(basename "$0") [mount | umount | remount | check | orphan]" \ | |
"(default: mount)" >&2 | |
} |