Skip to content

Instantly share code, notes, and snippets.

View glyh's full-sized avatar
🐫
Made with OCaml

Yihang "Corvo" Liu glyh

🐫
Made with OCaml
  • o1Labs
  • 11:46 (UTC +08:00)
View GitHub Profile
@zacharycarter
zacharycarter / wclwn.md
Last active May 22, 2025 15:00
Binding to C Libraries with Nim
@zehnpaard
zehnpaard / simple-hiccup.core.clj
Last active March 25, 2023 02:04
Simple Ring/Compojure/Hiccup Demo
(ns simple-hiccup.core
(require
[ring.adapter.jetty :refer [run-jetty]]
[simple-hiccup.middleware :as m]
[simple-hiccup.routes :as r]
))
(def app
(-> r/routes
m/logger
@matthewaveryusa
matthewaveryusa / grab_io_kbm.c
Created May 20, 2016 03:13
linux grab io from keyboard and mouse
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/input.h>
#include <time.h>
#include <stdint.h>
int main(int argc, char* argv[]){
sleep(1);
@vadimkantorov
vadimkantorov / debug_repl.lua
Last active January 3, 2022 15:41
A Lua repl that copies local variables onto globals for inspection
local torch_repl = repl
function repl(restoreGlobals)
-- copied from http://stackoverflow.com/questions/33068607/how-can-i-use-the-torch-repl-for-debugging
require 'trepl'
restoreGlobals = restoreGlobals or false
-- optionally make a shallow copy of _G
local oldG = {}
if restoreGlobals then
@steinwaywhw
steinwaywhw / reg-exp-fn.sml.md
Created September 13, 2015 23:55
A Copy of ml-ulex Source Code

I pasted it here because it is hard to find for me. It is publicly available at here. The total order and canonical form is clearly presented here over the original ml-ulex paper.

(* reg-exp-fn.sml
 *
 * COPYRIGHT (c) 2005 
 * John Reppy (http://www.cs.uchicago.edu/~jhr)
 * Aaron Turon (adrassi@gmail.com)
 * All rights reserved.