Skip to content

Instantly share code, notes, and snippets.

View dmc-at-work's full-sized avatar

Dean Marc Co dmc-at-work

View GitHub Profile
@dmc-at-work
dmc-at-work / gist:12dd93baf32aaf5d4b2297d22ae952c0
Created January 15, 2018 14:03
Notes:Extract[Elasticsearch, Logstash, Kibana, DevOps, Fluentd, Monitoring, Logging, Data Cache, Others]:20180115
===========================================================
Java (Elasticsearch Prerequisite)
===========================================================
1. Navigate to the tmp directory
$ cd /tmp
2. Download the RPM installer
$ curl --insecure --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" -L "http://download.oracle.com/otn-pub/java/jdk/8u77-b02/jdk-8u77-linux-x64.rpm" > jdk-8u77-linux-x64.rpm
@dmc-at-work
dmc-at-work / govtech-sgcore-experiments-internal-playbook-scheduling-v1-1.yml
Last active April 10, 2018 08:33
GovTech - SGCore - Experiments - Request: Internal Playbook Scheduling - v1
# govtech-sgcore-experiments-internal-playbook-scheduling-v1-1.yml
# 2018 04 04
# 2018 04 05
# 2018 04 06
# 2018 04 10
# DMC
# To Run:
# $ ansible-playbook govtech-sgcore-experiments-internal-playbook-scheduling-v1-1.yml
---
@dmc-at-work
dmc-at-work / additional-notes.sh
Last active March 8, 2019 01:54
Clone Multiple Git Repositories
################################################################################
#
# prepend
# sed -e s#^#prefix#g file.txt > new_file.txt
# sed -i s#^#prefix#g file.txt
# append
# sed -e s#$#suffix#g file.txt > new_file.txt
# sed -i s#$#suffix#g file.txt
@dmc-at-work
dmc-at-work / resource-visualisation-cartography.md
Last active July 25, 2020 15:22
Resource Visualisation - Cartography

Resource Visualisation - Cartography

Via VM, Local Machine or Vagrant

Prerequisites

Operating System: Ubuntu 18.04

Prepare the following information

AWS Region (e.g. ap-southeast-1)
@dmc-at-work
dmc-at-work / multi-git-pull.sh
Created April 5, 2019 07:33
Multi-Repo Git Pull
#!/bin/bash
#
#
#
#
# for f in * ; do
# if [ -d "$f" ] ; then
@dmc-at-work
dmc-at-work / circleci_config_sample.yml
Last active April 8, 2019 07:21
CircleCI | Config | Sample | 00000
# config.yml
version: 2
jobs:
build:
docker:
- image: xxx/yyy:zzz
- image: aaa/bbb:ccc
# environment:
# HERE: CAN
# environment:
curl \
--header "Content-Type: application/json" \
--data '{"": {"":"", "":""}}' \
--request POST \
https://domain/api
@dmc-at-work
dmc-at-work / resource-visualisation-cartography-temp-20190412.md
Last active April 12, 2019 09:34
Resource Visualisation - Cartography - temp-20190412

Resource Visualisation - Cartography

Via VM, Local Machine or Vagrant

Prerequisites

Operating System: Ubuntu 18.04

Prepare the following information

AWS Region (e.g. ap-southeast-1)

1.0. Cloud Computing

1.1. Compute

1.1.1.	Compute Engine
1.1.2.	App Engine
1.1.3.	Kubernetes Engine
1.1.4.	Cloud Functions

1.2. Databases

1.2.1.	Cloud SQL
1.2.2.	Cloud Bigtable

1.2.3. Cloud Spanner

@dmc-at-work
dmc-at-work / azure_vnets_subnets.ps1
Last active August 20, 2019 08:24
Azure | List | Subscription(s) + VNet(s) + Subnet(s)
$Subs = Get-AzureRmSubscription
foreach ($Sub in $Subs) {
$SelectSub = Select-AzureRmSubscription -SubscriptionName $Sub.Name
$VNETs = Get-AzureRmVirtualNetwork
foreach ($VNET in $VNETs) {
#$Sub.Name
#$VNET.Name
#$VNET.AddressSpace.AddressPrefixes
Write-Host "$($Sub.Name),$($VNET.Name),$($VNET.AddressSpace.AddressPrefixes)"
}