Skip to content

Instantly share code, notes, and snippets.

Anthony Bruno anthonybruno

Block or report user

Report or block anthonybruno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anthonybruno
anthonybruno / .bash_profile
Last active Dec 17, 2015
Terminal command to open current github repo in browser
View .bash_profile
# 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
Display which branch you're currently in within Terminal.app
View .bash_profile
# 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 Apr 11, 2013
Fluid thumbnail rows for Bootstrap
View styles.css
.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 }
View rails-rake-commands.md
  • 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
View gist:4161982
.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 Nov 20, 2012
Really simple HTTP Server
View gist:4121121

python -m SimpleHTTPServer 3333

3333 refers to the port number

@anthonybruno
anthonybruno / nav.js
Created Nov 1, 2011
jQuery animated anchor navigation
View nav.js
$('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;
});
You can’t perform that action at this time.