vm_name=
gcloud compute instances create \
"${vm_name}" --zone asia-northeast1-c \
--image-project=ubuntu-os-cloud --image-family=ubuntu-2004-lts \
--machine-type "n1-custom-14-36864" --boot-disk-size 300G --boot-disk-type pd-standard \
This file contains 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
#!/usr/bin/env python3 | |
# encoding: utf-8 | |
# | |
# Copyright (c) 2013 <deanishe@deanishe.net>. | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2013-11-01 | |
# |
This file contains 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
gcloud compute firewall-rules create rule-allow-tcp-8080 --source-ranges 0.0.0.0/0 --target-tags allow-tcp-8080 --allow tcp:8080 | |
gcloud compute instances create-with-container vscode \ | |
--zone us-east1-b \ | |
--container-stdin \ | |
--container-tty \ | |
--container-mount-host-path=mount-path=/home/coder/project,host-path=/mnt/disks/data,mode=rw \ | |
--container-image=codercom/code-server:latest \ | |
--machine-type=f1-micro \ | |
--metadata=^:^startup-script='#! /bin/bash |
This file contains 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
gsutil notification create \ | |
-t pubsup-topic-h8Iqlb8Ixc4IltuOoY5QC-IKYw9Yu7l88fmXLfA5Qsr -f json \ | |
-e OBJECT_FINALIZE \ | |
-p h8Iqlb8Ixc4IltuOoY5QC/IKYw9Yu7l88fmXLfA5Qsr/ gs://mongodb_daily_backup |
Stopping All Containers
$ docker stop $(docker ps -a -q)
Removing All Containers
$ docker rm $(docker ps -a -q)
This file contains 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
# Edit this file to introduce tasks to be run by cron. | |
# | |
# Each task to run has to be defined through a single line | |
# indicating with different fields when the task will be run | |
# and what command to run for the task | |
# | |
# To define the time you can provide concrete values for | |
# minute (m), hour (h), day of month (dom), month (mon), | |
# and day of week (dow) or use '*' in these fields (for 'any').# | |
# Notice that tasks will be started based on the cron's system |