This file contains 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
hdon@behemoth:~/src/git/bug-20170416$ cat foobarbaz.c | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct foo { | |
size_t *bar; | |
} foo; | |
int main(int argc, char **argv) { | |
foo baz; |
This file contains 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
hdon@behemoth:~/src/git$ git init trailstest | |
Initialized empty Git repository in /home/hdon/src/git/trailstest/.git/ | |
hdon@behemoth:~/src/git$ cd trailtest | |
bash: cd: trailtest: No such file or directory | |
(reverse-i-search)`': ^C | |
hdon@behemoth:~/src/git$ cd trailstest | |
hdon@behemoth:~/src/git/trailstest$ yo | |
? 'Allo Don! What would you like to do? Trails | |
Make sure you are in the directory you want to scaffold into. |
This file contains 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
{ | |
"host": "xxxxxxxxxx" | |
, "user": "xxxxxxxxxx" | |
, "password": "xxxxxxxxxxxxxxxxxxxx" | |
, "database": "xxxxxxxxxxxxxxxxx" | |
} |
This file contains 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
#!/usr/bin/env python | |
import sys, re | |
def s2ip(s): | |
a, b, c, d = map(int, s.split('.')) | |
return (a << 24) | (b << 16) | (c << 8) | d | |
def ip2s(n): | |
return '%d.%d.%d.%d' % ( | |
(n >> 24) | |
,(n >> 16)& 255 |
This file contains 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
browserify: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' | |
, browserifyOptions: { | |
debug: true /* generate source maps */ | |
} | |
} |
This file contains 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
donny@pacemates:~/gpsee/narwhal-old$ js test.js | |
policies: | |
Policy: | |
function Policy() { | |
this.identity = true; | |
this.requirepath = new SearchPath; | |
this.filejail = "/"; | |
} | |
instance: | |
identity: |
This file contains 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
donny@teamspace:~/gpsee/src$ gsr -ddzz crash.js | |
JS exception #147 - uncaught exception: gpsee.module.ca.page.binary.ByteArray.setProperty.type: cannot apply this method to gpsee.module.ca.page.binary.ByteArray-type object | |
Failed loading program module 'crash.js': module initialization failed | |
donny@teamspace:~/gpsee/src$ ./embrace/gpsee-js/gpsee-js | |
js> const binary = require("binary") | |
js> binary.ByteArray.prototype.sort | |
function sort() { | |
[native code] | |
} | |
js> binary.ByteArray.prototype.sort = function(){return 'buzz off'} |
This file contains 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
/** Implements ByteArray.toArray() */ | |
static JSBool ByteArray_toArray(JSContext *cx, uintN argc, jsval *vp) | |
{ | |
return gpsee_throw(cx, CLASS_ID "toArray.unimplemented: this method is not yet implemented!"); | |
} | |
/** Implements ByteArray.toString() */ | |
static JSBool ByteArray_toString(JSContext *cx, uintN argc, jsval *vp) | |
{ | |
return gpsee_throw(cx, CLASS_ID "toString.unimplemented: this method is not yet implemented!"); | |
} |
This file contains 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
'#!/usr/bin/gsr -zzdd' | |
/* A pure Javascript reference implementation of ServerJS's binary ByteArray | |
* class for reference, implementation, and testing purposes. | |
* | |
* For more info see: https://wiki.mozilla.org/ServerJS/Binary/B | |
*/ | |
/* Do we have modules? */ | |
if (('function' == typeof require) && require("binary")) { |
This file contains 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
#! /usr/bin/gsr -zzdd | |
const ByteString = require("binary").ByteString; | |
const Binary = require("binary").Binary; | |
/* Provide some scaffolding for individual tests */ | |
var testUtils = { | |
/* eq compares two or more values and expects that they will pass an equality test without type coercion (===) */ | |
'eq': function() { | |
if (arguments.length < 2) throw 'too few arguments to testUtils.eq()'; |