curl https://start.spring.io/starter.tgz \
-d type=maven-project \
-d language=java \
-d dependencies=web \
-d baseDir=maven-cloud-run | tar -xzvf -
cd maven-cloud-run/
- Go to https://console.aws.amazon.com/ .
- In a search bar > VPC
- Go to Your VPC > Create VPC
- Fill the appropriate values such as :
- Name
- IPv4 CIDR
- Number of Availability Zones (AZs)
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
# Get IE Proxy Settings | |
Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | |
# Set IE Proxy Settings | |
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyEnable -value 1 | |
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyServer -value [IPorDomain:Port] | |
# Remove IE Proxy Setings | |
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyEnable -value 0 | |
Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyServer |
Source: https://cloud.google.com/service-mesh/docs/security/egress-gateway-gke-tutorial
- Define variables
WORKING_DIRECTORY=<WORKING_DIRECTORY>
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
<?php | |
require_once "method.php"; | |
$mhs = new Mahasiswa(); | |
$request_method=$_SERVER["REQUEST_METHOD"]; | |
switch ($request_method) { | |
case 'GET': | |
if(!empty($_GET["id"])) | |
{ | |
$id=intval($_GET["id"]); | |
$mhs->get_mhs($id); |
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
<?php | |
require_once "koneksi.php"; | |
class Mahasiswa | |
{ | |
public function get_mhss() | |
{ | |
global $mysqli; | |
$query="SELECT * FROM tbl_mahasiswa"; | |
$data=array(); |
- AWS Account
- EC2 Instance/Laptop with installed tools:
a. AWS CLI
b. kubectl - the Kubernetes CLI
c. eksctl - the CLI for AWS EKS
d. helm - the package manager for Kubernetes
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
import boto3 | |
def GetInstanceRunning(): | |
client = boto3.client('ec2') | |
ec2_regions = [region['RegionName'] for region in client.describe_regions()['Regions']] | |
for region in ec2_regions: | |
ec2 = boto3.resource('ec2') | |
instances = ec2.instances.filter(Filters=[{'Name': 'instance-state-name', 'Values': ['running']}]) | |
return [instance.id for instance in instances] |
NewerOlder