Skip to content

Instantly share code, notes, and snippets.

Ben Ng ben-ng

Block or report user

Report or block ben-ng

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

Today I had a brief debate on twitter about AMD vs CommonJS, It's a debate worth having for sure. But I had to bail out of this one. The thing that annoyed me is that the first argument that people bring up to disquality AMD is "the syntax is too complex". I disagree with this. There are lots of reasons to prefer CommonJS over AMD, but the module authoring syntax is not a very good one. There was also a related statement that AMD authoring introduces more "cognitive overhead". This is absolutely true. But I don't consider this to be synonymous with "complexity" by any means.

So I thought I'd explore some comparable examples. Here's a simple one that was offered up by someone else in the thread. This was on twitter so I can forgive erring on the side of brevity.


define('myThing', ['some', 'deps'], function (some, deps) {
  //my code
  return myThing;
ejdyksen /
Last active Jan 15, 2020
A script to fix EDID problems on external monitors in Mac OS. Source:


A script to fix EDID problems on external monitors in Mac OS.

  1. Connect the problem monitor.

  2. Download this script into your /System/Library/Displays/Overrides (note: this file is only writeable by root, so some commands require sudo).

View renderer.js
var Renderer = function () {
var self = this
, requestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
this.queue = {}
requestAnimationFrame(function () {
reklis / svgtextelement.patch
Created Nov 4, 2011
SVG Text Element parsing
View svgtextelement.patch
diff --git a/Core/SVGParser.m b/Core/SVGParser.m
index a2a3106..7726901 100644
--- a/Core/SVGParser.m
+++ b/Core/SVGParser.m
@@ -23,6 +23,7 @@
#import "SVGPolylineElement.h"
#import "SVGRectElement.h"
#import "SVGTitleElement.h"
+#import "SVGTextElement.h"
You can’t perform that action at this time.