Skip to content

Instantly share code, notes, and snippets.

View jridgewell's full-sized avatar
😬

Justin Ridgewell jridgewell

😬
  • New York, NY
  • 09:06 (UTC -04:00)
View GitHub Profile
@jridgewell
jridgewell / index.html
Last active September 5, 2019 17:12 — forked from justinfagnani/index.html
Directive Implementations: WeakMap vs Property (https://jsbench.github.io/#18fc6d1eb87a9e3edbd7295edf9b8f35) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Directive Implementations: WeakMap vs Property</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>
@jridgewell
jridgewell / index.html
Last active March 5, 2019 19:23 — forked from TimothyGu/index.html
for-of loop vs forEach (https://jsbench.github.io/#c54d167490fde6a4e6474ce213e3b6de) #jsbench #jsperf
<!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>
@jridgewell
jridgewell / index.html
Last active August 23, 2019 11:42 — forked from RubaXa/index.html
getCookie (split vs regex) (http://jsbench.github.io/#13276efa27fa2bcfedb1fadea18ccb3c) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>getCookie (split vs regex)</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>
@jridgewell
jridgewell / _private-fields-faq.md
Last active February 20, 2018 21:54 — forked from rauschma/_private-fields-faq.md
Fields with arbitrarily scoped privacy

Fields with arbitrarily scoped privacy

Info on private fields: http://2ality.com/2017/07/class-fields.html

Q&A

  • Why the prefix #?
    • You define keys and these keys additionally work completely differently from property keys.
  • Is the keyword private necessary?
  • It could be omitted (first mention declares), but I like the distinction between declaration and mention.
@jridgewell
jridgewell / get-old-chromium-binary.md
Created June 7, 2017 21:27 — forked from cletusw/get-old-chromium-binary.md
Download an old Chromium binary

(source)

Taking [denilson-sá's answer][2] further...

You need revision numbers to grab downloads. So first lookup the full version string from the following URL, adjusting parameters as needed:

https://omahaproxy.appspot.com/history.json?channel=stable&os=mac

For Chrome version 28 the full version string is 28.0.1500.71. Now go to https://omahaproxy.appspot.com and enter the full version string ("28.0.1500.71") into the Position Lookup box. Copy the Base Position number ("209842" in this case).

@jridgewell
jridgewell / gist:0a8cc627e65b3d24a8b9
Last active August 29, 2015 14:16 — forked from danapplegate/gist:98209b1eb2721ca7365c
The `$userVote` Problem

The userVote Problem

We are struggling to find a way to efficiently and cleanly implement the following common use case in our code base:

  • There is an object that can be voted on
    • Project
    • Discussion
    • Comment
  • We have an array of these objects
  • We would like to know if a user has voted on each of these objects
#!/usr/bin/env ruby
###########################################################################
# Script to be called as an Xcode 4 behaviour which will attempt to
# uncrustify all source files in the open project.
#
# (c) Copyright 2012 David Wagner.
#
# Complain/commend: http://noiseandheat.com/
#
#*************************************************************************#