Skip to content

Instantly share code, notes, and snippets.

View tjcrowder's full-sized avatar

T.J. Crowder tjcrowder

View GitHub Profile
/* 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/
*
*--------------------------------------------------------------------------*/
<!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">
```html
<emu-grammar>
ClassElement[Yield, Await] :
MethodDefinition[?Yield, ?Await]
`static` MethodDefinition[?Yield, ?Await]
<ins>FieldDefinition[?Yield, ?Await] `;`</ins>
`;`
MemberExpression[Yield, Await] :
PrimaryExpression[?Yield, ?Await]

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;
@tjcrowder
tjcrowder / README.md
Last active February 1, 2017 14:47 — forked from andris9/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
<!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;
}
@tjcrowder
tjcrowder / gist:8912323
Created February 10, 2014 08:33
Test promises with promises-aplus-tests
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) {
@tjcrowder
tjcrowder / gist:8912340
Created February 10, 2014 08:35
Simple test case for promises and §2.3.3.3
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();
}