Skip to content

Instantly share code, notes, and snippets.

View ejlp12's full-sized avatar

EJLP ejlp12

  • Indonesia
View GitHub Profile
@ejlp12
ejlp12 / gist:9f23c0e08639492221c5eebbdca0d37a
Created April 9, 2018 11:12 — forked from tuxfight3r/gist:51d42005694c76286e80
mirror maven repository via wget
wget -P/local/target/directory -r -nH -np --reject html http://mirrors.dotsrc.org/maven2/
wget will put a maven2 repository folder under /local/target/directory on your machine, along with all the repositories artifacts.
@ejlp12
ejlp12 / docker-cleanup-resources.md
Created April 20, 2018 06:56 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ejlp12
ejlp12 / geckodriver-install.sh
Created April 23, 2018 04:35 — forked from cgoldberg/geckodriver-install.sh
download and install latest geckodriver for linux or mac (selenium webdriver)
#!/bin/bash
# download and install latest geckodriver for linux or mac.
# required for selenium to drive a firefox browser.
install_dir="/usr/local/bin"
json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest)
if [[ $(uname) == "Darwin" ]]; then
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos"))')
elif [[ $(uname) == "Linux" ]]; then
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')
@ejlp12
ejlp12 / README.md
Created May 16, 2018 00:51 — forked from mayorova/README.md
Deploy 3scale AMP on Amazon EC2

Deploy 3scale AMP on Amazon EC2

This is an easy way to deploy a simple 3scale AMP setup using oc cluster up. Note: This should only be used for development and testing, do not ever use it in production environments.

You will need:

  • a running instance with 8GB RAM minimum (recommended 16GB) and RHEL
@ejlp12
ejlp12 / awk_netstat.sh
Created May 22, 2018 20:38 — forked from staaldraad/awk_netstat.sh
AWK to get details from /proc/net/tcp and /proc/net/udp when netstat and lsof are not available
# Gawk version
# Remote
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($3,index($3,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($3,i,2))}{print x":"strtonum("0x"substr($3,index($3,":")+1,4))}'
# Local
grep -v "rem_address" /proc/net/tcp | awk '{x=strtonum("0x"substr($2,index($2,":")-2,2)); for (i=5; i>0; i-=2) x = x"."strtonum("0x"substr($2,i,2))}{print x":"strtonum("0x"substr($2,index($2,":")+1,4))}'
# No Gawk
# Local
grep -v "rem_address" /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){
@ejlp12
ejlp12 / get_oracle_jdk_linux_x64.sh
Last active January 31, 2019 05:00 — forked from n0ts/get_oracle_jdk_x64.sh
Get latest Oracle JDK package bash shell script
#!/bin/bash
# You must accept the Oracle Binary Code License
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz
jdk_version=${1:-8}
ext=${2:-rpm}
@ejlp12
ejlp12 / bash.generate.random.alphanumeric.string.sh
Created April 11, 2019 08:29 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@ejlp12
ejlp12 / workshops.md
Created April 13, 2019 03:24 — forked from triggan/workshops.md
re:Invent 2017 - Workshop Repositories

Workshops

A list of public repositories and content from re:Invent 2017 Workshops. Some of these repos also contain the slides from teh workshops as well, but not all. Many of the links are subject to be moved or completely removed at any point in time in the future.

Session ID Session Name Repo
ABD313 Building an End-to-End Serverless Data Analytics Solution on AWS https://github.com/aws-samples/serverless-data-analytics
AMF303 Deep Dive into the Connected Vehicle Reference Architecture https://github.com/awslabs/aws-connected-vehicle-solution
ARC325 Managing Multiple AWS Accounts at Scale https://github.com/aws-samples/arc325-multiple-accounts-workshop
@ejlp12
ejlp12 / AWSDevOpsStudyNotes
Created October 3, 2019 00:09
AWS DevOps Engineer Professional Study Notes
CI & CD:
========
2 core software development processes
CI process of automating regular code commits followed by an automated build and test process designed to highlight intergration issues early.
Additional tooling and functionality provided by Bamboo, CruiseControl, Jenkins, Go and TeamCity etc.
workflow based
CD takes the form of a workflow based process which accepts a tested software build payload from a CI server. Automates the deployment into a working QA, Pre-prod or Prod environment.
AWS CodeDeploy and CodePipeline provide CI/CD services
Elasticbeanstalk and CFN provide functionality which can be utilized by CI/CD servers.