Shawn Parker Gipetto

View chromeapp.sh
1 2 3 4 5 6 7 8 9 10
#! /bin/bash
 
set -e
 
[ -z $1 ] && dir='/tmp/foo' || dir=$1
chromedev="/Applications/Google Chrome Dev.app"
runChromeDev() {
(
View gist:4704578
1 2 3 4 5 6 7 8 9 10
#! /bin/bash
 
if [[ $EUID -ne 0 ]]; then
echo 'This script must be run as root'
exit 1
fi
 
launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist
mkdir -p /Library/Server/Mail/Data/spool/maildrop
/usr/sbin/postfix set-permissions
View gist:2989520
1 2 3 4 5 6 7 8 9 10
<?php
 
/**
* Allow Shortcodes to be validated as normal phone numbers in OpenVBX
*
* Open the file `OpenVBX/libraries/PhoneNumber.php` and replace the function
* `PhoneNumbers::normalizePhoneNumbertoE164` with the function definition below.
* Then replace the `$shortcodes` array members with a list of numbers to
* be considered valid shortcodes.
*/
View gist:2418607
1 2 3 4 5 6 7 8 9 10
# I used to spend a lot of time installing wordpress versions...
 
##
# Wordpress, importer, vip
##
_install() {
case $1 in
'wordpress' | 'wp')
if ! [ $2 ]; then
V='';
View gist:2338920

Format JSON returned from an API request

curl http://api-that-returns/json | python -mjson.tool

Quickly copy a file to a new name

cp filename{,.bak}

List of most used terminal commands

View .vimrc
1 2 3 4 5 6 7 8 9 10
" just a few common things that I'm always setting up
 
" add to the runtime path to include plugins
set runtimepath+=$HOME/.vim/vim-markdown
 
" highlight syntax
syntax on
 
" always show line numbers
set number
View gist:2118767
1 2 3 4 5 6 7 8 9 10
# TextMate 2 Default Settings: https://gist.github.com/1478685
# exclude = "{$exclude,*.tmproj,.DS_Store,.git,.svn,.gitignore}"
# excludeDirectories = "{$excludeDirectories,.git,.svn}"
# excludeInBrowser = "{$excludeInBrowser,.gitignore}"
# excludeInFolderSearch = "{$excludeInFolderSearch,log,logs,vendor,tmp}"
 
windowTitle = "$TM_DISPLAYNAME — ${TM_DIRECTORY/^.*\///}"
 
[ text ]
showInvisibles = false
View gist:2051192
1 2 3 4 5 6 7 8 9 10
# longer history
export HISTSIZE=10000
# ignore commands that lead with a space, ignore dups
export HISTCONTROL=ignoreboth,ignoredups
shopt -s histappend
 
#ignore some files for tab completion
export FIGNORE=$FIGNORE:.hi:.pyc:.o:.beam:.dSYM:.un~
 
# colorize the prompt
View gist:2022615
1 2 3 4 5 6 7 8 9 10
#! /bin/bash
mpg=$1
if [ ! $mpg ]; then
echo "Enter a man page to convert: ";
read mpg;
fi
if [ ! $mpg ]; then
exit;
fi
man -t $mpg | open -f -a /Applications/Preview.app;
View gist:1925295
1 2 3 4 5 6 7 8 9 10
<?php
 
// template for setting CURL proxy options for OpenVBX
// add the configuration lines below to the file
// `OpenVBX/libraries/OpenVBX.php` on line 375 with the
// config below and then enter the values for your Proxy
 
// proxy type
$_proxy_type = 'HTTP'; // proxy type
// The address of your proxy server
Something went wrong with that request. Please try again.