Skip to content

Instantly share code, notes, and snippets.

View andrestc's full-sized avatar
⛑️
Firefighting

André Carvalho andrestc

⛑️
Firefighting
View GitHub Profile
@andrestc
andrestc / .bash_profile
Last active March 21, 2016 12:32
Colored bash_profile with git branch and aliases
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' -e 's/^[ \t]*//'
}
export PS1="\[\033[36m\]\u\[\033[m\]:\[\033[33;1m\]\w\[\033[m\]:\[\033[00m\]\[\033[31m\]\$(parse_git_branch)\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=GxFxBxDxCxegedabagacad
alias ls='ls -GFh'
# Git aliases
@andrestc
andrestc / robot.js
Created December 2, 2012 15:08
Robotnik
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(150);