Skip to content

Instantly share code, notes, and snippets.

View cooniur's full-sized avatar

Tongliang Liu cooniur

  • Netflix
  • Mountain View, CA
View GitHub Profile
@cooniur
cooniur / logstash.conf
Created June 6, 2015 08:28
Logstash + SpringBoot + Logback
input {
file {
path => [ "/etc/myapp/myapp.log" ]
}
}
filter {
multiline {
pattern => "^(%{LOGBACK_TIMESTAMP})"
patterns_dir => "/etc/logstash/grok/patterns"
@cooniur
cooniur / bulk-indexing-optimization
Last active August 29, 2015 14:19
ES Optimization
# Optimization for re-indexing
These settings can be turned on/off to increase performance when doing re-indexing of existing large dataset
### Disable refresh while re-indexing `page 161`
You can turn off automatic refreshes while you are building a big new index, and then turn them back on when you start using the index in production:
Before re-indexing:
POST /my_logs/_settings
ProxyPass /data http://localhost:8080/clinicaldata timeout=1800
ProxyPassReverse /data http://localhost:8080/clinicaldata
@cooniur
cooniur / .inputrc
Created April 23, 2015 00:38
Linux/Mac: ~/.inputsrc
# Make Tab autocomplete regardless of filename case
set completion-ignore-case on
# List all matches in case multiple possible completions are possible
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting symlinks to directories
set mark-symlinked-directories on
@cooniur
cooniur / ansible-ec2-module-output
Created April 20, 2015 21:43
Ansible EC2 module output
{
"changed": true,
"instance_ids": [
"i-1a2b3c4d"
],
"instances": [
{
"ami_launch_index": "0",
"architecture": "x86_64",
"dns_name": "",
@cooniur
cooniur / ansible-datetime 1.9.4
Last active March 22, 2016 00:20
Ansible Datetime
{
"ansible_date_time": {
"date": "2015-04-20",
"day": "20",
"epoch": "1429565280",
"hour": "14",
"iso8601": "2015-04-20T21:28:00Z",
"iso8601_micro": "2015-04-20T21:28:00.106961Z",
"minute": "28",
"month": "04",
#!/bin/bash
#
# chkconfig: 2345 95 20
# description: Tomcat 8 start/stop/status init.d script
# processname: tomcat
#
# Tomcat 8 start/stop/status init.d script
#
# Updates:
# @author: Tongliang Liu <[email protected]>