Skip to content

Instantly share code, notes, and snippets.

View ericlathrop's full-sized avatar

Eric Lathrop ericlathrop

View GitHub Profile
@ericlathrop
ericlathrop / synthwave120.md
Last active February 19, 2018 20:35
120 great synthwave albums and EP's
@ericlathrop
ericlathrop / README.md
Last active August 18, 2016 13:12
JSLou Javascript Debugging Presentation

JavaScript Debugging using the Browser Dev Tools

Figuring out the root cause of a bug is often the hardest part of fixing it. Eric Lathrop will show how to use your browser's built-in developer tools to track down bugs so you can fix them.

How to run examples:

  1. git clone https://github.com/TwoScoopGames/Cluster-Junk.git
  2. cd Cluster-Junk
"use strict";
var http = require("http");
function HttpError(statusCode) {
this.name = "HttpError";
this.statusCode = statusCode;
this.message = "Recieved status code " + statusCode;
}
HttpError.prototype = Error.prototype;
@ericlathrop
ericlathrop / gist:05e283464c6012e4e0b9
Last active August 29, 2015 14:10
JavaScript Async Map
function asyncMap(list, iterator, callback) {
var finished = 0;
var results = [];
var firstErr;
var makeIteratorFinishCallback = function(i) {
return function(err, item) {
finished++;
if (err) {
if (!firstErr) {
@ericlathrop
ericlathrop / LouisvilleTechMeetups.md
Last active April 14, 2020 22:12
Louisville Tech Meetups
@ericlathrop
ericlathrop / dynamodbtutorial.rb
Created March 24, 2014 17:06
DynamoDB Tutorial for Ruby
# Port of the DynamoDB Tutorial to Ruby
# http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LoadData_PHP.html
require 'aws-sdk'
def upload_sample_products(dynamo_db)
products = dynamo_db.tables['ProductCatalog']
products.hash_key = { :Id => :string }
product = {
'Id' => 101,
@ericlathrop
ericlathrop / keybase.md
Last active April 16, 2019 23:03
keybase.md

Keybase proof

I hereby claim:

  • I am ericlathrop on github.
  • I am ericlathrop (https://keybase.io/ericlathrop) on keybase.
  • I have a public key ASAag5nRI42HnIAAHBc2ZGe3nj4dl4ajayHy3-p-LtkGFgo

To claim this, I am signing this object:

@ericlathrop
ericlathrop / golang_fork_import_problems.md
Last active December 19, 2015 05:48
A description of problems working with forked repositories in Go.

Say there's a Go app at github.com/supermighty/app, which has a package a that references b. If I fork that repository to github.com/ericlathrop/app, now the local file $GOPATH/github.com/ericlathrop/app/a/something.go still has the line

import ("github.com/supermighty/app/b")

so when I edit $GOPATH/github.com/ericlathrop/app/b/something.go, my changes are never seen in a because it's still using the original copy of b!

The workaround is to symlink the original repository path to the fork's path:

@ericlathrop
ericlathrop / mh2mbox.sh
Created February 19, 2013 02:46
Convert MH mail folders to MBOX files, which are used by Mozilla Thunderbird.
#!/bin/bash
#
# mh2mbox.sh
# By Eric Lathrop <eric@ericlathrop.com>
#
# Convert MH mail folders to MBOX files
# Useful for switching to Mozilla Thunderbird
#
# Copy this script to ~/Mail/ and execute.
#