As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # install watchdog | |
| pip install watchdog | |
| # run this command | |
| watchmedo shell-command --patterns="*.js;" --recursive --command='bash -c "if [ ${watch_event_type} == "modified" ]; then echo "updating..." && cp ${watch_src_path} /c/temp && echo "done"; fi"' ./ |
| # /bin/sh | |
| # Copy VM from another project | |
| set -e | |
| # set variables | |
| SOURCE_PROJECT=source-178410 | |
| SOURCE_ACCOUNT=source-user@example.com | |
| SOURCE_REGION=europe-west3 |
| #cloud-config | |
| write_files: | |
| - path: /var/nginx.conf | |
| permissions: 0644 | |
| owner: root | |
| content: | | |
| user nginx; | |
| worker_processes 1; | |
| error_log /var/log/nginx/error.log warn; |
| #!/bin/bash | |
| set -e | |
| # variable | |
| INSTANCE_NAME=ps-media | |
| ZONE=europe-west3-c | |
| # delete the forwarding-rule aka frontend | |
| gcloud -q compute forwarding-rules delete $INSTANCE_NAME-forwarding-rule --global |
| # export to environemtn git current brahc | |
| alias git_branch='export GIT_BRANCH=$(git branch | grep \* | cut -d " " -f2)' | |
| #!/bin/bash | |
| set -e | |
| #variables | |
| INSTANCE_NAME=ps-media | |
| ZONE=europe-west3-c | |
| MEDIA_SERVER_NAME=cdn.example.com | |
| # create the proxy-vm | |
| gcloud compute instances create-with-container $INSTANCE_NAME-vm \ |
| #! /bin/bash | |
| cat <<EOF > /var/nginx.conf | |
| user nginx; | |
| worker_processes 1; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { |
| #!/bin/bash | |
| set -e | |
| # variable | |
| INSTANCE_NAME=ps-media | |
| ZONE=europe-west3-c | |
| # delete the forwarding-rule aka frontend | |
| gcloud -q compute forwarding-rules delete $INSTANCE_NAME-forwarding-rule --global |
| #!/bin/bash | |
| set -e | |
| INSTANCE_NAME=ps-media | |
| ZONE=europe-west3-c | |
| PRESTASHOP_WEBSITE=http://www.example.com | |
| MEDIA_SERVER_NAME=cdn.example.com | |
| # download vm-stratup-script.sh | |
| curl https://gist.githubusercontent.com/gabihodoroaga/43731b8ad9c63f3fe54913acff5e79c2/raw \ |