code
stringlengths
1
1.96M
language
stringclasses
1 value
#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under t...
Shell
#!/bin/sh glib-gettextize -f -c intltoolize --copy --force --automake aclocal automake --add-missing --copy autoconf rm -f intltool-extract.in intltool-merge.in intltool-update.in
Shell
#!/bin/bash # # Starts a basic web server on the port specified. # # ./serve.sh 3000 -> http://localhost:3000 # # Copyright 2012 Eric Bidelman <ebidel@gmail.com> port=$1 if [ $# -ne 1 ] then port=8000 fi if [ $(uname -s) == "Darwin" ] then open=open else open=xdg-open fi $open http://localhost:$port/templat...
Shell
#!/bin/bash TXTCOLOR_DEFAULT="\033[0;m" TXTCOLOR_RED="\033[0;31m" TXTCOLOR_GREEN="\033[0;32m" COCOS2DX20_TRUNK=`pwd`/../../.. OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/debug/ OUTPUT_RELEASE=$COCOS2DX20_TRUNK/lib/linux/release/ check_make_result() { if [ 0 != $? ]; then exit 1 fi } DEPENDS='libx11-dev' DEPE...
Shell
#!/bin/bash TXTCOLOR_DEFAULT="\033[0;m" TXTCOLOR_RED="\033[0;31m" TXTCOLOR_GREEN="\033[0;32m" COCOS2DX20_TRUNK=`pwd`/../../.. OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/debug/ OUTPUT_RELEASE=$COCOS2DX20_TRUNK/lib/linux/release/ check_make_result() { if [ 0 != $? ]; then exit 1 fi } DEPENDS='libx11-dev' DEPE...
Shell
APPNAME="ZooEscape" # options buildexternalsfromsource= usage(){ cat << EOF usage: $0 [options] Build C/C++ code for $APPNAME using Android NDK OPTIONS: -s Build externals from source -h this help EOF } while getopts "sh" OPTION; do case "$OPTION" in s) buildexternalsfromsource=1 ;; h) usage exit 0 ;; esac done ...
Shell
################################################# ################################################# # # # /etc/zshrc # # # ##############################################...
Shell
################################################# ################################################# # # # /etc/zshenv # # ...
Shell
#!/bin/zsh -f # # timestamp an empty file /tmp/.awake with the time the system was last awakened from sleep # Requires GNU fileutil version of touch (can be installed with fink) # /usr/bin/touch /tmp/.awake_"$( grep "System Wake" /var/log/system.log | awk '{print $3}' | tail -n 1 )"
Shell
#!/bin/zsh -f mdfind -onlyin /Applications -onlyin /Developer "kMDItemContentType == 'com.apple.application-*'" >/dev/null
Shell
#!/bin/zsh -f # A template file is included in Library/LaunchAgents/zsh.email.sshtunnels.plist # You can edit it (it is Disabled by default, and you need to put in your own # email server name(s) as arguments), and then place it in /Users/$USER/LaunchAgents # to run the tunnel-checker automatically. T...
Shell
#!/bin/zsh -f mdfind -onlyin /Applications -onlyin /Developer "kMDItemContentType == 'com.apple.application-*'" >/dev/null
Shell
#!/bin/zsh -f # # timestamp an empty file /tmp/.awake with the time the system was last awakened from sleep # Requires GNU fileutil version of touch (can be installed with fink) # /usr/bin/touch /tmp/.awake_"$( grep "System Wake" /var/log/system.log | awk '{print $3}' | tail -n 1 )"
Shell
#!/bin/zsh -f # A template file is included in Library/LaunchAgents/zsh.email.sshtunnels.plist # You can edit it (it is Disabled by default, and you need to put in your own # email server name(s) as arguments), and then place it in /Users/$USER/LaunchAgents # to run the tunnel-checker automatically. T...
Shell
#!/bin/zsh -f # Describe named function located in $ZDOT_TEMPLATE/local-functions/* function usage { print "Usage: help_template_functions [function name]" } if [[ $# == 0 ]];then command open http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/ZSH_Template_Function_Suites if [[ $? == 0 ]];then print ""; usage...
Shell
#!/bin/zsh -f #------------------------------------------------------------------------ # quit # # by Wataru Kagawa (05/17/05) # wkagawa@jota.gsc.riken.go.jp # # A function to quit Mac OS X applications. Native applications are # quitted using an osascript, and X11 applications are quitted by killing # its pid. # #...
Shell
#!/bin/zsh -f #----------------------------------------------- # sync_fink # # by Wataru Kagawa (05/17/05) # wkagawa@jota.gsc.riken.go.jp # # syncronize the /sw folder on a remote computer # with that of the host computer. # # USAGE: # sync_fink <remote name> #----------------------------------------------- functio...
Shell
#!/bin/zsh -f # Function to run a program in second X11 display # using the specified remove host x-server (eg: startkde, startxfce4) # without disturbing the default 24-bit X11. # See also 8bitx # Created by William Scott on 2007-04-26. # Copyright (c) 2007. All rights reserved. version="0.0.1" # Check to ...
Shell
#!/bin/zsh -f # configure_zsh_templates # Created by William Scott on 2007-04-27. # Copyright (c) 2007. All rights reserved. ############################################################################## version="0.0.1" ############################################################################## ## emacs or...
Shell
#!/bin/zsh -f # cpbcp: copy the full path of a command to the pastboard eval "echo -n $( echo "$@" | sed -e "s/ / =/g" -e "s/^/=/" ) \ | sed -e \"s:/Users/$USER:\~:g\" | tee /dev/tty | pbcopy" echo
Shell
#!/bin/zsh -f # usage: open-x11 PROGRAM ARG-1 ARG-2 ... # The original open-x11 was broken -- when you tried to issue arguments it thought # they were programs. ################################################################################### # Initialize Fink # If the user has installed fink, find it. if [...
Shell
#!/bin/zsh -f if [[ $1 == '-P' ]];then WhichPashua='use_external' print " Using the user-installed Pashua.app" else WhichPashua='use_internal' # Dockless version # print " Using internal Pashua framework in $ZDOT/zshrc.d/local-functions/etc" fi #----------------------------------------...
Shell
#!/bin/zsh -f # April 17, 2007: Fixed to work with URLs lacking ~username # set -x # cds, when issued from the command prompt in Terminal, iTerm, or xterm, will cd # into the directory corresponding to the web page displayed in Safari. # Put your top-level server directory here: if [[ -z $PUBLIC_HTML ]];then ...
Shell
#!/bin/zsh -f # short cut to zsh files function zshf { cd $ZDOT }
Shell
#!/bin/zsh -f osascript -e "tell app \"$1\" to quit" if [[ $? != 0 ]];then print "Resorting to hard kill" killall $1 fi
Shell
#!/bin/zsh -f # If editing a single html file in TextMate, open it in both Safari and TextMate # simultaneously function mate { if [[ $# == 1 && ( $1:e == html || $1:e == htm ) ]];then open -a Safari $1 ; command mate $1 else command mate "$@" fi }
Shell
#!/bin/zsh -f # function that greps all of the framework header files for numbers associated with error messages find {/System,}/Library/Frameworks -name "*.h" -exec grep $1 /dev/null "{}" \;;
Shell
#!/bin/zsh -f # function osa_display_dialog takes up to three arguments (button item options) # supplied after invoking the function. # Display times out according to the variable $timeout in seconds (defaults to 15 sec). if [[ -z $timeout ]];then timeout='15' fi # The variable $dialogue_text is ...
Shell
#!/bin/zsh -f thePath="$( osascript<<END try tell application "Finder" to set the source_folder to (folder of the front window) as alias on error -- no open folder windows set the source_folder to path to desktop folder as alias end try set thePath to (POSIX path of the source_folder as string) set result to thePat...
Shell
#!/bin/zsh -f # usage: gdirs [-fF] # gdirs -f cd's both terminal and finder to chosen directory # gdirs -F cd's only the Finder to the chosen directory # gdirs with no argument changes only the terminal directory CDD=OFF ; CDF=OFF if [[ $1 == '-f' ]];then CDD=ON elif [[ $1 == '-F' ]];then CDF=ON else CDD=OFF...
Shell
#!/bin/zsh -f echo -n "$(posd)" |perl -p -e 's; ;\\\ ;g' | pbcopy
Shell
#!/bin/zsh -f # Function open to augment the Apple command open function UsageBlab { FxnName='open' print "" print "\tusage: $FxnName [-abeFfpstxh] [<application\ name>] [<file\ name>]" print "" print "\t$FxnName -a foo [bar] \t Opens application foo [and file bar]" print "\t$Fxn...
Shell
#!/bin/zsh -f if [[ -z $1 ]]; then /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend else USERID=`/usr/bin/id -u $1`; if [[ -z $USERID ]]; then return -1; fi /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -switchToUserID $USERID...
Shell
#!/bin/zsh -f # set the scroll wheel speed on a mouse using the System Preferences contol panel. if [[ $# == 0 ]];then print "scrollspeed changes the mouse scroll wheel speed via System Preferences" print "Usage: scrollspeed N [where N ranges from 0 (slowest) to 7 (fastest)]" print -n "Open the Keyboard and Mous...
Shell
#!/bin/zsh -f # Generate a list of all OS X applications that can be opened with "open -a" ################################################################################## # print "\e[41m\e[1mLoading application name completions for 'open -a' command...\e[0m" # -------------------------------------------...
Shell
#!/bin/zsh -f # Function mdattr # Create or revise an existing Apple-type metadata AttributeName of the form kMDItemAttributeName version="0.0.2" ############################################################################### # Created by W . G. Scott on 22 January 2009. # Copyright (c) . All rights rese...
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a ...
Shell
#!/bin/zsh -f #=========== # host setup #=========== USE_SSH_KNOWN_HOSTS='yes' USE_CUSTOM_HOSTS='no' USE_ETC_HOSTS='yes' #=========== # user setup #=========== USE_ETC_USERS='yes' USE_CUSTOM_USERS='no'
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a...
Shell
#!/bin/zsh -ef if [[ -d $HOME/.a2ps ]];then command mkdir -p $HOME/.a2ps fi if [[ -f $HOME/.a2ps/a2psrc ]]; then mv $HOME/.a2ps/a2psrc $HOME/.a2ps/a2psrc_$$ fi ln -s $ZDOT/zshrc.d/local-functions/etc/a2psrc $HOME/.a2ps/a2psrc command a2ps "$@" if [[ -f $HOME/.a2ps/a2psrc_$$ ]];then rm $HOME/.a2ps/a2psr...
Shell
#!/bin/zsh -f # function my_prefs_edit # This function should be run to create a .zsh/my_edit_rc file in the user's home # directory. This allows the user of my edit and hydra functions to pick their # own default applications. # This function is called from edit or nonasciiedit or hydra; there is no # requirement ...
Shell
#!/bin/zsh -f grep -iIrn "$1" "$(posd)"
Shell
#!/bin/zsh -f find "$(posd)" -name "*$1*";
Shell
#!/bin/zsh -f # # if [[ $(sw_vers -productVersion) < 10.5 ]]; then # # sudo niload -m -v fstab . < /etc/fstab # # else # # print "niload does not exist on 10.5" # print "There is no longer a need for this function (command)" # print "Simply use the \e[1m automount \e[0m command instead" # print "...
Shell
#!/bin/zsh -f osascript <<-eof tell app "Finder" activate set f to POSIX path of ((choose folder with prompt \ "Select a directory (folder):\ $Example") as string) end eof
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a...
Shell
#!/bin/zsh -f # supporting file for apod.pl # made by Harold Bakker, harold@haroldbakker.com # http://www.haroldbakker.com/ # Hacked a bit by WGS to work in any directory if [[ "$(basename $1)" == "$1" ]];then picturepath="$PWD/$1" else picturepath="$1" fi /usr/bin/osascript <<END tell application "Finder" set...
Shell
#!/bin/zsh -f # Clean caches for zsh users to force updating if [[ $1 == (-h|-help|--h|--help) || $# > 1 ]]; then print "" print "Usage: zsh_cache_cleaner [-a]" print "Removes old caches for user [default] or everyone [-a] " print "" return 0 fi if [[ $1 == (-a|-all|all|--all) ]]; then ...
Shell
#!/bin/zsh -f # This is a pre-command function that notifies the user when the command (provided as an argument) # completes. It attempts to use growlnotify if present, otherwise it prints a message. If the command # returns anything other than 0 (i.e., it fails), the growl window remains sticky. # A command complet...
Shell
#!/bin/zsh -f #---------------------------------------------------------- # guidirs_pashua # # Written by Wataru Kagawa (02/20/05) # wkagawa@jota.gsc.riken.go.jp # # A modified version of guidirs (by William Scott), which # is a gui version of the pushd command. # # This function executes the Pashua program and displ...
Shell
#!/bin/zsh -f version="2.0.1" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # set -x # Obtained and modified from a bash shell script available at # http://www.osxfaq.com/tip...
Shell
#!/bin/zsh -f # Function to renew a dynamically allocated IP address via BOOTP or DHCP. # Try en0 first, and then try en1 # Finally, test the IP address. sudo ipconfig set en0 BOOTP if [[ $? != 0 ]];then print "Try this on en1" sudo ipconfig set en1 BOOTP fi sudo ipconfig set en0 DHCP if [[ $? != 0 ]];then ...
Shell
#!/bin/zsh -f # Function to get the IP address of the computer or router if [[ $1 == '-r' || $1 == '-R' ]];then # curl -s http://www.showmyipeurope.com/ | head -n 1 | awk '{print $8}' | perl -p -e 's|</TITLE><META||g' curl -s http://www.showmyip.com/ | head -n 1 | awk '{print $8}' | perl -p -e 's|</TITLE><...
Shell
#!/bin/zsh -f # This is a pre-command function that notifies the user when the command (provided as an argument) # completes. It attempts to use growlnotify if present, otherwise it prints a message. If the command # returns anything other than 0 (i.e., it fails), the growl window remains sticky. # In each case the ...
Shell
#!/bin/zsh -f echo -n "$PWD" |perl -p -e 's; ;\\\ ;g' | pbcopy print "\e[7m$PWD\e[0m copied to clipboard"
Shell
#!/bin/zsh -f # Function to open a named TextMate project file given just the file name prefix. mdfind does the hunting for you. tmprojarray=( $( mdfind "kMDItemKind == 'TextMate project'" )) if [[ $# != 1 || "$1" == "-h" || "$1" == "-help" || "$1" == "--help" ]];then print "" print "\e[1mUsage:\e[0m $0 \e[1mpro...
Shell
#!/bin/zsh -f # eds, when issued from the command prompt in Terminal, iTerm, or xterm, will cd # into the directory corresponding to the web page displayed in Safari and # will then open the file in whatever HTML editing program you have specified # below. # Define this as you wish: # HTML_EDITOR='edit' ...
Shell
#!/bin/zsh -f # function to run macmail.pl, an OSX mail drop-in replacement for # the unix mail command. You can define the following alias in your # aliases file if you want true drop-in replacement: # alias mail=macmail # Author of macmail.pl: Nathaniel Nystrom <nystrom@cs.cornell.edu> # His software and this wra...
Shell
#!/bin/zsh -fx # Function to permit the user to switch the prompt easily. # Find the possible options from the themes provided: prompt_theme_options=( $fpath/prompt_*(N:t) ) ################################################################################ # function ChoosePromptTheme allows ...
Shell
#!/bin/zsh -f # set -x # Start a remote xwindowmanager session but in a nested window. ############################################################################### # Do some reality checks: # if [[ ! -x $(which Xnest) && ! -x /usr/X11/bin/Xephyr ]];then if [[ ! -x $(which Xnest) ]];then print "Xnest and X...
Shell
#!/bin/zsh -f #set -x ############################################################################ function FinderSelector { osascript << eof1 try tell application "Finder" to set the source_folder to (folder of the front window) as alias on error...
Shell
#!/bin/zsh -f function airport { /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport "$@" }
Shell
#!/bin/zsh -f # cpbcp: copy the full path of a command to the pastboard eval "echo -n $( echo "$@" | sed -e "s/ / =/g" -e "s/^/=/" ) \ | sed -e \"s:/Users/$USER:\~:g\" | tee /dev/tty | pbcopy" echo
Shell
#!/bin/zsh -f # The _open completion function in 10.4 should work very quickly. If it doesn't, this # may be due to indexing being turned off for the root partition. If we are running 10.4 # check to see if indexing is disabled. If it is disabled, turn it on. if [[ $(whereis mdfind) == /usr/bin/mdfind ]];then if...
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a...
Shell
#!/bin/zsh -f # This is a pre-command function that notifies the user when the command (provided as an argument) # completes. It attempts to use growlnotify if present, otherwise it prints a message. If the command # returns anything other than 0 (i.e., it fails), the growl window remains sticky. # A command complet...
Shell
#!/bin/zsh -f # set the scroll wheel speed on a mouse using the System Preferences contol panel. if [[ $# == 0 ]];then print "scrollspeed changes the mouse scroll wheel speed via System Preferences" print "Usage: scrollspeed N [where N ranges from 0 (slowest) to 7 (fastest)]" print -n "Open the Keyboard and Mous...
Shell
#!/bin/zsh -f command defaults write com.apple.dashboard mcx-disabled -boolean YES command killall Dock return 0
Shell
#!/bin/zsh -f command defaults write com.apple.dashboard mcx-disabled -boolean NO command killall Dock return 0
Shell
#!/bin/zsh -f osascript <<-eof tell app "Finder" activate set f to POSIX path of ((choose file with prompt \ "Select a file:\ $Example") as string) end eof
Shell
#!/bin/zsh -f # usage: open-x11 PROGRAM ARG-1 ARG-2 ... # The original open-x11 was broken -- when you tried to issue arguments it thought # they were programs. ################################################################################### # Initialize Fink # If the user has installed fink, find it. if [...
Shell
#!/bin/zsh -f echo -n "$PWD" |perl -p -e 's; ;\\\ ;g' | pbcopy print "\e[7m$PWD\e[0m copied to clipboard"
Shell
#!/bin/zsh -f # FILE NAME addIcon # Uses /usr/bin/sips --addIcon but preserves the original file creation date. version="0.0.1" ############################################################################### # Created by on . # Copyright (c) . All rights reserved. # This program is free software;...
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # For 10.5: Eliminated niutil commands in favor of Directory Service # Obtained and modified from a...
Shell
#!/bin/zsh -f osascript -e "tell app \"$1\" to quit" if [[ $? != 0 ]];then print "Resorting to hard kill" killall $1 fi
Shell
#!/bin/zsh -f # set -x # Start a remote xwindowmanager session but in a nested window. ############################################################################### # Do some reality checks: # if [[ ! -x $(which Xnest) && ! -x /usr/X11/bin/Xephyr ]];then if [[ ! -x $(which Xnest) ]];then print "Xnest and X...
Shell
#!/bin/zsh -f version="2.0.0" # The script must be run as an admin user # if [[ -z $(/usr/bin/id -p $USER | grep admin) ]];then print "You must be an administrative user with sudo privileges in order to run $0" fi # Obtained and modified from a bash shell script available at # http://www.osxfaq.com/tips/unix-trick...
Shell
#!/bin/zsh -f # Parts of this come from Apple's NFS startup file, modified # by W. G. Scott and many important improvements were then # added by Gary Kerbaugh. Specifically, the script now checks # for successful outcome of disk arbitration, which can take # awhile for really big disks and RAID devices. # This is a ...
Shell
#!/bin/zsh -f # Describe named function located in $ZDOT_TEMPLATE/local-functions/* function usage { print "Usage: help_template_functions [function name]" } if [[ $# == 0 ]];then command open http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/ZSH_Template_Function_Suites if [[ $? == 0 ]];then print ""; usage...
Shell
#!/bin/zsh -f # April 17, 2007: Fixed to work with URLs lacking ~username # set -x # cds, when issued from the command prompt in Terminal, iTerm, or xterm, will cd # into the directory corresponding to the web page displayed in Safari. # Put your top-level server directory here: if [[ -z $PUBLIC_HTML ]];then ...
Shell
#!/bin/zsh -f # function to run macmail.pl, an OSX mail drop-in replacement for # the unix mail command. You can define the following alias in your # aliases file if you want true drop-in replacement: # alias mail=macmail # Author of macmail.pl: Nathaniel Nystrom <nystrom@cs.cornell.edu> # His software and this wra...
Shell
#!/bin/zsh -f # zipit: Use ditto to create zip files with resource forks (now default) # Function authored by Gary Kerbaugh. Updated syntax W G Scott May 4 2007 # I have added -V for verbose output. function zipit { ditto -c -k -V "$@" "${1}.zip"; }
Shell
#!/bin/zsh -f # function to start the screensaver (and thereby lock the screen if you have set this up) open /System/Library/Frameworks/Screensaver.framework/Versions/A/Resources/ScreenSaverEngine.app "$@" return $?
Shell
#!/bin/zsh -f # supporting file for apod.pl # made by Harold Bakker, harold@haroldbakker.com # http://www.haroldbakker.com/ # Hacked a bit by WGS to work in any directory if [[ "$(basename $1)" == "$1" ]];then picturepath="$PWD/$1" else picturepath="$1" fi /usr/bin/osascript <<END tell application "Finder" set...
Shell
#!/bin/zsh -f # Function to run a program in second X11 display # using the specified remove host x-server (eg: startkde, startxfce4) # without disturbing the default 24-bit X11. # See also 8bitx # Created by William Scott on 2007-04-26. # Copyright (c) 2007. All rights reserved. version="0.0.1" # Check to ...
Shell
#!/bin/zsh -f LISTARRAY=( /usr /bin /sbin /private /etc /var /tmp ) if [[ "$1" == "-undo" || "$1" == "--undo" || "$1" == "undo" ]]; then foreach file in $LISTARRAY if [[ -h $file ]];then sudo /Developer/Tools/SetFile -P -a V $file else sudo /Developer/Tools/SetFile -a V $file ...
Shell
#!/bin/zsh -f if [[ $(uname) != "Darwin" ]]; then print "This function is specific to OS X" return 1 fi if [[ $( defaults read com.apple.dock workspaces ) = 1 ]]; then defaults write com.apple.dock workspaces -bool false killall Dock print "\e[1m Turning \"Spaces\" off. \e[0m " elif [[ $(...
Shell
#!/bin/zsh -f # # if [[ $(sw_vers -productVersion) < 10.5 ]]; then # # sudo niload -m -v fstab . < /etc/fstab # # else # # print "niload does not exist on 10.5" # print "There is no longer a need for this function (command)" # print "Simply use the \e[1m automount \e[0m command instead" # print "...
Shell
#!/bin/zsh -f # # mailit # # Use the perl mail drop in replacement to send mail by command line # http://www.cs.cornell.edu/nystrom/macscripts/mail.txt # Prompt user for email address, subject, and attachments # Usage: mailit [recipient@address.com] [attachment.file] ["subject line"] # initialize recipientaddres...
Shell
#!/bin/zsh -f # llock: List all locked files in subdirectories of the argument command find $* -exec GetFileInfo {} \; | command sed -n -e '/file/{h;}' -e '/attribute.*L/{g;p;}'
Shell
#!/bin/zsh -f ####################################################################### ## user_setup ## ## ## ## by Wataru Kagawa ## ## March 05, 2006...
Shell
#!/bin/zsh -f # Function to open a named TextMate project file given just the file name prefix. mdfind does the hunting for you. tmprojarray=( $( mdfind "kMDItemKind == 'TextMate project'" )) if [[ $# != 1 || "$1" == "-h" || "$1" == "-help" || "$1" == "--help" ]];then print "" print "\e[1mUsage:\e[0m $0 \e[1mpro...
Shell
#!/bin/zsh -f command open http://xanana.ucsc.edu/xtal/wiki/index.php/ZSH_on_OS_X return $?
Shell
#!/bin/zsh -f # function to accompany completion function _fink # generates completion cache # The fink function will run this in the background after fink commands # such as selfupdate|selfupdate-cvs|selfupdate-rsync|install|remove|purge|reinstall|index|update|update-all # are issued, to ensure that the completio...
Shell
#!/bin/zsh -f #sysctl hw.logicalcpu | awk '{print $NF}' sysctl -n hw.ncpu return $?
Shell
#!/bin/zsh -f if [[ $(uname) != Darwin ]]; then # Don't try this if we are not using OS X print "\e[1m This only works on Mac OS X. \e[0m " return 1 fi # function osa_display_dialog takes up to three arguments (button item options) # supplied after invoking the function. function osa_display_dialog { # Disp...
Shell
#!/bin/zsh -f # cdt: # change the current working directory to that corresponding to the file displayed in Textmate's frontmost window # change this and the Finder (-F) # change the finder only (-f) DocPath="$(osascript -e 'tell app "TextMate" to return path of first document')" DocDir="$(dirname "$DocPath")" print...
Shell
#!/bin/zsh -f osascript <<-eof tell app "Finder" activate set f to POSIX path of ((choose folder with prompt \ "Select a directory (folder):\ $Example") as string) end eof
Shell
#!/bin/zsh -f # cdd: change the Finder directory along with the pwd function cdd { command cd "$@" ; ( fdc >|/dev/null & ) }
Shell
#!/bin/zsh -f # If editing a single html file in TextMate, open it in both Safari and TextMate # simultaneously function mate { if [[ $# == 1 && ( $1:e == html || $1:e == htm ) ]];then open -a Safari $1 ; command mate $1 else command mate "$@" fi }
Shell