Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.
// CS:GO "saved" player logic | |
// based on the 20151008 version of the CS:GO Linux dedicated server | |
// | |
// reverse engineering by sigsegv | |
// from x86 assembly to C++ with the help of a disassembler and the Source SDK | |
// (please don't sue me) | |
// terminology: | |
// "enemy" player who was just killed by savior |
/* | |
* node-ws - pure Javascript WebSockets server | |
* Copyright Bradley Wright <brad@intranation.com> | |
*/ | |
// Use strict compilation rules - we're not animals | |
'use strict'; | |
var net = require('net'), | |
crypto = require('crypto'); |
Via brew or other method
In order to work on every connection and on any TLD, dnsmasq
needs to be the first DNS resolver receving the query.
And since dnsmasq
is a local process, all DNS queries need to go to 127.0.0.1
On macOS, /etc/resolv.conf
is automaticaly created, depending on a variety of things (network settings, etc), so it cannot be edited.
tl;dr I built a demo illustrating what it might look like to add async rendering to Facebook's commenting interface, while ensuring it appears on the screen simultaneous to the server-rendered story.
A key benefit of async rendering is that large updates don't block the main thread; instead, the work is spread out and performed during idle periods using cooperative scheduling.
But once you make something async, you introduce the possibility that things may appear on the screen at separate times. Especially when you're dealing with multiple UI frameworks, as is often the case at Facebook.
How do we solve this with React?
/** | |
* The Anatomy of a Remix Route | |
*/ | |
import { parseFormBody, json, redirect } from "@remix-run/data"; | |
import { | |
Form, | |
useRouteData, | |
usePendingFormSubmit, | |
preload, | |
} from "@remix-run/react"; |
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (: | |
Array.prototype.flatMap = function(lambda) { | |
return Array.prototype.concat.apply([], this.map(lambda)); | |
}; |
/** @jsx React.DOM */ | |
var Graphic = React.createClass({ | |
componentDidMount: function() { | |
var context = this.getDOMNode().getContext('2d'); | |
this.paint(context); | |
}, | |
componentDidUpdate: function() { |
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
// simpler, faster, version that will throw a TypeError if the path is invalid | |
// by yorick | |
function extract(obj, key){ | |
return key.split('.').reduce(function(p, c) {return p[c]}, obj) | |
} | |
extract | |
// for example: |