This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
[Settings] | |
ID = "Your_Site_ID" | |
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts. | |
[build] | |
# This is the directory to change to before starting a build. | |
base = "project/" | |
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root. | |
# This is the directory that you are publishing from (relative to root of your repo) |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
# This will run `nvm use` everytime you change directory, if | |
# 1. an .nvmrc file is present | |
# 2. there is no .nvmrc but you're not using your default node | |
# Add it to your `.bash_profile` (or wherever else is suitable for your setup). | |
enter_directory(){ | |
if [ "$PWD" != "$PREV_PWD" ]; then | |
PREV_PWD="$PWD"; | |
if [ -e ".nvmrc" ]; then | |
nvm use; |
This is a proposal for a lightning talk at the Reactive 2016 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)
JavaScript is a dynamic language, and there's nothing wrong with that. It allows quick iteration and lowers barriers. However, sometimes some compile-time type checking is just what you need to keep your code in line and give yourself the confidence to build bigger and faster. Flow gives the best of both worlds. You can have normal JavaScript but you can also add types where they're helpful, and it adds zero cost at runtime. In this talk I'll show Flow as it applies to a Redux & React codebase.
This is a proposal for a lightning talk at the Reactive 2015 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)
JavaScript is getting async functions (or already has them if you count Babel.JS) and with them a way to finally slay the evil pyramid. This new language feature lets you write asynchronous code that almost looks synchronous, while maintaining the same semantics as promises. This lets you shed your .then and .catch boilerplate and escape those nested callbacks in favour of clean, explicit, maintainable code.
#!/usr/bin/env python | |
""" | |
Compile Django Templates from the command line | |
Thomas Parslow 2014 | |
tom@almostobsolete.net | |
tomparslow.co.uk almostobsolete.net | |
Run passing in the the template file to read and the context data as | |
JSON. Will output the compiled HTML on stdout. |
Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript
PhoneGap is Adobe's implementation of Cordova. PhoneGap also offers the PhoneGap Build service. This is not covered here.
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2
W3C Introduction to Web Components - explainer/overview of the technologies
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |