I hereby claim:
- I am ryands on github.
- I am ryands (https://keybase.io/ryands) on keybase.
- I have a public key whose fingerprint is D0CA AAC9 FC0A 7B41 829B 31B0 3369 F0BD BB2C E1EB
To claim this, I am signing this object:
var addition = function(a, b, callback) { | |
var result = a + b; | |
if (callback != null) { | |
callback(result); | |
} | |
}; | |
addition(2, 3, function(result) { | |
alert("The sum is " + result + "!"); | |
}); |
@Override | |
protected void onResume() { | |
super.onResume(); | |
loadImageWhenReady(imageView, mPayload); | |
} | |
private static void loadImageWhenReady(final ImageView v, final String url) { | |
v.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { | |
@Override | |
public void onGlobalLayout() { |
I hereby claim:
To claim this, I am signing this object:
Chrome 36.0.1985.67 on OS X 10.9.3 | |
Sit back and relax, this may take a while. | |
`_(...)` with a number: | |
lodash.min x 148,659,845 ops/sec ±1.16% (83 runs sampled) | |
underscore-min x 21,250,737 ops/sec ±0.71% (89 runs sampled) | |
lodash.min is 596% faster. | |
`_(...)` with an array: |
/* Module pattern in javascript | |
* Not using RequireJS/ES6/Node/... | |
*/ | |
var MyModule = (function () { | |
function SubClass() { | |
// constructor | |
} | |
SubClass.prototype.someMethod = function() { |
/* Local proxy for XHR testing | |
* | |
* Prereq: npm install express request lodash | |
* Running: node proxy.js | |
* | |
*/ | |
// Configuration: | |
var port = 3001; | |
var mapping = { |
#!/usr/bin/env bash | |
INSTALL_MEDIA="http://cdimage.debian.org/cdimage/jessie_di_beta_2/amd64/iso-cd/debian-jessie-DI-b2-amd64-netinst.iso" | |
VMNAME="debian-jessie-vm" | |
[[ "x$1" != "x" ]] && VMNAME=$1 | |
echo | |
echo "Building VM: $VMNAME" | |
echo " Creating disk image" |
set-option -g prefix C-a | |
unbind-key C-b | |
bind-key C-a send-prefix | |
set-option -g status-style bg=blue |
/* gcc -o cast cast.c */ | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
unsigned long sides; | |
int input = -5; | |
sides = input; | |
printf("Catas input %lu\n", sides); |
#!/usr/local/bin/node | |
// node.js BitBar plugin for pull-request tracking. | |
var https = require('https'); | |
function pull_requests(options, cb) { | |
var repo = options.repo, | |
token = options.token; | |
https.get({ | |
protocol: 'https:', |