Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View anthonybruno's full-sized avatar
✌️

Anthony Bruno anthonybruno

✌️
View GitHub Profile
@anthonybruno
anthonybruno / .bash_profile
Last active December 17, 2015 16:18
Terminal command to open current github repo in browser
# Opens the github page for the current git repository in your browser
# git@github.com:jasonneylon/dotfiles.git
# https://github.com/jasonneylon/dotfiles/
function gh() {
giturl=$(git config --get remote.origin.url)
if [ "$giturl" == "" ]
then
echo "Not a git repository or no remote.origin.url set"
exit 1;
fi
@anthonybruno
anthonybruno / .bash_profile
Created May 7, 2013 14:34
Display which branch you're currently in within Terminal.app
# Git branch in prompt.
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOUR="\[\033[0m\]"
@anthonybruno
anthonybruno / styles.css
Created April 11, 2013 13:54
Fluid thumbnail rows for Bootstrap
.row-fluid ul.thumbnails li.span12 + li { margin-left : 0px;clear:left }
.row-fluid ul.thumbnails li.span6:nth-child(2n + 3) { margin-left : 0px;clear:left }
.row-fluid ul.thumbnails li.span4:nth-child(3n + 4) { margin-left : 0px;clear:left }
.row-fluid ul.thumbnails li.span3:nth-child(4n + 5) { margin-left : 0px; clear:left}
.row-fluid ul.thumbnails li.span2:nth-child(6n + 7) { margin-left : 0px;clear:left }
.row-fluid ul.thumbnails li.span1:nth-child(12n + 13) { margin-left : 0px;clear:left }
@anthonybruno
anthonybruno / rails-rake-commands.md
Last active December 10, 2015 05:48
Useful rake commands
  • rake db:seed - Populates the database with all information from the /db/seeds.rb file
  • rake db:migrate:redo - Undo and reapply the last migration
@anthonybruno
anthonybruno / gist:4161982
Created November 28, 2012 15:30
Fade in/out CSS3
.base {
opacity: 0;
visibility: hidden;
@include transition(visibility 0s linear 200ms, opacity 200ms linear);
}
.base.active {
opacity: 1;
visibility: visible;
@include transition-delay(0);
}
@anthonybruno
anthonybruno / gist:4121121
Created November 20, 2012 21:06
Really simple HTTP Server

python -m SimpleHTTPServer 3333

3333 refers to the port number

@anthonybruno
anthonybruno / nav.js
Created November 1, 2011 17:34
jQuery animated anchor navigation
$('nav a').click(function(){
var item = $(this).attr('href');
var item_y = $(item).offset().top;
$('html, body').animate({"scrollTop": item_y - 120}, 400);
return false;
});