This file contains hidden or 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 | |
# author: Thomas Aylott SubtleGradient.com | |
# author: Nathan Nobbe quickshiftin.com | |
# Find out where HEAD is pointing | |
head_ref=$(git show-ref --head -s | head -n 1) | |
# Check to see if transmit tag exists, and get transmit tag hash | |
_transmit_ref=$(git show-ref --verify -s refs/tags/transmit) | |
# If there's not transmit tag, create it for the first time. |
This file contains hidden or 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
alias lastd='echo ~/Downloads/$(ls -t ~/Downloads/ | head -n 1)' |
This file contains hidden or 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
#-------------------------------------------------------- | |
# Simple search and replace utility for git repositories. | |
# @note Use w/ GNU sed. | |
# (c) Nathan Nobbe 2014 | |
# [email protected] | |
# http://quickshiftin.com | |
# $1 - Search | |
# $2 - Replace | |
# $3 - Subdirectory (optional, defaults to cwd) | |
#-------------------------------------------------------- |
This file contains hidden or 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
alias mysqldbs='_() { local h=""; if [ ! -z "$2" ]; then h="-h$2"; fi; echo "show databases;" | mysql -u "$1" "$h" -p; }; _' |
This file contains hidden or 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 php_lint | |
{ | |
for arg in $(seq $#) | |
do | |
# Use find to iterate over directories recursively | |
if [ -d "${!arg}" ]; then | |
find "${!arg}" -name '*.php' -exec php -l "{}" ";" | |
# Just run normal files and symlinks through php -l individually | |
elif [ -f "${!arg}" -o -h "${!arg}" ]; then | |
php -l "${!arg}" |
This file contains hidden or 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/bash | |
# ----------------------------------------------------------------------------------- | |
# jetty-hash-pass.sh | |
# (c) Nathan Nobbe 2014 | |
# [email protected] | |
# http://quickshiftin.com | |
# | |
# See the Password Issues section of the below link | |
# http://docs.codehaus.org/display/JETTY/How+to+configure+SSL#HowtoconfigureSSL-step3 | |
# |
This file contains hidden or 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/bash | |
# ----------------------------------------------------------------------------------- | |
# pem2pkcs12.sh | |
# (c) Nathan Nobbe 2014 | |
# [email protected] | |
# http://quickshiftin.com | |
# | |
# Use this script to convert a set of apache ssl certificates to a format suitable | |
# for Jetty. | |
# |
This file contains hidden or 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
# update locate database, linux style | |
alias updatedb='sudo /usr/libexec/locate.updatedb' | |
# mdfind is the locate equivalent on OSX, | |
# so this is probly more useful for you | |
alias locate='mdfind -name' |
This file contains hidden or 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
_lse_filter='~|#.*#' | |
alias lse='_() { ls -1 $1 | egrep -v $_lse_filter; }; _' |
This file contains hidden or 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
# Short of learning how to actually configure OSX, here's a hacky way to use | |
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise | |
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _' |
OlderNewer