dscacheutil -flushcache; sudo killall -HUP mDNSResponder
| exec ssh-agent $BASH -s 10<&0 << EOF | |
| ssh-add ~/.ssh/id_rsa &> /dev/null | |
| exec $BASH <&10- | |
| EOF |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
Solution to su: must be run from a terminal when working in reverse shell (PHP).
echo "import pty; pty.spawn('/bin/bash')" > /tmp/asdf.py
python /tmp/asdf.py| /** | |
| * Finding sum of longest prefix-suffix strings in a string S | |
| * | |
| * A prefix string of string S is S[0..i] | |
| * A suffix string of string S is S[i..n-1] (n = S's length) | |
| * | |
| * Longest prefix-suffix of a string is max value k where | |
| * suffix[0..k-1] == prefix[0..k-1] | |
| * | |
| * @param {[string]} S [Input string] |
The code extension does not allow me to open folder with vscode from command line.
Solution: Add the following function to ~/.config/fish/config.fish
function vcode
open -a "Visual Studio Code.app" $argv
end
then using vcode $folder to open $folder
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -off -restart -agent -privs -all -allowAccessFor -allUsersSource https://blog.pivotal.io/labs/labs/enabling-os-x-screen-sharing-from-the-command-line
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>EnvironmentVariables</key> | |
| <dict> | |
| <key>PATH</key> | |
| <string>{{ INSERT_PATH_HERE }}</string> | |
| </dict> | |
| <key>Label</key> |
This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.
- Docker Machine + Docker
- curl
- A Virtualbox-driven Docker Machine called "default"
docker-machine create --driver virtualbox default(this is the default with Docker toolkit).