The following is an "oh noes, where's my Internet" guide to surviving as a coder with no or limited Internet. Primarily the guide is focused on those who will be doing JS development (and using npm as a package manager) but some of the advice is useful for other environments also.
Tooling in this steps require that you have git installed, and use github for your repositories.
One thing I really like to do when I get a bit of time offline, is clean up an old repository that I once thought was useful. I rarely know about what project this might be in advance. As a result, I like to clone all the things from my personal github account.
To do this I recommend using multirepo
, which is best installed (at the moment) like so:
Useful information on the colours used in the Composited Layer Borders experiment (see chrome://flags/#composited-layer-borders) available at:
When exactly did we decide that we should substitute the term "code reuse" with isomorphism? I didn't get the memo...
So you've heard about streams huh? Yeah, the kind that makes producing, transforming and consuming data more portable. That's great. Did you know there are a few different kinds of streams, and it's not a one type will solve all your problems? No? Ah, well let me explain...
This is an in-progress work that I should have started many moons ago.
var COLORLIST = ['red', 'blue', 'yellow', 'green', 'pink']; | |
var h = require('hyperscript'); | |
function toggler(value) { | |
return function(evt) { | |
var currentColor = evt.target.innerText; | |
var currentIdx = COLORLIST.indexOf(currentColor); | |
console.log(currentIdx + ' ^ ' + value + ' = ' + (currentIdx ^ value)); | |
evt.target.innerText = COLORLIST[currentIdx ^ value]; |
{ | |
"ignore": [ | |
"**/node_modules/**", | |
"**/dist/**", | |
"**/examples/**", | |
"**/test/**", | |
"**/Gruntfile.js", | |
"**/gulpfile.js" | |
] | |
} |
An nginx configuration that can be added to your /etc/nginx/sites-enabled
directory to proxy from the local nginx server through to other servers running on other ports. Primarily this is useful when you want to view a site using HTTPS but don't want to associate the certificate with that local server.
The following proxys work:
http://localhost/ => http://localhost:9966/
https://localhost/ => http://localhost:9966/
https://localhost/<port>/ => http://localhost:<port>/
https://localhost// => http://localhost:/
inputfiles = $(patsubst %.png,dist/%.pdf,$(wildcard *.png)) | |
rebuild: clean build | |
build: prepare $(inputfiles) postbuild | |
dist/%.pdf: | |
@convert $(patsubst dist/%.pdf,%.png,$@) tmp/$@ | |
@gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -sOutputFile=$@ tmp/$@ | |
@rm tmp/$@ |