Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| # Install brew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| # Install composer | |
| brew install homebrew/php/composer | |
| ### PHPCS | |
| composer global require "squizlabs/php_codesniffer=*" | |
| # Add to your .bash_profile |
| # Stop all containers | |
| docker stop `docker ps -qa` | |
| # Remove all containers | |
| docker rm `docker ps -qa` | |
| # Remove all images | |
| docker rmi -f `docker images -qa ` | |
| # Remove all volumes |
| diff -Naur before/usr/share/google/set-hostname after/usr/share/google/set-hostname | |
| --- before/usr/share/google/set-hostname 2016-03-16 18:30:48.000000000 +0900 | |
| +++ after/usr/share/google/set-hostname 2016-03-16 18:34:57.000000000 +0900 | |
| @@ -14,6 +14,9 @@ | |
| # Deal with a new hostname assignment. | |
| +# *** The below line is added by patching. *** | |
| +new_host_name=$(curl --fail --silent http://metadata/computeMetadata/v1/instance/attributes/hostname -H "Metadata-Flavor: Google") | |
| + |
| Work around GCE LB issue by setting service session affinity by adding: | |
| "sessionAffinity": "ClientIP" | |
| to the service spec. This will give you sticky sessions, but will get GCE external LB services again. |
| // Actual gzipping from https://github.com/1024jp/NSData-GZIP | |
| // Example: ParameterEncoding.JSON.gzipped | |
| infix operator • { associativity left } | |
| func • <A, B, C>(f: B -> C, g: A -> B) -> A -> C { | |
| return { x in f(g(x)) } | |
| } | |
| extension ParameterEncoding { |