READY/IN DEVELOPMENT/HOLD
YES | NO
A few sentences describing the overall goals of the pull request's commits.
| ############################################################################### | |
| # Helpful Docker commands and code snippets | |
| ############################################################################### | |
| ### CONTAINERS ### | |
| docker stop $(docker ps -a -q) #stop ALL containers | |
| docker rm -f $(docker ps -a -q) # remove ALL containers | |
| docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
| # exec into container |
| #!/bin/bash | |
| sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
| sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
| #!/bin/bash | |
| # The binary is most likely to have the current directory name | |
| PROCESS=${PWD##*/} | |
| # We kill the previous process | |
| killall ${PROCESS} | |
| # We launch the process | |
| go build |
| #!/usr/bin/env sh | |
| set -e | |
| read sha1_old sha1_new refname | |
| WORK_TREE=/srv/admin/apps/si-mysql-maint | |
| NVM="${HOME}/.nvm/nvm.sh" | |
| mkdir -p ${WORK_TREE} |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables:
| /* | |
| wordArray: { words: [..], sigBytes: words.length * 4 } | |
| */ | |
| // assumes wordArray is Big-Endian (because it comes from CryptoJS which is all BE) | |
| // From: https://gist.github.com/creationix/07856504cf4d5cede5f9#file-encode-js | |
| function convertWordArrayToUint8Array(wordArray) { | |
| var len = wordArray.words.length, | |
| u8_array = new Uint8Array(len << 2), | |
| offset = 0, word, i |
| # run this as root | |
| while [ 1 ]; do echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload; done | |
| # or as an upstart job | |
| script | |
| echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload | |
| end script | |
| respawn | |
| # now any process can run this or do the equivalent with sockets to trigger reload |