This file contains 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 fastFix($branchName, $title) { | |
if((-not $branchName) -or (-not $title)) { | |
throw "You must specify branchName and title" | |
return | |
} | |
Write-Host "Checking out $branchName" | |
git checkout -b $branchName | |
This file contains 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: |
This file contains 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() { | |
var iframeOffset = $("#ID_OF_MY_IFRAME", window.parent.document).offset(); | |
$("a").each(function () { | |
var link = $(this); | |
var href = link.attr("href"); | |
if (href && href[0] == "#") { | |
var name = href.substring(1); | |
$(this).click(function () { | |
var nameElement = $("[name='" + name + "']"); | |
var idElement = $("#" + name); |
This file contains 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
if (test-path function:\prompt) { | |
$oldPrompt = ls function: | ? {$_.Name -eq "prompt"} | |
remove-item -force function:\prompt | |
} | |
function prompt { | |
function getGitStatus { | |
$branch = git branch 2>&1 | |
if($branch.Exception -eq $null) { | |
$status = "git" | |
$branch | foreach { |
This file contains 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 renderBlueSquareAndTranslate(height,width, context) { | |
context.fillStyle = "#0000FF"; | |
context.translate(50,0); | |
context.fillRect(0,0,height,width); | |
} | |
test("will render blue square and translate right 50px", function() { | |
var context = stub().of("fillRect") | |
.of("translate"); | |