This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/wscript b/wscript | |
| index 5ba9853..aad7bfd 100644 | |
| --- a/wscript | |
| +++ b/wscript | |
| @@ -13,8 +13,9 @@ def set_options(opt): | |
| def configure(conf): | |
| conf.check_tool("compiler_cxx") | |
| conf.check_tool("node_addon") | |
| - if not conf.check_cfg(package='sqlite3', args='--cflags --libs', uselib_store='SQLITE3'): | |
| - conf.fatal('Missing sqlite3'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function run(cmd, args, callback) { | |
| var child = spawn(command, args); | |
| var stdout = stderr = ""; | |
| child.stdout.setEncoding('utf8'); | |
| child.stdout.addListener("data", function (chunk) { stdout += chunk; }); | |
| child.stderr.setEncoding('utf8'); | |
| child.stderr.addListener("data", function (chunk) { stderr += chunk; }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FFI = require("./ffi"); | |
| sys = require("sys"); | |
| var funcs = { | |
| "libzfs_init": ["pointer", []], | |
| "libzfs_fini": ["void", [ 'pointer' ]], | |
| "zfs_dataset_exists": ["byte", [ 'pointer', 'string', 'uint32' ]] | |
| }; | |
| libzfs = new FFI.Library("libzfs", funcs); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Explanation: | |
| I was seeing some bizarre behaviour in a program I was developing. After | |
| fruitlessly debugging my code, I distilled the crazyness down to this. | |
| This script is full of WTF. Have a what the code is doing vs what the script | |
| is printing. | |
| Try out on node master@HEAD. Script seems to work up to v0.1.97 of node. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sys = require('sys'); | |
| puts = sys.puts; | |
| inspect = sys.inspect; | |
| Shazbot = function (args) { | |
| this.objectHash = {}; | |
| } | |
| Shazbot.prototype.myFunction = function(id) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| orlando@2wycked:~/projects/node-sqlite$ NODE_PATH=`pwd` node_g tests/test-affected-rows.js | |
| Running "Caching of affectedRows" | |
| . | |
| 1 test; 0 failures; 11 assertions | |
| orlando@2wycked:~/projects/node-sqlite$ NODE_PATH=. node_g tests/test-affected-rows.js | |
| node.js:374 | |
| process.dlopen(filename, this.exports); | |
| ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FFI = require('./node-ffi/node-ffi'); | |
| var Zone = new FFI.Library("libc", { | |
| // ssize_t getzonenamebyid(zoneid_t id, char *buf, size_t buflen) | |
| "getzonenamebyid": [ "int32", [ "int32", 'pointer', "uint32" ] ], | |
| "getzoneid": [ "int32", [] ], | |
| "getzoneidbyname": [ "int32", [ 'string' ] ] | |
| }); | |
| var str = new FFI.Pointer(64); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FFI = require('./node-ffi/node-ffi'); | |
| var Zone = new FFI.Library("libc", { | |
| // ssize_t getzonenamebyid(zoneid_t id, char *buf, size_t buflen) | |
| "getzonenamebyid": [ "uint32", [ "uint32", 'pointer', "int32" ] ], | |
| "getzoneid": [ "int32", [] ], | |
| "getzoneidbyname": [ "int32", [ 'string' ] ] | |
| }); | |
| var str = new FFI.Pointer(64); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -g prefix C-a | |
| set -g status-bg black | |
| set -g status-fg default | |
| set -g status-left-length 20 | |
| set -g status-left '#[fg=green]#H#[fg=default]' | |
| set -g status-justify centre | |
| set -gw window-status-format '#I#F#$ #W' | |
| set -gw window-status-current-format '#[fg=red](#[fg=default]#I#F#[fg=yellow]⚡#[fg=default] #[fg=white]#W#[fg=default]#[fg=red])#[fg=default]' | |
| set -g status-keys vi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -g prefix C-a | |
| set -g status-bg black | |
| set -g status-fg default | |
| set -g status-left-length 20 | |
| set -g status-left '#[fg=green]#H#[fg=default]' | |
| set -g status-justify centre | |
| set -gw window-status-format '#I#F#$ #W' | |
| set -gw window-status-current-format '#[fg=red](#[fg=default]#I#F#[fg=yellow]⚡#[fg=default] #[fg=white]#W#[fg=default]#[fg=red])#[fg=default]' | |
| set -g status-keys vi |