Skip to content

Instantly share code, notes, and snippets.

View arjunguha's full-sized avatar
:shipit:
Why does this exist?

Arjun Guha arjunguha

:shipit:
Why does this exist?
View GitHub Profile
@arjunguha
arjunguha / package.json
Created February 19, 2018 22:42
Stopify as a webpack plugin
{
"name": "stopify-webpack-demo",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "./node_modules/.bin/webpack"
},
"license": "MIT",
"dependencies": {
"babel-loader": "^7.1.2",
@arjunguha
arjunguha / package.json
Created February 19, 2018 22:42
Stopify as a webpack plugin
{
"name": "stopify-webpack-demo",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "./node_modules/.bin/webpack"
},
"license": "MIT",
"dependencies": {
"babel-loader": "^7.1.2",
(* Run this with utop *)
#require "core";;
(* NetKAT syntax using GADTs *)
open Core.Std
type switchId = Int64.t
type portId = Int32.t
@arjunguha
arjunguha / Sep9.scala
Created September 9, 2014 14:24
CS220
import cmpsci220._
sealed trait I
case class Z() extends I
case class S(prev: I) extends I
def intToI(n: Int): I = n match {
case 0 => Z()
case _ => if (n > 0) { S(intToI(n - 1)) }
else { error("cannot represent negative numbers") }
@arjunguha
arjunguha / Vagrantfile
Last active August 29, 2015 14:04
Frenetic Vagrantfile
Vagrant.require_version ">= 1.6.0", "< 1.7.0"
$script = <<EOF
set -x
apt-get update
apt-get upgrade -yq
apt-get install -y \
virtualbox-guest-x11 \
@arjunguha
arjunguha / Client.scala
Last active August 29, 2015 14:01
Yrangepos error
// Place in client subdirectory
import Macro._
object Main extends App {
mymacro {
println("Printed range")
println("Should span several characters, but does not :(")
}
#lang racket
(require json
web-server/servlet
web-server/servlet-dispatch
web-server/web-server
web-server/dispatch)
(define-values (start mk-url)
(dispatch-rules
@arjunguha
arjunguha / Feb20.v
Created February 20, 2014 18:07
Code from class on Feb 20 (CS691PL)
Set Implicit Arguments.
Module Semantics.
Inductive binop : Set := Plus | Times.
Inductive exp : Set :=
| Const : nat -> exp
| Binop : binop -> exp -> exp -> exp.
Set Implicit Arguments.
Require Import Cpdt.CpdtTactics.
Require Import Lists.List Arith.
Module LE.
Unset Printing Notations.
Check (forall (n m : nat), { n <= m } + { n > m }).
Check (forall (n m : nat), n <= m \/ n > m ).
Set Implicit Arguments.
Require Import Arith Omega.
Section Evenness.
Inductive even : nat -> Prop :=
| zero_even : even 0
| ss_even : forall (n : nat), even n -> even (S (S n)).