View pulseaudio-equalizer-setup.sh
This file contains 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 -ux | |
# This is a small script to setup the PulseAudio equalizer as a desktop | |
# application that runs just when the 'qpaeq' GUI is open. | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or distribute | |
# this software, either in source code form or as a compiled binary, for any | |
# purpose, commercial or non-commercial, and by any means. |
View appify.sh
This file contains 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 | |
VERSION=4.0.1 | |
SCRIPT=`basename "$0"` | |
APPNAME="My App" | |
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns" | |
OSX_VERSION=`sw_vers -productVersion` | |
PWD=`pwd` | |
function usage { |
View man.sh
This file contains 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
function man { | |
local CMD=${@: -1} | |
# Strangely, 'whatis' and even 'man -f' may fail to find the command. | |
if whatis $CMD &>/dev/null || [[ $(info -w $CMD) == '*manpages*' ]]; then | |
command man "$@" | |
elif info -w &>/dev/null; then | |
info "$@" | |
else | |
for HELP in --help -h -help --usage; do | |
if $CMD $HELP &>/dev/null; then |
View which.sh
This file contains 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
function which { | |
local CMD=$1; | |
if alias $1 &>/dev/null; then | |
CMD=$(alias $1 | sed "s/^alias $1='\([^' ]*\).*$/\1/"); | |
if [[ "$CMD" != $1 ]]; then | |
type $1; | |
which "$CMD"; # recursive call for nested aliases | |
return; | |
fi; | |
fi; |