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
| ".vimrc | |
| syntax on | |
| set autoindent | |
| set smartindent | |
| "filetype plugin indent on | |
| "set iskeyword+=_,$,@,%,# | |
| set noerrorbells | |
| set incsearch | |
| set list |
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
| class HaveJson | |
| def initialize(selector) | |
| @selector = selector | |
| end | |
| def matches?(json) | |
| @json = json | |
| return traverse(@json, @selector) | |
| end |
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
| class HaveJson | |
| def initialize(selector) | |
| @actual = [] | |
| @depths = [] | |
| @selector = selector | |
| @path, @test = selector.split('=') | |
| @path = @path.split('/') | |
| end | |
| def matches?(json) |
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
| #http://stackoverflow.com/questions/5513558/executing-code-for-every-method-call-in-a-ruby-module | |
| module M | |
| def self.before(*names) | |
| names.each do |name| | |
| m = instance_method(name) | |
| define_method(name) do |*args, &block| | |
| yield | |
| m.bind(self).(*args, &block) | |
| end |
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
| ================================================================ | |
| # Key | |
| <- indicates a dependency | |
| -> indicates a result | |
| ================================================================ | |
| # pre-build (all settings default to user dotfile, then factory settings) | |
| <- find project root |
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
| exports.findParent = findParent = (dir, pred) -> | |
| return null if dir == '/' | |
| if pred(dir) | |
| return dir | |
| else | |
| upDir = normalize(dir + '/..') | |
| return findParent(upDir, pred) | |
| end |
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
| digraph G { | |
| //end [shape=Msquare]; | |
| subgraph cluster_0 { | |
| style=filled; | |
| color=lightgrey; | |
| node [style=filled,color=white]; | |
| label = "compiler"; |
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
| exports.macros = | |
| load: (o) -> | |
| throw SyntaxError 'load takes one argument' unless @args.length == 1 | |
| {join} = require 'path' | |
| getModulePath = require join(projectRoot(), 'node_modules/modulate/domain/services/getModulePath') | |
| domainRoot = join projectRoot(), 'domain' | |
| moduleSpec = eval (@args[0].compile o) | |
| path = getModulePath(domainRoot, moduleSpec) | |
| "require('#{ path }.js');" |
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
| exports.macros = | |
| load: (args, context) -> | |
| throw SyntaxError 'load takes one argument' unless args.length == 1 | |
| {join} = require 'path' | |
| getModulePath = require join(context.projectRoot, 'node_modules/modulate/domain/services/getModulePath') | |
| domainRoot = join context.projectRoot, 'domain' | |
| moduleSpec = eval (args[0].compile context.compileContext) | |
| path = getModulePath(domainRoot, moduleSpec) |
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
| Macro file: /Users/brandon/Projects/Code/js/macros.coffee | |
| Project root: /Users/brandon/Projects/Code/js | |
| Macros loaded: load | |
| SyntaxError: In src/nodes.coffee, assignment to a reserved word: { | |
| from: from, | |
| to: to, | |
| exclusive: exclusive | |
| } = this.variable.properties.pop().range | |
| at Assign.compilePatternMatch (/Users/brandon/Projects/Code/js/yerbascript/lib/coffee-script/nodes.js:1395:17) | |
| at Assign.compileNode (/Users/brandon/Projects/Code/js/yerbascript/lib/coffee-script/nodes.js:1333:23) |
OlderNewer