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
package_error() | |
{ | |
local _message=$1 | |
if [[ -z "${_message}" ]] | |
then | |
fail "Cannot print a package error as no message was provided." | |
fi | |
local _log=$2 |
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 | |
update() | |
{ | |
echo "Before the update" | |
cat update > test.sh | |
echo "This has changed" | |
} | |
update |
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
# | |
# Function definitions | |
# | |
use_textmate () | |
{ | |
# Clean redcar from path the easy way. | |
export PATH="$(printf "$PATH" | sed -e "s#${projects_path}/ruby_apps/redcar/bin##g")" | |
export EDITOR="/usr/local/bin/mate -w" | |
export GEM_OPEN_EDITOR="/usr/local/bin/mate" | |
alias tm_dialog="$HOME/Library/Application\ Support/TextMate/PlugIns/Dialog.tmplugin/Contents/Resources/tm_dialog" |
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
function git_rev_head | |
{ | |
# Can declare multiple variables on one line IFS separated. | |
# By default IFS is "white characters" | |
local rev_prompt_token=" » " rev=1 sym=0 sym_prompt="" rev_prompt="" \ | |
colors=() branches=() | |
# If git branches contain whitespace, then the following should be quoted. | |
branches[$rev]="$(git name-rev --name-only head 2> /dev/null)" | |
branches[$sym]="$(git symbolic-ref -q head 2> /dev/null)" |
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
# take 2 | |
export PS1="\D{%H:%M:%S} \[\033[37m\]\u@\h\[\033[32m\]:\w \$( git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\033[36m(\1)/' -e 's/(production)/\\033[1;37m\\033[41m(production)\\033[m/' -e 's/(master)/\\033[1;37m\\033[41m(master)\\033[m/' -e 's/(stage)/\\033[31m(stage)/' -e 's/(next)/\\033[33m(next)/')\[\033[37m\]\[\033[0m\] \n∫ " |
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
# ALARM: production/master RED: stage YELLOW: next CYAN: everybody else | |
export PS1="\D{%H:%M:%S} \[\033[37m\]\u@\h\[\033[32m\]:\w \$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\\033[36m(\1)/' | sed -e 's/(production)/\\033[1;37m\\033[41m(production)\\033[m/' | sed -e 's/(master)/\\033[1;37m\\033[41m(master)\\033[m/' | sed -e 's/(stage)/\\033[31m(stage)/' | sed -e 's/(next)/\\033[33m(next)/')\[\033[37m\]\[\033[0m\] \n∫ " |
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 [[ ( -a .rvmrc ) && $TERM == 'screen' ]]; then | |
source .rvmrc | |
fi |
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
default_run_options[:pty] = true | |
set :application, "bobo" | |
set :repository, "file:///home/poporoot/git/bobo.git" | |
set :local_repository, "ssh://poporoot@192.168.56.158/home/poporoot/git/bobo.git" | |
set :user, 'poporoot' | |
set :deploy_to, "/home/poporoot/roboczy/bobo" | |
require 'bundler/capistrano' |
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
#Shouldn't that be more this? | |
# curl https://github.com/wayneeseguin/rvm/raw/master/scripts/install | grep -v '^#' | |
set -o errtrace | |
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }' | |
if [[ -z "$rvm_selfcontained" ]]; then | |
if [[ $(id | sed -e 's/(.*//' | awk -F= '{print $2}') -eq 0 || \ |
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
# System-wide .bashrc file for interactive bash(1) shells. | |
if [ -z "$PS1" ]; then | |
: # no-op | |
fi | |
PS1='\h:\W \u\$ ' | |
# Make bash check its window size after a process completes | |
shopt -s checkwinsize | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. |