Skip to content

Instantly share code, notes, and snippets.

View AlexFrazer's full-sized avatar

Frazer AlexFrazer

View GitHub Profile

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email

Onboarding and the workplace

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?
Deathspike / require.ts
Last active May 12, 2017 13:12
Provides a synchronous require implementation for development purposes.
View require.ts
/* tslint:disable:no-eval */
/* tslint:disable:no-shadowed-variable */
/* tslint:disable:restrict-plus-operands */
* Provides a synchronous require implementation for development purposes.
* @author Roel van Uden
* @license MIT
let require = ((): {(id: string): any, detour?: (id: string, value: string | ((id: string) => any)) => void} => {
staltz /
Last active December 7, 2023 10:04
The introduction to Reactive Programming you've been missing
mikaelbr / gulpfile.js
Created January 14, 2014 20:24
Example gulpfile for complete set-up.
View gulpfile.js
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var less = require('gulp-less');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var minifyCSS = require('gulp-minify-css');
var embedlr = require('gulp-embedlr');
matrixise /
Created September 2, 2013 21:09
Explain the validators of SQLAlchemy.
#!/usr/bin/env python
import datetime
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, DateTime
from sqlalchemy.schema import CheckConstraint
from sqlalchemy.orm import validates
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import IntegrityError
jed /
Last active October 22, 2023 13:07
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

tedmiston / nodejs-tcp-example.js
Last active October 11, 2023 15:25
Node.js TCP client and server example
View nodejs-tcp-example.js
In the node.js intro tutorial (, they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
var net = require('net');
possibilities /
Created August 23, 2012 22:53
Meteor Async Guide

From Meteor's documentation:

In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.

Basic async

Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:

endolith / Has weird right-to-left characters.txt
Last active October 22, 2023 12:58
Unicode kaomoji smileys emoticons emoji
View Has weird right-to-left characters.txt