I hereby claim:
- I am mr0grog on github.
- I am mr0grog (https://keybase.io/mr0grog) on keybase.
- I have a public key ASCHEMnkYJbHpkkGywzma5kTvbxZvNaFusRi-XxcdoGBpwo
To claim this, I am signing this object:
Container C2 | |
------- | |
| | | | |
------- | |
{ | |
size: { width: 600 } | |
columns: [0,300], | |
rows: [ | |
{ |
/** | |
* elem.getBoundingClientRect() is awesome, BUT it doesn't actually explain | |
* where the edges are if an element is rotated, skewed or otherwise oddly | |
* transformed. This is a not pretty attempt to get the actual rendering quad | |
* (sadly, it has to modify the DOM to do its work). | |
* NOTE: designed for WebKit & Gecko. | |
* Everything but the getComputedStyle() call *should* work in IE, though. | |
*/ | |
var getRenderQuad = function(elem) { | |
var quad = {}, |
Object.defineProperties = function(O, Properties) { | |
// 1. If Type(O) is not Object throw a TypeError exception. | |
if (typeof(O) !== "object" || O == null) { | |
throw TypeError("Object.defineProperties called on non-object"); | |
} | |
// 2. Let props be ToObject(Properties) | |
var props = Object(Properties); // not *exactly* the same, but similar enough | |
// 3. Let names be an internal list containing the names of each enumerable own property of props. |
Object.defineProperties = function(O, Properties) { | |
// 1. If Type(O) is not Object throw a TypeError exception. | |
if (typeof(O) !== "object" || O == null) { | |
throw TypeError("Object.defineProperties called on non-object"); | |
} | |
// 2. Let props be ToObject(Properties) | |
var props = Object(Properties); // not *exactly* the same, but similar enough | |
// 3. Let names be an internal list containing the names of each enumerable own property of props. |
#!/bin/bash | |
# Run JSC (with the new bytecode profiler!) | |
# | |
# USAGE: | |
# jsc-nightly [PATH_TO_SCRIPT] [-p PROFILER_OUTPUT_PATH] | |
# | |
# e.g: | |
# jsc-nightly app.js -p app-profile.json |
// This was created as an answer for this JSMentors discussion: https://groups.google.com/d/topic/jsmentors/rG9KDmy7Z6A/discussion | |
/** | |
* Call this on a function to get a version that will do infinite tail-call recursion. | |
* The function that is passed in should take a function as its first argument. | |
* Instead of calling itself to recurse, the first argument should be called (when in tail position). | |
* | |
* @example | |
* var factorial = tailCallable(function(recurse, n, total) { | |
* total = total || 1; |
/** | |
* Transition helper that allows elements to transition from | |
* scalar sizes (e.g. "2em") to "auto" (or vice versa). This is useful because | |
* browsers either simply do not animate such transitions or do them poorly. | |
* | |
* Requires your CSS to already have the transition defined. This just allows | |
* it to function without much jankiness. | |
* | |
* Usage: | |
* |
#!/usr/bin/env node | |
var spawn = require('child_process').spawn; | |
var list = spawn('npm', ['list', '--json']); | |
var result = ""; | |
list.stdout.on('data', function (data) { | |
result += data; | |
}); |
I hereby claim:
To claim this, I am signing this object:
'use strict'; | |
const crypto = require('crypto'); | |
const Iconv = require('iconv').Iconv; | |
const parallel = require('parallel-transform'); | |
const pump = require('pump'); | |
const request = require('request'); | |
const stream = require('stream'); | |
const S3 = require('aws-sdk/clients/s3'); |