Skip to content

Instantly share code, notes, and snippets.

T.J. Crowder tjcrowder

Block or report user

Report or block tjcrowder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View homecheck.html
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>[[HomeObject]] Check</title>
</head>
<body>
<input type="button" id="release" value="Release Objects">
<input type="button" id="show-count" value="Show Function Count">
View gist:ff77cad3bb92a80f1cfa2e2d3c7529dc
```html
<emu-grammar>
ClassElement[Yield, Await] :
MethodDefinition[?Yield, ?Await]
`static` MethodDefinition[?Yield, ?Await]
<ins>FieldDefinition[?Yield, ?Await] `;`</ins>
`;`
MemberExpression[Yield, Await] :
PrimaryExpression[?Yield, ?Await]
View js-object-references.md

Re https://twitter.com/rauschma/status/1086903633134931968 -

I usually describe it as (roughly):

JavaScript is a purely pass-by-value language. Variables (and properties, and parameters) contain values. Assigning one variable's value to another, passing it into a function, etc., copies the value:

a = 1;
b = a;
View README.md

Setup reverse tunnel

Run the following in your client machine

ssh -R EXPOSED_PORT:localhost:SERVICE_PORT USER@HOST

Where

  • EXPOSED_PORT is the port exposed to the internet in the proxy server
  • SERVICE_PORT is the port your application is listening in your machine
@tjcrowder
tjcrowder / gist:8912340
Created Feb 10, 2014
Simple test case for promises and §2.3.3.3
View gist:8912340
var Promise = require("promise");
var p = new Promise(function(resolve) {
// Return an object with a 'then' property
var obj = {
then: function(res, rej) {
console.log("parg === p? " + (parg === p));
console.log("this === obj? " + (this === obj));
res();
}
@tjcrowder
tjcrowder / gist:8912323
Created Feb 10, 2014
Test promises with promises-aplus-tests
View gist:8912323
var promisesAplusTests = require("promises-aplus-tests");
var Promise = require("promise");
var adapter = {
resolved: function(value) {
return new Promise(function(resolve) {
try {
resolve(value);
}
catch (e) {
View temp-prototype.js
/* TEMPORARY TESTING VERSION INCLUDING NEW SUPERCALLS FROM
http://github.com/tjcrowder/prototype/commit/79d3e1dfd32220299f0a5aceacfc6fd3ffa2a089
*/
/* Prototype JavaScript framework, version 1.6.1
* (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/
View supercalls_perf.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title>New Supercalls Performance Test Page</title>
<style type='text/css'>
#log p {
margin: 0;
padding: 0;
}
You can’t perform that action at this time.