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
// Copyright (c) 2014, Meadhbh S. Hamrick | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are | |
// met: | |
// | |
// * Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// * Redistributions in binary form must reproduce the above copyright |
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
; dysfunction.dys | |
; | |
; Dysfunction is a new specification for communicating typed, structured, | |
; dynamic data between computing systems (or processes on the same system.) | |
; It defines a transfer syntax and processing expectations for systems which | |
; produce and consume formated data. This file is a brief introduction to | |
; Dysfunction, along with a few examples. | |
; | |
; Dysfunction is used in the same way JSON or XML might be used to store or | |
; communicate human readable representations of structured data. It is designed |
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 _pad() | |
// | |
// pads the input with count numbers of char characters. Examples: | |
// _pad( "7" ) => "7" | |
// _pad( "A", 4 ) => " A" | |
// _pad( "7", 4, "*" ) => "***7" | |
function _pad( input, count, char ) { | |
count = count ? count : 0; | |
return String( Array( count ).join( ( char ? char : ' ' ) ) + input ).slice( - count ); |
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
; SonOfDysfunction.sod | |
; | |
; "SON of Dysfunction" is a serializable object notation (SON) built | |
; after the experimental "Dysfunction" transfer syntax. "SON of Dysfunction" | |
; (aka SOD) defines a transfer syntax, a type system, a set of XPath-ish macros | |
; to identify a nodes in transferred data structures and several recommended | |
; utility macros. | |
; | |
; The primary objective of SOD mostly to have a flexible object notation which | |
; worked like JSON but allowed comments. Like JSON, SOD targets systems with |
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
Copyright (c) 2014, Smithee, Spelvin, Agnew & Plinge, Inc. | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are | |
met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright |
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
; ddn.ddn | |
; | |
; This document describes the Dynamic Data Notation (DDN). DDN is a superset | |
; of JavaScript Object Notation and fills a similar role. It differs from JSON | |
; in a few important ways: | |
; | |
; * DDN supports comments. Semi-colons (;), hash markes (#) and C++ style | |
; "slash slash" di-graphs (//) all begin a "to the end of the line" style | |
; comment. C-style "slash splat" (/*) and "splat slash" (*/) digraphs | |
; enclose bounded comments. |
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
# Figure out how big the input image is | |
GEO_INPUT=`identify $1 | cut -f 3 -d ' '` | |
X_INPUT=`echo $GEO_INPUT | cut -f 1 -d x` | |
Y_INPUT=`echo $GEO_INPUT | cut -f 2 -d x` | |
# Slice off a 2 pixel wide strip from the left side of the image | |
# Store as temp.jpg | |
convert $1 -crop 2x${Y_INPUT}+0+0 temp.jpg | |
# Now trim off the top of the temp.jpg. But we have to create a new image |
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
# raspiuser | |
# | |
# Having a fixed username / password combination is generally considered | |
# insecure. This script renames the default 'pi' user to one of your own | |
# choosing (please choose a name other than 'pi'.) Run it as root, passing | |
# the new username as the first parameter: | |
# | |
# sudo ./raspihork testuser | |
# |
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
// lifecycle.js | |
// | |
// This example demonstrates how to start, use and eventually shut down a node.js server. Many | |
// node tutorials will tell you to completely restart a node process when changing a http | |
// server's behavior. This is good advice, since it can limit the effect of memory leaks and | |
// you don't have to worry about cross-version side effects on your business logic. But | |
// every now and again you'll run across a situation where it's impractical to restart a | |
// node process to upgrade server behaviour. For instance, we once made an "intelligent" | |
// proxy that would change it's logging and routing behaviour based on whether it (or we) | |
// thought an attack was happening. |
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
{ | |
"production": { | |
"port": 80, | |
"httpsify": true | |
}, | |
"staging": { | |
"port": 8080, | |
"default": "http://127.0.0.1:19000", | |
"hosts": [ | |
{ "host": "#lo", "target": "http://127.0.0.1:19002" }, |
OlderNewer