Skip to content

Instantly share code, notes, and snippets.

Jed Schmidt jed

Block or report user

Report or block jed

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
jed / s3-etag.js
Last active Mar 5, 2018
Create an etag for an S3 object. Assumes object is uploaded with exact chunk size.
View s3-etag.js
const {createReadStream} = require('fs')
const {createHash} = require('crypto')
module.exports = (path, chunkSize = 5242880) => {
return new Promise((resolve, reject) => {
const hashes = []
const options = {highWaterMark: chunkSize}
const rs = createReadStream(path, options)
rs.on('error', reject)
jed /
Last active Mar 18, 2020
Using AWS CloudFormation to deploy an edge lambda
aws cloudformation deploy \
--template-file stack.yaml \
--stack-name edge-lambda-test \
--capabilities CAPABILITY_IAM \
--parameter-overrides Nonce=$RANDOM
View template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Type: AWS::Serverless::Function
Handler: index.handler
Runtime: nodejs6.10
CodeUri: index.js
View jabberwocky.txt
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!"
So rested he by the Tumtum tree,
And stood awhile in thought.
jed / handler.js
Created May 16, 2016
Break Bot: pushing AWS IoT button events to Slack
View handler.js
'use strict'
// for context, see
const https = require('https')
const qs = require('querystring')
SINGLE : {emoji: ':coffee:', type: 'beverages'},
jed / progress.js
Last active Mar 11, 2016
Using template strings as progress bars
View progress.js
"use strict"
function progress(strs, current, total) {
let str = `${strs[0]}${current}${strs[1]}${total}${strs[2]}`
let ratio = Math.min(Math.max(current / total, 0), 1)
let length = Math.floor(ratio * str.length)
let pattern = new RegExp(`^.{${length}}`)
return str.replace(pattern, "\x1b[4m$&\x1b[0m")
jed / bundle.js
Created Aug 28, 2015
Using iojs on AWS Lambda
View bundle.js
import {join} from "path"
import browserify from "browserify"
import babelify from "babelify"
import archiver from "archiver"
let opts = {
standalone: "code",
// these are the API equivalent of --node
jed / test.js
Created Aug 20, 2015
lambda tester
View test.js
import {resolve} from "path"
let [pathname, args] = process.argv.slice(2)
if (!pathname) {
console.log("Usage: npm run test <path-to-script> <event-json>")
let path = resolve(process.cwd(), pathname)
jed /
Last active Aug 29, 2015


tl;dr: The [UNIQLO USA][] e-commerce team is looking for a design-oriented developer skilled in the arts of modern markup and style, but also comfortable with some PHP and JavaScript.

In this position, you will:

  • Create end-to-end responsive mockups of UNIQLO landing pages for upcoming product lines.
  • Work in-house with the visuals team to design experiences and assets that scale well across device sizes.
You can’t perform that action at this time.