Skip to content

Instantly share code, notes, and snippets.

View lukehoban's full-sized avatar

Luke Hoban lukehoban

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lukehoban on github.
  • I am lukehoban (https://keybase.io/lukehoban) on keybase.
  • I have a public key ASD4eLLvv1FzudJ0r5zQmaI7z8kW4arMFQdGreow4dGXRwo

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<head>
<title>JavascriptWebClient</title>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js" type="text/javascript"></script>
</head>
<body>
<h1>Employee Pay</h1>
<br/>
@@ -459,8 +466,12 @@ StatementList:
| Statement { [$1]}
// See 12.2
VariableStatement:
- | VAR VariableDeclarationList SEMICOLON { VariableStatement(List.rev($2)) }
- | VAR VariableDeclarationList { VariableStatement(List.rev($2)) }
+ | Type VariableDeclarationList SEMICOLON { VariableStatement([], false, $1,List.rev($2)) }
+ | Type VariableDeclarationList { VariableStatement([], false, $1, List.rev($2)) }
+ | READONLY Type VariableDeclarationList SEMICOLON { VariableStatement([], true, $2,List.rev($3)) }
+ | READONLY Type VariableDeclarationList { VariableStatement([], true, $2, List.rev($3)) }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Activation;
using System.Net;
using System.IO;
using System.Web;
interface IHashtable
{
double lookup(string i);
void set(string i, double d);
}
class Hashtable()
{
var o = {};
@lukehoban
lukehoban / helloworld.js
Created June 18, 2018 04:43
A simple Pulumi program
const cloud = require("@pulumi/cloud-aws");
const endpoint = new cloud.API("hello");
endpoint.static("/", "www");
endpoint.get("/source", (req, res) => res.json({name: "AWS"}));
exports.url = endpoint.publish().url;
@lukehoban
lukehoban / thumbnailer.js
Created June 18, 2018 05:40
Serverless + Containers with Pulumi
const cloud = require("@pulumi/cloud-aws");
const aws = require("@pulumi/aws");
// A bucket to store videos and thumbnails.
const bucket = new cloud.Bucket("bucket");
const bucketName = bucket.bucket.id;
// A task which runs a containerized FFMPEG job to extract a thumbnail image.
const ffmpegThumbnailTask = new cloud.Task("ffmpegThumbTask", {
build: "./docker-ffmpeg-thumb",
@lukehoban
lukehoban / apigatewaydomain.ts
Last active September 25, 2023 07:41
API Gateway Domain Mapping in Pulumi
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// The services we want to host on our domain...
const api1 = new aws.apigateway.x.API("api1", {
routes: [
{method: "GET", path: "/", eventHandler: async(ev) => {
return {
statusCode: 200,
body: JSON.stringify({hello: "world"}),
import * as awsx from "@pulumi/awsx";
import * as eks from "@pulumi/eks";
import * as k8s from "@pulumi/kubernetes";
// Create an AWS VPC and EKS cluster
const vpc = new awsx.Vpc("vpc", { usePrivateSubnets: false });
const cluster = new eks.Cluster("cluster", {
vpcId: vpc.vpcId,
subnetIds: vpc.subnetIds,
});