Skip to content

Instantly share code, notes, and snippets.

View louh's full-sized avatar
🏖️
Sipping jippers on a beach somewhere

Lou Huang louh

🏖️
Sipping jippers on a beach somewhere
View GitHub Profile
@louh
louh / index.js
Last active March 23, 2020 18:39
AWS Lambda saveWeekenderDataToS3()
const AWS = require('aws-sdk');
const http = require('http');
const BUCKET_ID = 'weekender-data';
const FILES = {
'weekendstatus.js': 'http://web.mta.info/status/weekendstatus.js',
'weekendroutestatus.js': 'http://web.mta.info/status/weekendroutestatus.js',
'weekendboroughstatus.js': 'http://web.mta.info/status/weekendboroughstatus.js',
'LinesStaticData.js': 'http://web.mta.info/weekender/Data/LinesStaticData.js'
};
@louh
louh / STREAMING_NOTES.md
Last active February 6, 2018 23:38
Streaming notes

VSCode

  • Hide menu bar
  • Theme: Abyss
  • Turn on bash pane
  • Adjust user settingsa
    • 2 space tabs
    • Show whitespace
    • Font size should be: ?
  • Extensions
@louh
louh / v2.js
Last active July 8, 2017 04:50
SendGrid's new client library is way worse.
var sendgrid = require('sendgrid')(process.env.SENDGRID_USERNAME, process.env.SENDGRID_PASSWORD)
sendgrid.send({
to: 'test@example.com',
from: 'test@example.com',
subject: 'Hello World from the SendGrid Node.js Library',
text: 'some text here'
}, function (err, json) {
if (err) {
res.status(500).json({ msg: 'Could not send feedback.' })
@louh
louh / index.html
Last active February 22, 2017 19:58
A `global.sdk_mapzen_api_key` set inside a scene file will be deleted by Mapzen.js
<!DOCTYPE html>
<html lang="en">
<head>
<title>My Web Map</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://mapzen.com/js/mapzen.css" />
<script src="https://mapzen.com/js/mapzen.min.js"></script>
<style>
html, body { margin: 0; padding: 0; }
#map { height: 100%; width: 100%; position: absolute; }

Keybase proof

I hereby claim:

  • I am louh on github.
  • I am louh (https://keybase.io/louh) on keybase.
  • I have a public key whose fingerprint is 25F4 0B46 B8F0 6868 8444 9227 93B1 FD11 1775 1812

To claim this, I am signing this object:

@louh
louh / README.md
Created April 20, 2016 23:44
jscs 3.0.x bug, see issue 2219
.node_modules/.bin/jscs test1.js

Result:

TypeError: Cannot read property 'replace' of undefined
    at renderLine (/Users/lou/Repositories/louh/jscs-test/node_modules/jscs/lib/errors.js:266:16)
    at Object.Errors.explainError (/Users/lou/Repositories/louh/jscs-test/node_modules/jscs/lib/errors.js:197:13)
    at /Users/lou/Repositories/louh/jscs-test/node_modules/jscs/lib/reporters/console.js:16:36
@louh
louh / scene.yaml
Created April 8, 2016 22:09 — forked from anonymous/scene.yaml
[This is a Tangram scene, made with Tangram Play.]
# Author @patriciogv - 2015
cameras:
camera1:
type: isometric
lights:
light1:
type: directional
direction: [0.047,0.974,-0.222]
@louh
louh / mapzen.styleguide_boilerPlate.htm
Last active January 18, 2016 17:14
minimum viable html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='x-ua-compatible' content='ie=edge'>
<title>[YOUR PAGE TITLE] · Mapzen</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<!-- If you have other meta tags for social sharing, SEO, etc, add it here -->
<link rel='stylesheet' href='https://mapzen.com/common/styleguide/styles/styleguide.css'>
<!-- If you have other external stylesheets to reference, add it here -->
// LiveReload error
ParseError: Syntax Error on line 74 in /Users/louhuang/Dropbox/GitHub/rclosner/lv-dof/public/less/styles.less:74:2
73 .left-screen {
74 &:extend(.full-screen);
75 .box-shadow(3px 0 6px rgba(0,0,0,0.10));
// LESS contents
// ...
<!DOCTYPE html>
<html>
<head>
<title>Simple Map</title>
<meta name='viewport' content='initial-scale=1.0, user-scalable=no'>
<meta charset='utf-8'>
<style>
html, body, #map {
margin: 0;
padding: 0;