This is a demo of creating the subnets needed for a GKE Cluster
This file contains hidden or 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
| #!/bin/bash | |
| # Add to instance metadata with `gcloud compute instances add-metadata \ | |
| # instance-name --metadata-from-file startup-script=idle-shutdown.sh` and reboot | |
| # NOTE: requires `bc`, eg, sudo apt-get install bc | |
| # Modified from https://stackoverflow.com/questions/30556920/how-can-i-automatically-kill-idle-gce-instances-based-on-cpu-usage | |
| threshold=0.1 | |
| count=0 | |
| wait_minutes=60 | |
| while true |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <include | |
| resource="org/springframework/boot/logging/logback/base.xml" /> | |
| <include | |
| resource="org/springframework/boot/logging/logback/defaults.xml" /> | |
| | |
| <springProperty scope="context" name="springAppName" | |
| source="spring.application.name" /> |
PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.
Here's how I combine the two, to create docs with embedded diagrams.
Get the command-line PlantUML from the download page or your relevant package manager.
This file contains hidden or 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
| // paste this file on a empty directory | |
| // npm i axios | |
| // You should go to your browser on Cookie session and get JSESSIONID and li_at from Linkedin Section | |
| const JSESSIONID = 'YOUR JSESSIONID' | |
| const liAT = 'YOUR li_at' | |
| import axios from 'axios' | |
| const headers = { |
OlderNewer