Skip to content

Instantly share code, notes, and snippets.

View amura2406's full-sized avatar

Angga Muhammad amura2406

View GitHub Profile
@amura2406
amura2406 / tips.md
Last active August 15, 2017 06:13
Some Useful SSH Command

SSH Tunnel

ssh -A -t userone@hostone ssh -A -t -p<port2> usertwo@hosttwo

Local Port Forwarding to 2 servers

ssh userone@hostone -L :hosttwo: -f -N
@amura2406
amura2406 / logstash.conf
Created April 12, 2017 11:44
Sample logstash.conf
input {
beats {
port => "5555"
}
}
filter {
if [source_type] == "access" {
grok {
patterns_dir => [ "/home/user/logstash/patterns"]
@amura2406
amura2406 / filebeat.yml
Created April 12, 2017 11:42
Sample Filebeat.yml
filebeat:
prospectors:
-
paths:
- /var/log/nginx/access.log
fields:
app_id: api_1
source_type: "access"
fields_under_root: true
-
@amura2406
amura2406 / SSHConfigMac.md
Created February 12, 2017 18:16
Save ssh access on Mac Terminal

Create or Open SSH Config File

It is located on ~/.ssh/config

Edit it as follows

Host ahaa-api
HostName ahaa-api
User ahaamobile
@amura2406
amura2406 / HostnameOnMac.md
Last active February 12, 2017 18:13
Save Hostname on Mac

Edit hosts File

Open /etc/hosts

Edit and add your custom hostname like the following

##
# Host Database
#
@amura2406
amura2406 / IntallPerconaOSX.md
Last active June 13, 2019 03:05
Steb-by-Step to Install Percona Server (Alternative to MySQL) on Mac OS X 10.11.6 (El Capitan)

Install percona-server.

Install from homebrew

brew install percona-server

chown /usr/local

sudo chown -R <username> /usr/local
@amura2406
amura2406 / MigrateSVNtoGIT.md
Created August 23, 2016 07:58
Tutorial to migrate from SVN to Git

Install svn2git.

On all systems you can install as a Ruby gem if you already have Ruby and Git installed.

sudo gem install svn2git

Checkout SVN Repo

Checkout the latest SVN Repository of the project you want to convert.

svn co --username <your_name> https://svn.server.com/repository/trunk
@amura2406
amura2406 / ApacheThriftInstall.md
Last active July 26, 2018 11:07
Install Apache Thrift on Mac OS X 10.11.6 (El Capitan)

Install Boost

Download boost library from here, untar compile with

./bootstrap.sh
sudo ./b2 threading=multi address-model=64 variant=release stage install

Install libevent

Official Way