Skip to content

Instantly share code, notes, and snippets.

View TimothyGu's full-sized avatar
🤠
🤠

Timothy Gu TimothyGu

🤠
🤠
  • Seattle, US
  • 05:37 (UTC -07:00)
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>for-of loop vs forEach</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
#!/usr/env/bin python3
import signal
import sys
import dbus
from gi.repository import GLib, GObject
from dbus.mainloop.glib import DBusGMainLoop
import soundcard
'use strict';
const { User } = require('./models');
/* eslint-disable no-console, no-await-in-loop */
async function main() {
for (const email of process.argv.slice(2)) {
const user = await User.getByEmail(email);
if (!user) {
console.error(email + ' is not a registered email. :(');
#!/bin/sh
#
# Copyright (c) 2014 Tiancheng "Timothy" Gu
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject
From adafabcd57702bd2a73207962f81bdc94d5278de Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Tue, 25 Sep 2018 00:01:16 -0700
Subject: [PATCH] for-in loop
engine262/src/runtime-semantics/ForStatement.mjs
149:7 error 'BindingInstantiation_ForDeclaration' is not defined no-undef
169:18 error 'DestructuringAssignmentEvaluation_AssignmentPattern' is not defined no-undef
---
src/ast.mjs | 45 ++++-
diff --git a/src/completion.mjs b/src/completion.mjs
index 6a89ce4..dffb911 100644
--- a/src/completion.mjs
+++ b/src/completion.mjs
@@ -5,10 +5,10 @@ import {
import { New as NewValue } from './value.mjs';
// #sec-completion-record-specification-type
-export class Completion {
+class Completion {
diff --git a/url.bs b/url.bs
index 6cb0f04..e49aa29 100644
--- a/url.bs
+++ b/url.bs
@@ -940,6 +940,138 @@ <h2 id=urls>URLs</h2>
for=/>URL</a> that was <a lt="URL serializer">serialized</a>.)
</ul>
+<div class=example>
+ <table>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am TimothyGu on github.
  • I am timothygu (https://keybase.io/timothygu) on keybase.
  • I have a public key whose fingerprint is 9456 AFC0 814A 8139 E994 8351 7FE6 B095 B582 B0D4

To claim this, I am signing this object:

@TimothyGu
TimothyGu / index.js
Created July 11, 2018 20:19
Firefox #1475000
"use strict";
const http = require("http");
const server = http.createServer((req, res) => {
if (req.url.includes("slow.js")) {
setTimeout(() => {
res.setHeader("Content-Type", "text/javascript");
res.end("void 0;");
}, 5000);