Inspired mostly from the Bootstrap DS215j blog post
# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optwareInspired mostly from the Bootstrap DS215j blog post
# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware| #!/usr/bin/env bash | |
| /Applications/VLC.app/Contents/MacOS/VLC -I rc "$@" |
| #!/usr/bin/env sh | |
| # Sets an icon on file or directory | |
| # Usage setIcon.sh iconimage.jpg /path/to/[file|folder] | |
| iconSource=$1 | |
| iconDestination=$2 | |
| icon=/tmp/`basename $iconSource` | |
| rsrc=/tmp/icon.rsrc | |
| # Create icon from the iconSource | |
| cp $iconSource $icon |
| #!/usr/bin/env bash | |
| if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF | |
| appify v3.0.0 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh | |
| Note that you cannot rename appified apps. If you want to give your app | |
| a custom name, use the second argument: | |
| `basename "$0"` my-script.sh "My App" |
| #!/usr/bin/env python | |
| from subprocess import Popen | |
| from subprocess import PIPE | |
| from re import compile | |
| # Get process info | |
| ps = Popen(['ps', '-caxm', '-orss,comm'], stdout=PIPE).communicate()[0] | |
| vm = Popen(['vm_stat'], stdout=PIPE).communicate()[0] |
| #!/bin/sh | |
| # Just copy and paste the lines below (all at once, it won't work line by line!) | |
| # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
| function abort { | |
| echo "$1" | |
| exit 1 | |
| } | |
| set -e | |
| /usr/bin/which -s git || abort "brew install git first!" |