Doug Crockford:
- '{' on same line (for returning obj. literals)
- Javascript gives you lots of ways to do things. You should do it the way that causes the least confusion and the fewest errors.
Brendan Eich:
| (function(x){return x*x})(3) |
| > | |
| > Quix command syntax reference: http://quixapp.com/syntax/ | |
| > Roll your own bookmarklet: http://quixapp.com/extend/ | |
| > | |
| @greenideas's custom commands | |
| i javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src','http://www.instapaper.com/j/SINXm2AswnG2?u='+encodeURIComponent(d.location.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0) Save to Instapaper | |
| t tweetie:%s New tweet with selected text |
Doug Crockford:
Brendan Eich:
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>PhoneGap</title> | |
| <script type="text/javascript" charset="utf-8" src="phonegap-1.4.1.js"></script> | |
| </head> | |
| <body> | |
| <iframe src="http://mwhenry.com/ad.html" /> | |
| </body> | |
| </html> |
| { | |
| "feed" : { | |
| "title" : "The feed's name", | |
| "items" : [{ | |
| "author" : "Author's name", | |
| "content" : "The full text/html content of the feed item", | |
| "description" : "Item synopsis", | |
| "media" : { | |
| "type" : "The MIME type of the media item", | |
| "url" : "URL for media resource", |
| #!/usr/local/bin/python | |
| # Requires parsedatetime module: | |
| # https://github.com/bear/parsedatetime | |
| import parsedatetime as pdt | |
| natLangDateStr = "%filltext:name=date:default=today%" | |
| dt = pdt.Calendar().parse(natLangDateStr)[0] |
| import * as d3 from 'd3'; | |
| let normals = [] | |
| for (let i = 0; i < 10000; i++) normals.push(d3.randomNormal()()) | |
| const drawingArea = { w: 800, h: 600 } | |
| const margin = { top: 20, right: 20, bottom: 20, left: 20 } | |
| const binWidth = 10 | |
| const x = d3.scaleLinear() |