Skip to content

Instantly share code, notes, and snippets.

View vittee's full-sized avatar

Wittawas Nakkasem vittee

  • LINE BK
  • Bangkok, Thailand
  • 13:09 (UTC +07:00)
View GitHub Profile
@vittee
vittee / parser_phperror.rb
Last active May 6, 2020 10:06
Simple Fluentd Parser Plugin for parsing PHP Error.
# vim: ts=2
#
require 'fluent/parser'
module Fluent
class TextParser
class PhpErrorParser < Parser
Plugin.register_parser('phperror', self)
config_param :xdebug, :bool, :default => false
@vittee
vittee / httpd
Created November 1, 2013 09:19
Apache 2.2 Init.d script for CentOS/RHEL
#!/bin/bash
#
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache2/logs/httpd.pid
# config: /usr/local/apache2/conf/httpd.conf
@vittee
vittee / redis.sh
Created October 19, 2013 04:49
Redis init.d script for CentOS 5/6
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@vittee
vittee / svnserve.sh
Last active December 11, 2015 19:28 — forked from dexterbt1/svnserve.sh
svnserve, wrapper for svn daemon, tested with CentOS 6.3 edited to support custom installation prefix (default: /usr/local)
#!/bin/bash
#
# /etc/init.d/subversion
#
# Starts the Subversion Daemon
#
# chkconfig: 2345 90 10
# description: Subversion Daemon
public class Test {
public static void main(String[] args) {
A a = new A(5);
System.out.println(a.a);
test(a);
System.out.println(a.a);
}
public static void test(A a) {
a.a = 3 ;