Skip to content

Instantly share code, notes, and snippets.

View royingantaginting's full-sized avatar

Roy Inganta Ginting royingantaginting

View GitHub Profile
# Copyright (C) 2011 by Wayne Walker <[email protected]>
#
# Released under one of the versions of the MIT License.
#
# See LICENSE for details
_LIVE_AGENT_LIST=""
_SSH_ENV="$HOME/.ssh/environment"
_debug_print() {
#!/bin/bash
# Configure the instance to run as a Port Address Translator (PAT) to provide
# Internet connectivity to private instances.
function log { logger -t "vpc" -- $1; }
function die {
[ -n "$1" ] && log "$1"
log "Configuration of PAT failed!"
exit 1
@royingantaginting
royingantaginting / kaspay-escrow-aws-plan
Last active August 29, 2015 14:16
Kaspay escrow AWS implementation plan
Creation of Kaspay escrow production env on AWS will be automated as much as possible using Ansible.
The execution will be separate into multiple phase.
Each phase should be executed with the specified order as follow
1. VPC and all required subnets creation
2. All required Security groups creation
3. RDS subnet group creation
4. ElastiCache subnet group creation
5. NAT instance creation and setting internet gateway for private subnet to this NAT instance.
6. Gateway instance creation
7. Docker registry and its S3 instance creation
@royingantaginting
royingantaginting / security.sh
Created March 6, 2015 05:29
Shell script wrapper to interact with keychain
#!/bin/bash
#
# Tool to get and set certificates and passwords for the Jenkins JNLP Slave
#
# This tool takes the commands:
# set-password --account=ACCOUNT --service=SERVICE --password=PASSWORD
# get-password --account=ACCOUNT --service=SERVICE
# add-java-certificate --alias=ALIAS --certificate=/path/to/certificate
OSX_KEYCHAIN="login.keychain"
@royingantaginting
royingantaginting / gist:681dbc646d9766bb6769
Created January 28, 2015 10:04
Add dot deb repository
RUN echo "deb http://packages.dotdeb.org wheezy-php56 all" > /etc/apt/sources.list.d/dotdeb.list && \
curl http://www.dotdeb.org/dotdeb.gpg | apt-key add -
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<h1>Statistics</h1>
<p>Total codebase size: <xsl:value-of select="//CodebaseCost"/></p>
<p>Code to analyze: <xsl:value-of select="//TotalDuplicatesCost"/></p>
<p>Total size of duplicated fragments: <xsl:value-of select="//CodebaseCost" /></p>
@royingantaginting
royingantaginting / docker-fig.sh
Last active August 29, 2015 14:13
Install docker and fig on ubuntu
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` | sudo tee /usr/local/bin/fig >/dev/null 2>&1 && sudo chmod +x /usr/local/bin/fig
@royingantaginting
royingantaginting / docker
Created January 22, 2015 03:29
Sample fig /etc/init.d script
#!/bin/sh
cd /opt/test
start_fig(){
fig start
}
stop_fig(){
fig stop
Angga 24273
Roy 24410
# ELK Demo
Demo ELK stack dengan skenario sebagai berikut:
<!-- language: lang-none -->
-----------------------------------------
----------- ----------
| gitlist | | kibana |
----------- ----------
| ^
v |