This file contains 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
require "rvm/capistrano" | |
require "capistrano/ext/multistage" | |
require "colored" | |
logger.level = Logger::IMPORTANT # make capistrano quiet by default! | |
STDOUT.sync | |
before "deploy:update_code" do | |
print "Updating Code........" | |
start_spinner() |
This file contains 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
# If apache isnt starting, Try this to help debug: | |
sudo bash -x /usr/sbin/apachectl -k start |
This file contains 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
# for example Name with capital is "Derekmac" and fully qualified lower case name is "derekmac.derek.domain.com" | |
sudo scutil --set ComputerName <Name with capital> | |
sudo scutil --set LocalHostName <Name with capital> | |
sudo scutil --set HostName <fully qualified lower case name> | |
dscacheutil -flushcache |
This file contains 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
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" | |
let secs=$((${upSeconds}%60)) | |
let mins=$((${upSeconds}/60%60)) | |
let hours=$((${upSeconds}/3600%24)) | |
let days=$((${upSeconds}/86400)) | |
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"` | |
WEATHER=`curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=OCN|NZ|NZ130|DEVONPORT|" | sed -n '/Currently:/ s/.*: \(.*\): \([0-9]*\)\([CF]\).*/\2\3, \1/p'` | |
IP=`/sbin/ifconfig | /bin/grep "192.168" | /usr/bin/cut -d ":" -f 2 | /usr/bin/cut -d " " -f 1` | |
# get the load averages |
This file contains 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
sudo xcode-select --switch /Applications/<insert Xcode app path here>/Contents/Developer |
This file contains 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 emal="emacs ~/.bash_aliases" | |
alias doal=". ~/.bash_aliases" | |
alias dosh=". ~/.bashrc" | |
alias cd..="cd .." | |
alias rgrep="grep -r" | |
alias cls='tput clear' | |
alias ls='CLICOLOR_FORCE=1 ls -G' | |
alias less='less -R' |
This file contains 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 | |
LOG=/Developer/jenkins/logs/slave.log | |
sudo rm -f $LOG | |
date >$LOG | |
chmod 777 $LOG | |
echo ============================= >> $LOG | |
echo whoami >> $LOG |
This file contains 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
MyMac:~ myuser$ sudo dscl | |
Password: (your password) | |
Entering interactive mode... (type "help" for commands) | |
> cd /Local/Default/ | |
/Local/Default > | |
/Local/Default > ls Groups gid |
This file contains 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
/** @} */ |
This file contains 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
/** | |
@interface <#Interface#> | |
@addtogroup <#Group#> | |
@{ | |
*/ | |
/** | |
@brief <#Brief description#> | |
<#Full description#> | |