Skip to content

Instantly share code, notes, and snippets.

View trenthaynes's full-sized avatar

Trent Haynes trenthaynes

  • Carport 23 LLC
  • Houston, Texas
View GitHub Profile
@cferdinandi
cferdinandi / who-is-driving-refactor.html
Created January 30, 2019 15:04
A refactor of the vanilla JS Who's Driving app.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Who should drive?</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Styles -->
<style type="text/css">
@brakmic
brakmic / msbuild_and_webpack_with_gulp.js
Last active January 20, 2021 14:28
Visual Studio (MSBuild) + Webpack + LiveReload with Gulp
/* jshint strict : false */
var gulp = require('gulp');
var gutil = require('gulp-util');
var plumber = require('gulp-plumber');
var webpack = require('webpack');
var msbuild = require("gulp-msbuild");
var nodemon = require('nodemon');
var webpackConfigPath = require('./webpack.config');
var vsSolutionPath = 'PATH_TO_VISUAL_STUDIO_SOLUTION';
var watchPaths = [
@jboner
jboner / latency.txt
Last active May 8, 2024 16:32
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},