JAMstack notes
Netlify structure:
Structured data in a git repository
Smashing architecture React talking to github api Victor hugo go based boilerplate static site generator
| window.URL = window.URL || window.webkitURL | |
| blob = new Blob([csvString], {type: 'text/plain'}) | |
| objectURL = window.URL.createObjectURL(blob) | |
| @$el.find('.confirm').parent().attr("href", window.URL.createObjectURL(blob)) | |
| @$el.find('.confirm').parent().attr("download", @_checkFileName()) |
| _spaceLines: -> | |
| keys = d3.selectAll('.key')[0] | |
| extraRows = 0 | |
| _lineSpacer = (d, i) => | |
| keyPos = keys[i].getBBox().x | |
| keyEdge = keyPos + keys[i].getBBox().width | |
| edge = @w - @m*2 |
| _fillRowArrayBlanks: -> | |
| curLen = @displayedArray.length | |
| diff = @watchSamples - curLen | |
| filler = [] | |
| for i in [0...diff] | |
| filler[i] = [ | |
| point: '-' | |
| pinned: true | |
| ] |
| @colorScale = d3.scale.quantile() | |
| .domain([0, .01, .1, .2, .3, .5, .8, 1.3, 2.1, 3.3]) | |
| .range(@colors) | |
| _renderLegend: -> | |
| # quantizes colors and adds an extra 0 | |
| _legendData = [0].concat(@colorScale.quantiles()) | |
| _legendData.unshift(0) |
| w next word | |
| e end of word | |
| b is back a word | |
| dd line | |
| split buffer | |
| ctr +l w + v |
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { | |
| var uri = url.parse(request.url).pathname | |
| , filename = path.join(process.cwd(), uri); |
| App = Ember.Application.create(); | |
| App.Router.map(function() { | |
| this.resource('all'); | |
| this.resource('recent'); | |
| this.resource('starred'); | |
| }); | |
| App.IndexRoute = Ember.Route.extend({ | |
| beforeModel: function() { |
JAMstack notes
Netlify structure:
Structured data in a git repository
Smashing architecture React talking to github api Victor hugo go based boilerplate static site generator
| // this file expects global variables data and compareData to be available | |
| var regData = data; | |
| var doubleData = data.concat(data); | |
| var doubleCompareData = compareData.concat(compareData); | |
| var millionData = []; | |
| for (var idx=0; idx < 10; idx += 1) { | |
| millionData = millionData.concat(doubleCompareData); | |
| } |
| /* | |
| Which implementation would you prefer for downloading bulk attachments? (e.g. click download and | |
| expect 3+ images) | |
| 1) One implementation requires the addition of 3 new libraries to make a zip file (which a user will just unzip | |
| anyway) | |
| However, it looks pretty straightforward | |
| */ |