Skip to content

Instantly share code, notes, and snippets.

View ruo91's full-sized avatar

Yongbok Kim ruo91

View GitHub Profile
@ruo91
ruo91 / core-site.xml
Created January 31, 2014 02:20
Hadoop HDFS over HTTP (HttpFS) Part1
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@ruo91
ruo91 / hdfs-site.xml
Created January 31, 2014 02:23
Hadoop HDFS over HTTP (HttpFS) Part2
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@ruo91
ruo91 / httpfs-site.xml
Created January 31, 2014 02:24
Hadoop HDFS over HTTP (HttpFS) Part3
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ruo91
ruo91 / HttpFS.sh
Created January 31, 2014 02:48
Hadoop HDFS over HTTP (HttpFS) Part4
- Start Hadoop (pseudo distributed mode)
hadoop@ruo91:~$ start-all.sh
- Start HttpFS
hadoop@ruo91:~$ httpfs.sh start
Setting HTTPFS_HOME: /home/hadoop/2.2.0
Setting HTTPFS_CONFIG: /home/hadoop/2.2.0/etc/hadoop
Sourcing: /home/hadoop/2.2.0/etc/hadoop/httpfs-env.sh
setting HTTPFS_HTTP_HOSTNAME=your-cluster-hostname
Setting HTTPFS_LOG: /home/hadoop/2.2.0/logs
@ruo91
ruo91 / nginx-ex1.conf
Last active August 29, 2015 13:56
nginx.conf example1
worker_processes 4;
events {
worker_connections 1024;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
@ruo91
ruo91 / opsview-base-4.5.0.397.Makefile.patch
Created February 25, 2014 13:52
opsview-base-4.5.0.397 utf-8 patch (Makefile)
# By.ruo91 (Yongbok Kim)
--- Makefile.orig 2014-02-25 22:46:49.000000000 +0900
+++ Makefile 2014-02-25 22:43:35.000000000 +0900
@@ -611,6 +611,9 @@
cd ${NAGIOS} && patch -p1 < ../patches/nagios_host_hard_state_changes.patch
cd ${NAGIOS} && patch -p1 < ../patches/nagios_centos5_rhel5_no_output_fix.patch
cd ${NAGIOS} && patch -p1 < ../patches/nagios_avoid_swamping_log_when_killing_plugin.patch
+ # Nagios utf-8 patch
+ cd ${NAGIOS} && patch -p1 < ../patches/nagios-4.0.20130912.utf8.patch
+
@ruo91
ruo91 / nagios-4.0.20130912.utf8.patch
Last active August 29, 2015 13:56
opsview-base-4.5.0.397 utf-8 patch (nagios-4.0.20130912)
# By.ruo91 (Yongbok Kim)
--- nagios-4.0.20130912/cgi/avail.c.orig2 2014-02-25 22:28:47.574430847 +0900
+++ nagios-4.0.20130912/cgi/avail.c 2014-02-25 22:28:24.000000000 +0900
@@ -1033,7 +1033,7 @@
printf("Expires: %s\r\n", date_time);
if(output_format == HTML_OUTPUT)
- printf("Content-type: text/html\r\n\r\n");
+ printf("Content-type: text/html;charset=UTF-8\r\n\r\n");
else {
@ruo91
ruo91 / opsview-core-3.20131016.0.14175.utf8.patch
Created February 26, 2014 03:48
opsview-core-3.20131016.0.14175 utf8 patch
--- lib/Opsview/Keyword.pm.orig 2014-02-26 12:34:43.925685716 +0900
+++ lib/Opsview/Keyword.pm 2014-02-26 12:45:36.000000000 +0900
@@ -25,7 +25,7 @@
use strict;
__PACKAGE__->table( "keywords" );
-
+__PACKAGE__->utf8_columns(qw/description/);
__PACKAGE__->columns( Primary => qw/id/ );
__PACKAGE__->columns(
@ruo91
ruo91 / build_os
Last active August 29, 2015 13:56
opsview-core - build_os scripts
#!/usr/bin/perl
$os = "ubuntu12";
print $os, $/;
@ruo91
ruo91 / logstash-1.4.0-shipper.conf
Created April 22, 2014 11:43
logstash shipper - File -> Redis
input {
file {
path => "/storage/logs/www-access.json"
type => nginx
format => json
# message_format => json
# format => msgpack_event
# message_format => json_event
}
}