Skip to content

Instantly share code, notes, and snippets.

View hermanbanken's full-sized avatar
🇳🇱

Herman hermanbanken

🇳🇱
View GitHub Profile
\documentclass[]{article}
\usepackage[a4paper, top=2in, bottom=1.5in, left=1in, right=1in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{float}
\setlength{\parindent}{0cm}
@hermanbanken
hermanbanken / Application.scala
Last active March 19, 2021 18:25 — forked from gre/Application.scala
Generate Zip archive on-the-fly with Play Framework (2.1+)
package controllers
import java.io.{FileInputStream, InputStream}
import play.api.libs.iteratee._
import play.api.mvc.{Action, _}
import scala.concurrent.ExecutionContext.Implicits.global
object Application extends Controller {
def zipRandom = Action {
@hermanbanken
hermanbanken / automata.py
Last active September 21, 2015 18:04 — forked from Arachnid/automata.py
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state
import * as functions from "firebase-functions" // The Cloud Functions for Firebase SDK to create Cloud Functions and set up triggers.
import { Firestore } from "@google-cloud/firestore"; // Cloud Firestore: Node.js Client
import * as admin from "firebase-admin"; // The Firebase Admin SDK to access Firestore.
admin.initializeApp();
const db = admin.firestore();
const adminUSA = new Firestore({projectId:"firestoreusa"}); // Firebase USA access account
const collections = ["bridges", "users", "tokens"];