Skip to content

Instantly share code, notes, and snippets.

View lukehoban's full-sized avatar

Luke Hoban lukehoban

View GitHub Profile
interface IHashtable
{
double lookup(string i);
void set(string i, double d);
}
class Hashtable()
{
var o = {};
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;
@@ -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)) }
<!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/>

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:

@lukehoban
lukehoban / testHook.js
Created March 1, 2016 15:23
My first hook.io microservice
// A simple hello world microservice
// Click "Deploy Service" to deploy this code
// Service will respond to HTTP requests with a string
import sleep from 'then-sleep';
export default async function (hook) {
await sleep(500);
hook.res.end("Hello world!");
}
@lukehoban
lukehoban / tasks.json
Last active December 16, 2015 20:09
Tasks.json for Delve
{
"version": "0.1.0",
"command": "make",
"isShellCommand": true,
"showOutput": "silent",
"args": ["install"],
"osx": {
"options": {
"env": {
"CERT": "dlv-cert"
@lukehoban
lukehoban / speech.js
Last active December 28, 2023 15:14
Project Oxford Speech APIs Node.js Sample
var fs = require('fs');
var util = require('util');
var request = require('request');
var clientId = 'test-app'; // Can be anything
var clientSecret = 'f6f0bfec08274b8790520a9079b808af'; // API key from Azure marketplace
var str = 'This is a cool demo to call Microsoft text to speach service in Node.js.';
console.log('Converting from text -> speech -> text.');
@lukehoban
lukehoban / asyncloops.js
Last active May 31, 2021 23:18
Async/await and parallel loops
// ES6 w/ Promises
// Note: From a React starter template - see https://t.co/wkStq8y3I5
function fetchData(routes, params) {
let data = {};
return Promise.all(routes
.filter(route => route.handler.fetchData)
.map(route => {
return route.handler.fetchData(params).then(resp => {
data[route.name] = resp;