Skip to content

Instantly share code, notes, and snippets.

@binde77
binde77 / gist:6950199
Created October 12, 2013 13:47
Shell - Git: stage file, commit & push
$ git add filename.ext
$ git commit -m 'place comment here'
$ git push origin master
@binde77
binde77 / gist:6950112
Created October 12, 2013 13:39
Javascript: set <title> from <h2> tag
//set <title> tag according to page title as displayed in <h2>
$('document').ready(function(){
var pagetitle = $("h2").text();
var pathname = window.location.pathname;
if(pathname.indexOf('/en/') > -1){
var titletag = pagetitle + ' | ENGLISH TITLE';
}
else {
var titletag = pagetitle + ' | ITALIAN TITLE';
}