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
# ~/.bash_profile | |
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH" | |
# Auto-completion helper when you hit tab | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
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
#!/usr/bin/env ruby | |
# | |
# Delete empty directories recursively | |
# | |
# Author:: Soon Van - randomecho.com | |
# Copyright:: Copyright 2016 Soon Van | |
# License:: http://opensource.org/licenses/BSD-3-Clause | |
require 'FileUtils' |
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
#!/usr/bin/env ruby | |
# | |
# mv folders to have underscore prefix | |
# | |
# Author:: Soon Van - randomecho.com | |
# Copyright:: Copyright 2016 Soon Van | |
# License:: http://opensource.org/licenses/BSD-3-Clause | |
require 'FileUtils' |
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
# .bashrc | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias elog='tail -f /var/log/httpd/error_log' | |
alias loga='tail -f /var/log/httpd/access_log' | |
alias sugar='tail -f sugarcrm.log' | |
alias web='cd /srv/httpd/' | |
alias phpunit='custom/vendor/bin/phpunit --color' |
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] | |
soonvan = commit -m \"Created by Soon Van - randomecho.com\" | |
purple = commit -am \"purple monkey dishwasher\" | |
hist = log --pretty=format:\"%h %ad | %s%d\" --graph --date=short | |
histo = log --max-count=12 --pretty=format:\"%h %ad %s%d\" --graph --date=short | |
search = !sh -c 'git log --max-count=12 --grep=$1 --pretty=format:\"%h%C(bold yellow) %s%C(reset)\"' - | |
undo = reset --soft HEAD~ | |
edit = commit --amend | |
twt = !git add twitter.txt | |
waxy = !git add wax* && git s |
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
-module(patterns). | |
-export([exxor/2,exxot/2,exxon/2,efix/2,maxThree/3,howManyEqual/3]). | |
exxor(X,Y) -> | |
X =/= Y. | |
exxot(X,Y) -> | |
X == Y. | |
exxon(X,Y) -> |
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/sh | |
feature_branch=$(git branch | grep \* | sed 's/\* //') | |
all_branches=$(git branch | tr '\n' ' ') | |
main_branch=$1 | |
if [[ $all_branches != *$main_branch* ]]; then | |
echo "$main_branch is not a valid branch to merge back into" | |
exit 1 | |
fi |
OlderNewer