Skip to content

Instantly share code, notes, and snippets.

View amuhra's full-sized avatar

Angga Muhammad amuhra

View GitHub Profile
@amuhra
amuhra / 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
@amuhra
amuhra / 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"]
@amuhra
amuhra / 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
-
@amuhra
amuhra / 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
@amuhra
amuhra / 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
#
@amuhra
amuhra / 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
@amuhra
amuhra / 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
@amuhra
amuhra / 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