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).
type EventCallback<Opts extends unknown = any> = Opts extends undefined | |
? (opts?: undefined) => void | |
: (opts: Opts) => void; | |
class EventEmitter<EventType = string> { | |
private listeners: Map<EventType, Array<EventCallback>>; | |
constructor() { | |
this.listeners = new Map(); | |
this.addListeners = this.addListeners.bind(this); |
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).
type Function<T, R> = (value: T) => R; | |
type Supplier<T> = () => T; | |
type Consumer<T> = (value: T) => void; | |
export interface OptionalMonad<T> { | |
filter: (predicate: (value?: T) => boolean) => OptionalMonad<T>; | |
ifPresent: (consumer: (value?: T) => void) => void; | |
isPresent: () => boolean; | |
map: <R>(mapper: (value?: T) => R) => OptionalMonad<R>; | |
flatMap: <R>(mapper: (value?: T) => OptionalMonad<R>) => OptionalMonad<R>; |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
# START GUIDE | |
# Remember to read the comments if you have problems | |
# I can assure you that the Dropbox files belong to me and are extracted from official Ubuntu packages | |
# Make sure you copy the whole lines into Terminal. Each command is on one line. | |
# Open Terminal and become root | |
sudo -s |
#!/usr/bin/python | |
# -*-coding:Utf-8 -* | |
import json | |
import os | |
import pickle | |
import sys | |
import time | |
import urllib | |
import requests | |
from io import open as iopen |
var CopyWebpackPlugin = require('copy-webpack-plugin'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var config = require('./config'); | |
module.exports = { |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/