- add following to each server block in
nginx
config
this will allow your server to answer on ACME challengelocation ^~ /.well-known/acme-challenge/ { default_type "text/plain"; root /nginx/path/to/webroot; }
- mount volume
/certbot/path/to/webroot
tonginx
's container on/nginx/path/to/webroot
, this will allow other containers to place challenge answers fornginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>strict mode efficiency Array#{map,fill,reduce}</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isRightOf = (v, [a, b]) => v > b; | |
const isLeftOf = (v, [a, b]) => v < a; | |
const isIn = (v, r) => !isLeftOf(v, r) && !isRightOf(v, r); | |
const isOver = (range, r) => isRightOf(range[1], r) && isLeftOf(range[0], r); | |
class RangeList { | |
constructor () { | |
this.list = []; | |
} | |
/** |
npm i $(node -e "console.log(Object.entries(require('./package.json').dependencies).filter(([n,v]) => v.length < 20).map(([n]) => n+'@latest').join(' '))") --save
npm i $(node -e "console.log(Object.entries(require('./package.json').devDependencies).filter(([n,v]) => v.length < 20).map(([n]) => n+'@latest').join(' '))") --save-dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oh-my-zsh Bureau Theme | |
### NVM | |
ZSH_THEME_NVM_PROMPT_PREFIX="%{$fg_bold[green]%}%B⬡%b%{$reset_color%} " | |
ZSH_THEME_NVM_PROMPT_SUFFIX="" | |
### Git [master ▾●] | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg_bold[cyan]%}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var {access_token, refresh_token, id_token} = new URL(location.href).hash.slice(1).split('&').map(s => s.split('=')).reduce((o, [k, v]) => Object.assign(o, {[k]: decodeURIComponent(v)}), {}); [access_token, refresh_token, id_token].join('###') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const R = require('ramda'); | |
const castArray = v => Array.isArray(v) | |
? v | |
: v == null | |
? v | |
: [v]; | |
const pathFrom = R.curry((path, sources, obj) => sources.map(castArray).reduce((obj, source) => { | |
const current = R.path(path, obj); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style media="screen"> | |
html, body { | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
font-size: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
In order to use this script, you need to have a file named overrides.txt and rules.py exist in | |
the same dir that you run mitmproxy. | |
An example of overrides.txt file might look like: | |
<urlRegExp> , <filePath> , [cmd] | |
rules.py should define cmd named functions as cmd(fileText, urlRegExpMatch) | |
Usage: mitmproxy -s overrides.py |
NewerOlder