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).
let fnGetFileNameFromContentDispostionHeader = function (header) { | |
let contentDispostion = header.split(';'); | |
const fileNameToken = `filename*=UTF-8''`; | |
let fileName = 'downloaded.pdf'; | |
for (let thisValue of contentDispostion) { | |
if (thisValue.trim().indexOf(fileNameToken) === 0) { | |
fileName = decodeURIComponent(thisValue.trim().replace(fileNameToken, '')); | |
break; | |
} |
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).
<template> | |
<div class="inline-block" v-html="require('icon-' + this.icon + '.svg')"></div> | |
</template> | |
<style module> | |
.svg { | |
fill: currentColor; | |
height: 1em; | |
margin-top: -4px; | |
vertical-align: middle; |
Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.
However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.
<div id="app"> | |
<div class='sidebar'> | |
<div class='heading'> | |
<h1>Our locations</h1> | |
</div> | |
<div> | |
<select v-model="selectedTileSet" @change="setTileSet(selectedTileSet)"> | |
<option v-for="tileset in tileSets" :value="tileset.tileLayer">{{tileset.name}}</option> |
defmodule Map.Helpers do | |
@moduledoc """ | |
Functions to transform maps | |
""" | |
@doc """ | |
Convert map string camelCase keys to underscore_keys | |
""" | |
def underscore_keys(nil), do: nil |
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
(Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in the Wiki article )
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.