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
| version: '2.1' | |
| services: | |
| php: | |
| tty: true | |
| build: | |
| context: . | |
| dockerfile: tests/Docker/Dockerfile-PHP | |
| args: | |
| version: cli | |
| volumes: |
adapted from this blog
# YAML
name: Jon# YAML
object:These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.
OpenSSL has a variety of commands that can be used to operate on private
key files, some of which are specific to RSA (e.g. openssl rsa and
openssl genrsa) or which have other limitations. Here we always use
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
| # | |
| # Acts as a nginx HTTPS proxy server | |
| # enabling CORS only to domains matched by regex | |
| # /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
| # | |
| # Based on: | |
| # * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
| # * http://enable-cors.org/server_nginx.html | |
| # | |
| server { |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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
| --log_gc (Log heap samples on garbage collection for the hp2ps tool.) | |
| type: bool default: false | |
| --expose_gc (expose gc extension) | |
| type: bool default: false | |
| --max_new_space_size (max size of the new generation (in kBytes)) | |
| type: int default: 0 | |
| --max_old_space_size (max size of the old generation (in Mbytes)) | |
| type: int default: 0 | |
| --max_executable_size (max size of executable memory (in Mbytes)) | |
| type: int default: 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
| // data = ctx.getImageData(0, 0, image.width, image.height).data; | |
| // | |
| // mediancut(data, colorCount); | |
| // returns [[255,55,255], [233,34,233], [144,34,233], [89,34,233]]; | |
| function mediancut(data, n){ | |
| var boxes = [getBoundingBox(data)]; | |
| if(n !== 1){ | |
| boxes = cut(boxes[0]); | |
| while(boxes.length < n){ |
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
| " Statusline (requires Powerline font) | |
| set statusline= | |
| set statusline+=%(%{'help'!=&filetype?bufnr('%'):''}\ \ %) | |
| set statusline+=%< " Where to truncate line | |
| set statusline+=%f " Path to the file in the buffer, as typed or relative to current directory | |
| set statusline+=%{&modified?'\ +':''} | |
| set statusline+=%{&readonly?'\ ':''} | |
| set statusline+=%= " Separation point between left and right aligned items | |
| set statusline+=\ %{''!=#&filetype?&filetype:'none'} | |
| set statusline+=%(\ %{(&bomb\|\|'^$\|utf-8'!~#&fileencoding?'\ '.&fileencoding.(&bomb?'-bom':''):'') |
NewerOlder