To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion
| " :Cfilter[!] /{pat}/ | |
| " :Cfilter[!] {pat} | |
| " Filter the quickfix looking for pattern, `{pat}`. The pattern can match the filename or text. | |
| " Providing `!` will invert the match (just like `grep -v`). | |
| " Note: :cfilter command abbreviation is provided for convenience | |
| " | |
| " :Lfilter[!] /{pat}/ | |
| " :Lfilter[!] {pat} | |
| " Same as :Cfilter but use the location list. | |
| " Note: :lfilter command abbreviation is provided for convenience |
| #!/usr/bin/env bash | |
| # Usage: bash uninstall_vmware.bash | |
| remove() { | |
| entry="$1" | |
| echo -ne "Removing $entry [" | |
| sudo rm -rf "$entry" | |
| if [[ ! -e "$entry" ]]; then | |
| echo -ne "OK" |
| #!/bin/bash | |
| # Usage | |
| # $ ./install-cert-macos.sh "/path/to/cert" | |
| CERT_PATH="$1" | |
| # First, grab the SHA-1 from the provided SSL cert. | |
| CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g") | |
| # Next, grab the SHA-1s of any standard.dev certs in the keychain. | |
| # Don't return an error code if nothing is found. |
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
| #!/bin/bash | |
| watch -n 5 --differences mysqladmin processlist |
| #!/bin/bash | |
| watch -n 5 --differences mysqladmin processlist |
| launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist && \ | |
| sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist && \ | |
| sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz && \ | |
| sudo pkgutil --forget org.macosforge.xquartz.pkg && \ | |
| rm -rf ~/.serverauth* && rm -rf ~/.Xauthorit* && rm -rf ~/.cache && rm -rf ~/.rnd && \ | |
| rm -rf ~/Library/Caches/org.macosforge.xquartz.X11 && rm -rf ~/Library/Logs/X11 |
| #!/bin/bash | |
| # Usage: ./icon.sh icon.png | |
| icon=$1 | |
| icon_name=${icon%.*} | |
| icon_dir=${icon}.iconset | |
| icon_tmp_path=/tmp/${icon_dir} |
| #!/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 { |
| inoremap <expr> <tab> pumvisible() ? '<c-n>' : '<tab>' | |
| inoremap <expr> <s-tab> pumvisible() ? '<c-p>' : '<tab>' | |
| augroup autocomplete | |
| autocmd! | |
| autocmd TextChangedI * call TypeComplete() | |
| augroup end | |
| fun! TypeComplete() | |
| if getline('.')[col('.') - 2] =~ '\K' && getline('.')[col('.') - 1] !~ '\K' | |
| call feedkeys("\<c-n>") | |
| end |