Skip to content

Instantly share code, notes, and snippets.

From 47331252e0174a04ae9eab44c948e04fb85a6cf5 Mon Sep 17 00:00:00 2001
From: Trent Mick <trentm@gmail.com>
Date: Fri, 6 Aug 2010 15:28:08 -0700
Subject: [PATCH] markdown fix
---
doc/api.markdown | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/api.markdown b/doc/api.markdown
From 1813d0ffb6f90f360513077e545c52d7a62ede28 Mon Sep 17 00:00:00 2001
From: Trent Mick <trentm@gmail.com>
Date: Fri, 6 Aug 2010 11:17:45 -0700
Subject: [PATCH] spelling correction
---
ChangeLog | 2 +-
doc/api.markdown | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
From e9c3a7813a017983423c0f8b0813fb45fa2b4440 Mon Sep 17 00:00:00 2001
From: Trent Mick <trentm@gmail.com>
Date: Mon, 9 Aug 2010 02:18:32 -0700
Subject: [PATCH 4/4] working first pass at tab-completion in the repl (see inline TODOs)
---
lib/readline.js | 73 +++++++++++++++++++++-----
lib/repl.js | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 211 insertions(+), 15 deletions(-)
From 8f8131916f5d34424415049a8dc2723387602348 Mon Sep 17 00:00:00 2001
From: Trent Mick <trentm@gmail.com>
Date: Wed, 11 Aug 2010 23:14:12 -0700
Subject: [PATCH] repl completion: multi-column display of completions
---
lib/readline.js | 56 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 47 insertions(+), 9 deletions(-)
diff --git a/lib/readline.js b/lib/readline.js
@trentm
trentm / hacktime.js
Created September 8, 2015 04:09
Show a Bunyan raw stream that hacks 'rec.time' to a custom format, if desired.
var bunyan = require('./');
function HackTimeStream(stream) {
this.stream = stream || process.stderr;
}
HackTimeStream.prototype.write = function write(rec) {
rec.time += 'wallawalla';
this.stream.write(JSON.stringify(rec) + '\n');
};
Index: /Users/trentm/as/komodo/src/modules/fastopen/components/koFastOpen.py
===================================================================
--- koFastOpen.py (revision 56871)
+++ koFastOpen.py (working copy)
@@ -355,6 +355,7 @@
g.append(kovg)
cwds = list(kovg.cwds)
if self.pref_enable_project_gatherer and self.project:
+ g.append(fastopen.DirGatherer("projbasedir", [self.project.base_dir], ...))
g.append(fastopen.CachingKomodoProjectGatherer(
@trentm
trentm / gist:645633
Created October 25, 2010 20:07
some folks don't know about autoconf
diff --git a/README b/README
index 18e0760..5a8cf6c 100644
--- a/README
+++ b/README
@@ -2,6 +2,7 @@ Evented I/O for V8 javascript.
To build:
+ autoconf
./configure
@trentm
trentm / gist:737010
Created December 11, 2010 00:03
fix node build on Solaris (if SUNWspro installed): master
diff --git a/wscript b/wscript
index 1790a9b..54378c2 100644
--- a/wscript
+++ b/wscript
@@ -440,7 +440,12 @@ def v8_cmd(bld, variant):
else:
profile = ""
- cmd_R = sys.executable + ' "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static %s %s'
+ if sys.platform == "win32":
@trentm
trentm / gist:737014
Created December 11, 2010 00:11
fix node build on Solaris (if SUNWspro installed): v0.2
diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct
index 8fc1926..919ef99 100644
--- a/deps/v8/SConstruct
+++ b/deps/v8/SConstruct
@@ -657,7 +657,7 @@ def GuessToolchain(os):
elif 'msvc' in tools:
return 'msvc'
else:
- return None
+ return 'gcc'
@trentm
trentm / gist:745642
Created December 17, 2010 20:22
24 math problem, brute force script
# Requires Python 2.7 for latest itertools functions.
import itertools
allnums = [3,3,7,7]
# [3, 3, 7, '/', '+', 7, '*'] # RPN
# == 3 + (3/7) * 7
# == 24
allnums = [1,3,4,6]