Skip to content

Instantly share code, notes, and snippets.

View myread02's full-sized avatar

stevwang myread02

  • taipei
  • 04:30 (UTC +08:00)
View GitHub Profile
@myread02
myread02 / default.conf
Created July 13, 2017 09:07
NGiNX Configuration for Vue-Router in HTML5 Mode
server {
listen 80 default_server;
listen [::]:80 default_server;
root /your/root/path;
index index.html;
server_name you.server.com;
@myread02
myread02 / Ubuntu 16.04 setup with NGINX http2 and letsencrypt.md
Created July 13, 2017 02:06 — forked from dominikwilkowski/README.md
Ubuntu 16.04 setup with NGINX http/2 and letsencrypt

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with

@myread02
myread02 / multiple-3rd-party-widgets.js
Last active August 29, 2015 14:27 — forked from zenorocha/multiple-3rd-party-widgets.js
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@myread02
myread02 / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console