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
javascript:(function()%7Bvar rows%3Ddocument.querySelectorAll("tr")%3Bvar columnCount%3Drows%5B0%5D.querySelectorAll("td").length%3Bvar headers%3D%5B%5D.map.call(rows%5B0%5D.querySelectorAll("td"),function(e)%7Breturn e.textContent.replace(/%5Cn/gi,"")%3B%7D).join("%7C")%3Bvar seps%3Dnew Array(columnCount).join("---%7C")%2B"---"%3Bvar rowsStr%3D""%3Bfor(var i%3D1%3Bi<rows.length%3Bi%2B%2B)%7BrowsStr%2B%3D%5B%5D.map.call(rows%5Bi%5D.querySelectorAll("td"),function(e)%7Breturn e.textContent.replace(/%5Cn/gi,"")%3B%7D).join("%7C")%2B"%5Cn"%3B%7Dvar finalStr%3Dheaders%2B"%5Cn"%2Bseps%2B"%5Cn"%2BrowsStr%2B"%5Cn"%3Bvar elem%3Ddocument.createElement("PRE")%3Belem.textContent%3DfinalStr%3Bdocument.body.appendChild(elem)%3B%7D)()%3B |
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
<a href='javascript:(function(){$("<div>").load("../edit/master/issue-template.md .commit-create textarea", function () { $("#issue_body").val($(this).find("textarea")[0].textContent)})}())'> | |
issue-tmpl</a> | |
<a href='javascript:(function(){$("<div>").load("../edit/master/pullrequest-template.md .commit-create textarea", function () { $("#pull_request_body").val($(this).find("textarea")[0].textContent)})}())'> | |
pullrequest-tmpl</a> |
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
data:text/html, <html><body><canvas width="1000" height="1000"></canvas><script>var lastPt,canvas,context=(canvas=document.querySelector("canvas")).getContext("2d");function mousedown(e){lastPt ={x:e.pageX,y:e.pageY};}function mousemove(e){if (lastPt){var curr = {x:e.pageX,y:e.pageY};draw(lastPt, curr);lastPt = curr;}}function mouseup(e){mousemove(e);lastPt=null;}function draw(pt1,pt2){ pt2 = pt2 || pt1; context.strokeStyle = "#000000"; context.lineJoin = "round"; context.lineWidth = 5; context.beginPath(); context.moveTo(pt1.x, pt1.y); context.lineTo(pt2.x, pt2.y); context.closePath(); context.stroke(); }canvas.addEventListener("mousedown",mousedown,false);canvas.addEventListener("mousemove",mousemove,false);canvas.addEventListener("mouseup",mouseup,false);</script></body></html> |
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
//bookmarklet I whipped up to watch for a new issue to get created, pull out the issue number, and paste it into the comments box | |
//this bookmarklet only works from the issues page and currently is messy due to some timing issues I was too lazy to fix | |
javascript:(function(){win=window.open(window.location.href.split("issues")[0]+'issues/new');setTimeout(function(){win.addEventListener("beforeunload",function(){setTimeout(function(){var%20arr=win.location.href.split("/");document.querySelector("[name^=comment]").value="#"+arr[arr.length-1];},2000);},%20false);},2000);}()); |
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
//create a bookmark and set the location as below. if you use a different label, you can obviously change it to taste | |
//bookmarklet only works on the issues page | |
javascript:(function(){jQuery(".label").filter(function(){return%20$(this).text()=="nice to have";}).closest("tr").hide();}()) |
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
#depends on currbranch (https://gist.github.com/1483316) | |
#start is a windows command. for OSX change it to open | |
git config alias.pullrequest '!curr=$(git currbranch) && git push origin $curr && start https://github.com/<YOUR ORGANIZATION>/<YOUR REPO>/pull/new/$curr' |
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
#obviously could inline, but it's more clear to me written out | |
git config alias.currbranch 'name-rev --name-only HEAD' | |
git config alias.updateandthen '!git checkout master && git fetch && git merge origin/master && git checkout' | |
git config alias.update '!curr=$(git currbranch) && git updateandthen $curr && git merge master || git mergetool' |
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 () { | |
$("#deleteAll").click(function () { | |
$.showDialog("You will lose all your data if you continue.") | |
.then(function (result) { | |
if (result) { | |
$.showDialog("Losing your data is permanent and cannot be restored. Are you sure?", "Loss is permanent", "Yes", "No") | |
.then(function (result) { | |
if (result) { | |
alert("all data lost!"); | |
} |
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
exactTarget.sponsor(indyJs).then(function (pizza, joy,) { | |
indyJs.splice(0,0, pizza, joy); | |
}); |
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
/****************jsonpcall.aspx*********************************/ | |
public partial class jsonpcall : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
Response.Write(Request.QueryString["callback"] + "('JSONP SUCCESS')"); | |
Response.End(); | |
} | |
} | |
} |