My Mac OS X scripts for different needs (may need some of my Mac OS X command line utils)
Shell Perl
Failed to load latest commit information.
.gitconfig
.gitignore gitignore May 28, 2012
.profile Add slomo.sh script. Useful to process iOS 240 FPS video files. Uses … Apr 29, 2016
.zshrc readme upd Jan 9, 2014
README.md readme upd Jan 9, 2014
build_gcc.sh
convert_video_4_ios.sh convert_video_4_ios.sh improved: video bitrate and title from filename May 17, 2013
devlifestat.sh devlifestat.sh added Sep 30, 2013
duit.sh Add ql.sh and fix duit for custom bash shells Nov 25, 2014
gitcb.sh Update gitcb.sh to new git syntax and fix fatal error if outside git … Jun 1, 2016
gpull.sh Added gpull.sh, gpush.sh and make_dmg.sh Sep 27, 2012
gpullcb.sh Added gpullcb and gpushcb scripts (require .profile) Nov 7, 2012
gpush.sh Added gpull.sh, gpush.sh and make_dmg.sh Sep 27, 2012
gpushcb.sh Added gpullcb and gpushcb scripts (require .profile) Nov 7, 2012
habrastat.sh habrastat error handling Sep 30, 2013
habraupload.sh chmod +x Jan 21, 2014
installable.sh Add slomo.sh script. Useful to process iOS 240 FPS video files. Uses … Apr 29, 2016
installscripts.sh Updated install/uninstall scripts Nov 7, 2012
make_dmg.sh [make_dmg] Added icon size argument Apr 6, 2016
openrandom.sh Initial commit May 28, 2012
ql.sh Add ql.sh and fix duit for custom bash shells Nov 25, 2014
slomo.sh Add slomo.sh script. Useful to process iOS 240 FPS video files. Uses … Apr 29, 2016
svn-changes.sh file stat included… beware of running with "-r 1"! Jun 5, 2012
svn-log.sh fixes Jun 5, 2012
test_run.sh Added test_run.sh Aug 12, 2013
toggle_finder_show_hidden.sh Fixed some issues in make_dmg.sh, added toggle_finder_show_hidden.sh Sep 28, 2012
togif.sh
uninstallscripts.sh
youdown.pl youdown.pl added (not mine, but useful) Oct 21, 2013

README.md

macscripts - my collection of useful OS X shell scripts

When I come to a problem that can be solved with shell scripting, I put a solution here. Feel free to fork and modify my code.

Some explanations

.gitconfig - my config for git. All my favorite aliases live here.

.profile - bash profile, common defines, functions, etc, for bash. I use zsh for now, but I really call this file from .zshrc.

.zshrc - zsh settings.

build_gcc.sh - script for building gcc 4.7 for OS X.

convert_video_4_ios.sh - script for converting any video to iOS-compatible format (mpeg4/aac). This script uses ffmpeg for real work. As an arguments, pass list of files to convert (for example, ./convert_video_4_ios.sh *.avi). Resulting filenames are the same as in input, but with .mp4 extension.

duit.sh - a wrapper for du which outputs results in a human-readable format and sorted by size.

togif.sh - a wrapper for ffmpeg and ImageMagic's convert which converts any video file to gif format. Quality is bad so it needs some optimization.

gitcb.sh - when called from git repository, outputs current branch name. If you are in detached head state, it outputs empty string.

gpull.sh - alias for git pull origin $@.

gpullcb.sh - alias for gpull.sh $(gitcb.sh).

gpush.sh - alias for git push origin $@.

gpushcb.sh - alias for gpush.sh $(gitcb.sh).

installable.sh - exports list of scripts to be installed in /usr/local/bin.

installscripts.sh - installs some scripts in /usr/local/bin (as symlinks without .sh)

make_dmg.sh - highly customizable utility for creating .dmg image from an application. See http://habrahabr.ru/post/152677/ for more information (in russian) or use make_dmg.sh -h for short help message.

openrandom.sh - opens random file from current directory (recursive) with open command. This script uses my randstr command line tool.

svn-changes.sh - script for creating html report from svn diff. Uses diff2html.py.

svn-log.sh - simple tool for browsing svn log.

Really, I don't use svn anymore, so these scripts are subject to remove.

toggle_finder_show_hidden.sh - toggles OS X Finder's "show hidden files" option.

uninstallscripts.sh - removes all scripts installed by installscripts.sh.