Skip to content

Instantly share code, notes, and snippets.

Avatar

Surma surma

View GitHub Profile
@surma
surma / .gitignore
Last active Jul 28, 2020
Rollup prunes dynamic import hook
View .gitignore
build
node_modules
package-lock.json
@surma
surma / .gitignore
Last active Jul 28, 2020
Preloader in Rollup
View .gitignore
package-lock.json
build
node_modules
View index.md

How to download a Chrome binary for any given revision (kinda):

  1. Type in your version (something like “85.0.4173.0”) in the version information lookup field in OmahaProxy. If you don’t have the version string, this JSON lists a bunch of the most recent releases. Note that you can adjust the query parameters.
  2. Note down the resulting “Branch Base Position” (something like “778145”).
  3. Go to this page (or this one if you need more granularity), select the folder of your operating system and find the folder that has the number closest to your branch base position.

Voilá!

@surma
surma / .gitignore
Last active Jul 21, 2020
Moving a Three.JS-based WebXR app to a worker
View .gitignore
node_modules
build
package-lock.json
View corgi.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@surma
surma / run-wasm.js
Created Jun 10, 2019
Wasm Run Script
View run-wasm.js
/**
* Copyright 2019 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
View .gitignore
node_modules
package-lock.json
@surma
surma / README.md
Last active Aug 12, 2020
webpack-emscripten-wasm
View README.md

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@surma
surma / package.json
Created Apr 18, 2018
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
View package.json
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
You can’t perform that action at this time.