Skip to content

Instantly share code, notes, and snippets.

diff -Naur duktape/src-input/builtins.yaml duktape-ooo/src-input/builtins.yaml
--- duktape/src-input/builtins.yaml 2019-05-11 19:06:14.000000000 -0700
+++ duktape-ooo/src-input/builtins.yaml 2019-05-04 18:07:33.000000000 -0700
@@ -204,80 +204,80 @@
# This could be stripped when DUK_USE_GLOBAL_BUILTIN is disabled
# ("void 0" is the same and safer) but it's commonly used so keep.
- - key: "Object"
+ - key: "OOOObjectOOO"
value:
import sys
import time
import nclib
r = nclib.Netcat(listen=("localhost", 9090))
while not r.closed:
line = r.recv_line()
r.send(line)
@adamdoupe
adamdoupe / for_all_in_path.py
Created September 1, 2013 23:57
Function that abstracts the access pattern of os.makedirs (run this function on every directory in this directory structure).
from os import path
def for_all_in_path (name, fun):
"""
Iterator to run the given function (fun) on each directory in the given path (name).
Example: for_all_in_path("test/adam/example", fun) would call:
fun("test")
fun("test/adam")
fun("test/adam/example")
@adamdoupe
adamdoupe / sshere
Created August 13, 2013 19:39 — forked from anonymous/sshere
function sshere {
CURRENT=$(pwd)
[[ "$CURRENT" =~ ^"$HOME"(/|$) ]] && CURRENT="~${CURRENT#$HOME}"
ssh -t $@ "if [ -d $CURRENT ]; then cd $CURRENT; fi; exec \$SHELL"
}
@adamdoupe
adamdoupe / ast.scala
Created October 24, 2012 17:14
Generating AST for CS260 F12
import org.scalacheck._
import org.scalacheck.Prop._
import pllab.lwnn._
import pllab.lwnn.syntax._
object AbstractStateSpecification extends Properties("States") {
import Prop.forAll
import Gen._
import Arbitrary.arbitrary