Skip to content

Instantly share code, notes, and snippets.

View davestewart's full-sized avatar
⚙️
Workin' on Chrome extensions!

Dave Stewart davestewart

⚙️
Workin' on Chrome extensions!
View GitHub Profile
@davestewart
davestewart / gist:1748987
Created February 6, 2012 02:19
xJSFL loading log output
=================================================================
██ █████ ██████ ██
██ ██ ██ ██
██ ██ ██ ████ █████ ██
███ ██ ██ ██ ██
██ ██ ████ █████ ██ █████
=================================================================
@davestewart
davestewart / gist:1757156
Created February 7, 2012 04:23
xJSFL URI library - results of resolving URIs relative to running script
All URIs relative to calling script: file:///E|/05%20-%20Commercial%20Projects/xJSFL/3%20-%20development/xJSFL/user/jsfl/examples/uri-test.jsfl
URI.toURI(path);
Notes:
file.txt = current folder
./file.txt = current folder
../file.txt = parent folder
/file.txt = xJSFL root
//file.txt = current script's drive's root
@davestewart
davestewart / gist:1852483
Created February 17, 2012 10:22
xJSFL framework structure
Inspect: xJSFL (depth:5, objects:188, values:865, time:0.1 seconds)
--------------------------------------------------------------------------------
object => xJSFL
uri: "file:///E|/projects/xJSFL/"
reload: function ()
loading: false
[output] => Object
trace: function (message, newLine)
log: function (message, newLine, trace, clear)
[settings] => Object
@davestewart
davestewart / gist:2031971
Created March 13, 2012 21:49
Base.extend()ed structure
+- Comment class, text, line
| +- Heading class, text, line
| +- DocComment class, text, line, tags
| +- Element class, text, line, tags, object
| +- Variable class, text, line, tags, object, name, type,
| | +- Accessor class, text, line, tags, object, name, type, accessor
| +- Function class, text, line, tags, object, name, params, returns, signature
| +- Class class, text, line, tags, object, name, properties, functions, constructor
@davestewart
davestewart / gist:2134162
Created March 20, 2012 11:16
Suggestion for better documentation of multiple params
// JSDoc multiple param format
/**
* Context object supplies the "this" context for all iterative operations' callbacks
* @param {Context|Boolean|Number|String|File|Document} dom A Context object with a valid dom property, or true to grab the current Document DOM, or the 0-based index of the Document, or the name of the Document, or a valid .fla File reference, or a Document instance
*/
function Context(dom)
{
}
@davestewart
davestewart / gist:2142917
Created March 21, 2012 00:19
Source output from the xJSFL main class
> xjsfl: loading "{core}jsfl/libraries/text/template.jsfl"
> xjsfl: loading "{core}jsfl/libraries/text/source.jsfl"
Processing: "E:/05 - Commercial Projects/xJSFL/3 - development/xJSFL/core/jsfl/xjsfl.jsfl" ...
> Processing path "E:/05 - Commercial Projects/xJSFL/3 - development/xJSFL/core/jsfl/xjsfl.jsfl"
> HEADING: Settings
> VALUE: xjsfl.settings
> VALUE: app
> VALUE: folders
@davestewart
davestewart / gist:2158378
Created March 22, 2012 13:37
Multi-line nested ternary operators
var uri = folder instanceof URI
? folder.uri
: folder instanceof Folder
? folder.uri
: typeof folder === 'string'
? URI.toURI(folder, 1)
:null;
if(uri)
{
// ------------------------------------------------------------------------------------------------------------------------
//
// ██ ██ ██████ ██
// ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██
// ██ ██ ██████ ██
// ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██
// ██████ ██ ██ ██
//
@davestewart
davestewart / gist:2192942
Created March 25, 2012 11:13
xJSFL logging output
12:11:26:615 INFO main log created
12:11:26:618 FILE file log created
12:11:26:622 TRACE loading xjsfl...
12:11:26:629 TRACE LOADING CORE CLASSES...
12:11:26:632 TRACE loading library: Globals
12:11:26:634 FILE load library: "Globals"
12:11:26:642 FILE loading file: "{core}jsfl/libraries/framework/Globals.jsfl" ...
12:11:26:647 INFO registering function trace
12:11:26:651 INFO registering function format
@davestewart
davestewart / gist:2220724
Created March 27, 2012 21:54
xJSFL Source dump for Bounds class
Inspect: Array (depth:8, objects:42, values:91, time:0.0 seconds)
--------------------------------------------------------------------------------
array => Array
[0] => Function
class: "Function"
line: 35
name: "Bounds"
object: null
[text] => Array
0: "Bounds object. Args: 0=Document size, 1=Element, 1=radius, 1=Array, 2=width,height, 4=width,height,x,y"