I hereby claim:
- I am dkordik on github.
- I am dkordik (https://keybase.io/dkordik) on keybase.
- I have a public key ASCAO4KMq8wsMpPZ5vs5rGvZlxNk75PYkdjOGO1nlafjFwo
To claim this, I am signing this object:
#!/bin/sh | |
# | |
# This script will make WinMerge your default tool for diff and merge. | |
# It must run inside git bash (on Windows) | |
# | |
# If your WinMerge is in other place then this one, please edit | |
WINMERGE_SCRIPT="~/winmerge-merge.sh" |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.1/jquery.js"></script> | |
<script src="http://canjs.us/release/latest/can.jquery.js"></script> | |
<script src="http://canjs.com/release/latest/can.view.mustache.js"></script> | |
<script src="can.mustache.defaultBindings.js"></script> | |
<script id="template" type="text/mustache"> | |
<h1>Knockout-esque <code>value</code> binding</h1> | |
{{#newAnimal}} | |
<input type="text" {{value name }} placeholder="Name of animal"> | |
<input type="text" {{value favoriteFood}} placeholder="Favorite food"> |
#!/bin/bash | |
APIKEY="newdeveloper" | |
function turnOff { | |
curl -X PUT -d"{\"on\": false }" http://192.168.2.142/api/$APIKEY/lights/$1/state | |
} | |
turnOff 1 | |
turnOff 3 |
anchors=document.querySelectorAll("table a"); | |
for (i=0; i < anchors.length; i++) { | |
if (anchors[i].innerText.match(/(to|get).*\(\)/) ) { | |
var method = anchors[i].innerHTML; | |
method=method.substring(0, method.length-2); | |
console.log(method, " -- ", new Date()[method]()); } | |
} |
//image error events don't bubble, so we use | |
// native event capturing, where supported | |
if (document.addEventListener && !document.bubbleErrors) { | |
document.addEventListener('error', function (event) { | |
jQuery(event.target).trigger(event); //bubble it ourselves! | |
}, true); //true = use event capturing (not bubbling) | |
document.bubbleErrors = true; | |
} |
var Future = Npm.require('fibers/future'); //npm install fibers | |
var async = function (callback) { //let's tuck away some of the nastyness in here | |
var future = new Future(); | |
var returnFunc = function () { | |
future["return"].apply(future, arguments); | |
} | |
callback(returnFunc); |
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> |
I hereby claim:
To claim this, I am signing this object:
# Usage: | |
# ./time_command.sh "sleep 2" | |
# (or a command you actually care about timing, in quotes) | |
COMMAND="$1" | |
for N in {1..10} | |
do | |
printf "$N: " | |
( time `eval $COMMAND` ) 2>&1 | grep real | awk '{ printf $2 }' |
#uses showlinenum.awk from: https://github.com/jay/showlinenum (needs gawk, brew install gawk) | |
alias gd='git diff --color=always | ~/showlinenum.awk color_line_number=90 color_separator=37 | less -r' | |
alias gds='git diff --staged --color=always | ~/showlinenum.awk color_line_number=90 color_separator=37 | less -r' |