Skip to content

Instantly share code, notes, and snippets.

View hawkw's full-sized avatar
🛠️
recently edited these files

Eliza Weisman hawkw

🛠️
recently edited these files
View GitHub Profile
use std::future::Future;
use std::mem;
use std::pin::Pin;
use std::sync::Arc;
use futures::task::{Context, Poll};
use tokio::sync::{Mutex, OwnedMutexGuard};
use tower_service::service::Service;
pub struct CloneableService<S> {
inner: Arc<Mutex<S>>,
@hawkw
hawkw / Minesweeper.scala
Last active December 14, 2016 20:43 — forked from ArcticLight/Minesweeper.scala
A really dumb implementation of Minesweeper
package me.arcticlight.minesweeper
import scala.annotation.tailrec
import scala.collection.immutable
import scala.language.postfixOps
import scala.io.StdIn
import scala.util.Try
/**
* Created by bogos on 12/13/2016.
@hawkw
hawkw / Event.scala
Last active August 29, 2015 14:24 — forked from ArcticLight/Event.scala
///////////////////////////////////////////////////////////////////////
// TOP SECRET METEORCODE ENGINEERING BULLSHIT -- DO NOT STEAL //
// (c) Hawk Weisman, all rights reserved 'n' stuff //
///////////////////////////////////////////////////////////////////////
type Payload: Map[String,Object]
type Prefunc: Payload => Boolean
abstract class Event (
protected val payload: Payload,
protected var valid: Boolean = true
@hawkw
hawkw / USL.scala
Last active August 29, 2015 14:08 — forked from ArcticLight/USL.scala
/**
* USL - Useless Stack Language
*/
import scala.collection.mutable
object USL {
/********************
* Handling USL Data
********************/
class ClobberTable<K, T> {
ClobberTable parent;
HashTable<K, T> my;
ArrayList<K> whites;
public ClobberTable() {
parent = null;
my = new HashTable<K, T>();
whites = new ArrayList<K>();
}