var divs = $("div");
var divs = document.querySelectorAll("div");
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
| .highlight { background-color: #ffffcc } | |
| .highlight .c { color: #586E75 } /* Comment */ | |
| .highlight .err { color: #93A1A1 } /* Error */ | |
| .highlight .g { color: #93A1A1 } /* Generic */ | |
| .highlight .k { color: #859900 } /* Keyword */ | |
| .highlight .l { color: #93A1A1 } /* Literal */ | |
| .highlight .n { color: #93A1A1 } /* Name */ | |
| .highlight .o { color: #859900 } /* Operator */ | |
| .highlight .x { color: #CB4B16 } /* Other */ | |
| .highlight .p { color: #93A1A1 } /* Punctuation */ |
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
| DEPLOY_DIR = $(WEBDOCS)/project/demo | |
| .PHONY: build deploy | |
| SOURCES := $(wildcard src/*.coffee) | |
| build: $(SOURCES) | |
| coffee -co lib/ src/ | |
| @echo "coffee sources were compiled" |
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
| <!-- cache items specified in manifest --> | |
| <html manifest="app.manifest"> | |
| <!-- standalone mode, hides web browser UI --> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <!-- optimized for mobile, zoom/scaling disabled --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1. | |
| 0, user-scalable=no" /> |
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> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="toggle.css"> | |
| <style> | |
| #status { | |
| margin: 50px; | |
| font-size: 300px; | |
| font-family: 'Helvetica Neue'; | |
| font-weight: 100; | |
| color: #555; |
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
| #!/usr/bin/env coffee | |
| fs = require 'fs' | |
| transform = (data) -> | |
| result = data.toString().replace /h/g, 'm' | |
| process.stdout.write result | |
| if process.argv.length > 2 | |
| transform fs.readFileSync(file, 'utf8') for file in process.argv[2..] | |
| else |
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
| powerset = (S) -> | |
| P = [[]] | |
| P.push P[j].concat S[i] for j of P for i of S | |
| P |
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
| def aliased(klass): | |
| ''' | |
| Decorator to be used in combination with `@alias` decorator. | |
| Classes decorated with @aliased will have their aliased methods | |
| (via @alias) actually aliased. | |
| ''' | |
| methods = klass.__dict__.copy() | |
| for name, method in methods.iteritems(): |