This file contains hidden or 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
# BRANCHES | |
git branch # list all local branches | |
git branch -a # list all branches (local and remote) | |
# Clone remote branches - http://stackoverflow.com/a/72156/1574059 | |
git checkout -b branch-name origin/branch-name # create local branch and set it to track origin/branch-name |
This file contains hidden or 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
// ==UserScript== | |
// @name Useful Scripts | |
// @version 1.3.0 | |
// @description Useful scripts for developers, to be loaded and used in every page | |
// @match http://**/* | |
// @author Guilherme Ventura | |
// @downloadURL https://rawgit.com/danguilherme/2e6e913ebdd491b06225/raw/useful_scripts.user.js | |
// @grant unsafeWindow | |
// ==/UserScript== | |
This file contains hidden or 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
-- COMING SOON |
This file contains hidden or 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
function Enum(items, startingValue) { | |
var count = startingValue || 0, | |
item; | |
for (var i = 0; i < items.length && (item = items[i]) ; i++) { | |
var splitted = item.split(':'); | |
if (splitted.length == 2) { | |
count = Number(splitted[0]); | |
item = splitted[1]; | |
} | |
this[this[item] = count++] = item; |
This file contains hidden or 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
function loadScript(url,callback) { | |
var element = document.createElement("script"); | |
element.src = url; | |
document.body.appendChild(element); | |
element.onload = callback; | |
return element; | |
} |
NewerOlder