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
| re = | |
| pend: /<!--\{end\}-->/ | |
| more: /<!--\{more\}-->/ | |
| pvar: /<!--\{(@[a-zA-Z0-9_\.\#>=\[\]]+|[a-zA-Z][a-zA-Z0-9_\.]*)(\|.*?)*\}-->/ | |
| ivar: /\#\{(@[a-zA-Z0-9_\.\#>=\[\]]+|[a-zA-Z][a-zA-Z0-9_\.]*)(\|.*?)*\}/ | |
| loop: /<!--\{[a-zA-Z][a-zA-Z0-9_\.]* in (@[a-zA-Z0-9_\.\#>=\[\]]+|[a-zA-Z][a-zA-Z0-9_\.]*)\}-->/ | |
| if value.match re.pend then @ignore = false; @parent | |
| else if value.match re.more then @ignore = true; @ | |
| else unless @ignore | |
| if value.match re.pvar then @_add 'child', new TemplateVar @, value.replace(/<!--{|}-->/g, ''), true |
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 TemplateVar extends Template | |
| constructor: (@parent = null, @value = '', @ignore = false) -> | |
| fs = @value.split '|' | |
| @value = fs.shift() | |
| @filters = (YinYang.createFilter f for f in fs) | |
| @children = [] | |
| display: (localValues) -> | |
| @localValues = localValues | |
| v = if @value[0] == '@' then @displayDom() else @displayVar() | |
| v = filter.process v for filter in @filters |
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
| # [Filters] | |
| # thru filter | |
| class YinYang.filter | |
| constructor: (@args) -> | |
| process: (val) -> val | |
| # default filter | |
| # http://osscafe.github.com/yinyang/english/api.html#filter|default | |
| class YinYang.filters.default extends YinYang.filter | |
| process: (val) -> val || @args[0] || '' |
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
| # [Filters] | |
| # thru filter | |
| class YinYang.filter | |
| constructor: (@args) -> | |
| process: (val) -> val | |
| # default filter | |
| # http://osscafe.github.com/yinyang/english/api.html#filter|default | |
| class YinYang.filters.default extends YinYang.filter | |
| process: (val) -> val || @args[0] || '' |
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
| SELECT | |
| creator, | |
| description, | |
| eid, | |
| end_time, | |
| event_subtype, | |
| event_type, | |
| hide_guest_list, | |
| host, | |
| location, |
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
| # Cross-Browser Split 1.0.1 for CoffeeScript | |
| # (c) Tsutomu Kawamura @OSSCafe; just converting to CoffeeScript | |
| # (c) Steven Levithan <stevenlevithan.com>; MIT License | |
| # An ECMA-compliant, uniform cross-browser split method */ | |
| if !cbSplit | |
| cbSplit = (str, separator, limit) -> | |
| # if `separator` is not a regex, use the native `split` | |
| return cbSplit._nativeSplit.call str, separator, limit if Object::toString.call(separator) isnt "[object RegExp]" | |
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
| $sum = array_reduce($vals, create_function('$ret,$val','return $ret + $val[0];'), 0); |
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
| find . -name \*.php -exec php -l "{}" \; |
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
| HAI | |
| I HAS A ANIMAL | |
| GIMMEH ANIMAL | |
| BOTH SAEM ANIMAL AN "CAT", O RLY? | |
| YA RLY | |
| VISIBLE "U HAS KITTEH" | |
| NO WAI | |
| VISIBLE "KITTEH R 2 GUD 4 U" | |
| OIC |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery-1.7.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| url = 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://www.engadget.com/rss.xml&callback=?'; | |
| $.getJSON(url, function(){ | |
| alert('PASS'); |