Directories on host machine:
-
/data/certbot/letsencrypt -
/data/certbot/www -
Nginx server in docker container
docker run -d --name nginx \
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
| #!/bin/bash | |
| # This assumes that the ~6GB mojave installer is in the /Applications folder. | |
| # If it's not, just open the App Store, search Mojave, and you can download the installer file from there. | |
| hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave | |
| sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave | |
| mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg | |
| hdiutil detach /Volumes/Install\ macOS\ mojave |
| /* | |
| * Description: | |
| * | |
| * There are times when we want to re-use some data created/derived in a middleware later in a route handler. | |
| * | |
| * The default Koa way of doing so would be using `context.state`. Unfortunately `context.state` is hard to type and | |
| * quite implicit, since it's an object shared and potentially mutated by all middlewares and the route handler. | |
| */ | |
| /* |
| #!/usr/bin/env bash | |
| find node_modules \( -name '__tests__' -o \ | |
| -name 'test' -o \ | |
| -name 'tests' -o \ | |
| -name 'powered-test' -o \ | |
| -name 'docs' -o \ | |
| -name 'doc' -o \ | |
| -name '.idea' -o \ | |
| -name '.vscode' -o \ | |
| -name 'website' -o \ |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script data-require="jquery@3.1.1" data-semver="3.1.1" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
| <script data-require="tether@*" data-semver="1.4.0" src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script> | |
| <link data-require="bootstrap@4.0.5" data-semver="4.0.5" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" /> | |
| <script data-require="bootstrap@4.0.5" data-semver="4.0.5" src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js"></script> | |
| <script data-require="react@*" data-semver="15.5.0" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.0/react.min.js"></script> | |
| <script data-require="react@*" data-semver="15.5.0" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.0/react-dom.min.js"></script> |
| // Testined using https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld | |
| var runningTimer = false; | |
| var longBreakCount = 4; | |
| var pomodoroTime = "25minutes"; | |
| var shortBreakTime = "5minutes"; | |
| var longBreakTime = "15minutes"; | |
| var countPomodoro = function() { |
| # UPDATED 17 February 2019 | |
| # Redirect all HTTP traffic to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name www.domain.com domain.com; | |
| return 301 https://$host$request_uri; | |
| } | |
| # SSL configuration |
<hash> with your gist's hash):
# with ssh
git clone git@gist.github.com:<hash>.git mygist
# with httpsgit clone https://gist.github.com/.git mygist
| var username = ''; | |
| var password = ''; | |
| var encoded_credentials = new Buffer(username + ':' + password).toString('base64'); | |
| fetch('https://example.com', { method: 'POST', headers: {'Authorization': 'Basic ' + encoded_credentials} }) | |
| .then(function(res) { | |
| return res.json(); | |
| }) | |
| .then(function(body) { |