This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
# source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# set DBUS for ssh connection | |
eval `dbus-launch --auto-syntax` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agent.sources = s1 | |
agent.sinks = k1 | |
agent.channels = c1 | |
# Flume proxy option needs the FLUME-2618 patch | |
agent.sources.s1.http.proxyHost=<http proxy ip address> | |
agent.sources.s1.http.proxyPort=<http proxy port> | |
# To use TwitterUserStreamToJSONSource, check the following java program. | |
# https://github.com/priancho/flume/blob/trunk/flume-ng-sources/flume-twitter-source/src/main/java/org/apache/flume/source/twitter/TwitterUserStreamToJSONSource.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- encoding: utf-8 -*- | |
# | |
# | |
# log shortener for Hadoop logs | |
# | |
# History: | |
# 2015/12/04,hancheol.cho - Simple rule-based (1:1) log shortening algorithm | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
# -*- coding: utf-8 -*- | |
require 'cgi' | |
require 'nkf' | |
def normalize_text(t) | |
# Decode HTML tags in Tweet | |
# > http://www.xmisao.com/2014/03/09/how-to-encode-decode-html-entities-in-ruby.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################### | |
### Reference Web-pages ### | |
########################### | |
# | |
# Best reference: | |
# https://gist.github.com/MohamedAlaa/2961058 | |
# http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily | |
# https://gist.github.com/spicycode/1229612 | |
# | |
# Pre-requisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Install Vim > 7.4.1578+ for YouCompleteMe | |
" $ sudo curl -L https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo -o /etc/yum.repos.d/mcepl-vim8-epel-7.repo | |
" $ sudo yum update vim* | |
" Install from source if you use CentOS 6.x | |
" $ git clone https://github.com/vim/vim.git | |
" $ cd vim | |
" $ ./configure --prefix=/usr --with-features=huge --enable-rubyinterp --enable-pythoninterp | |
" $ make; sudo make install | |
" | |
" Install Python 2.7 or > 3.4 for YouCompleteMe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
class MyPrettyPrinter(pprint.PrettyPrinter): | |
"""PrettyPrint with UTF-8 text. | |
Refer to: http://stackoverflow.com/questions/10883399/unable-to-encode-decode-pprint-output | |
""" | |
def format(self, object, context, maxlevels, level): | |
if isinstance(object, unicode): | |
return (object.encode('utf8'), True, False) | |
return pprint.PrettyPrinter.format(self, object, context, maxlevels, level) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -----------------------# | |
# ----- References ----- # | |
# -----------------------# | |
# | |
# * Options for Galera cluster | |
# ------------------------------------------ | |
# https://mariadb.com/kb/en/mariadb/galera-cluster/ | |
# http://galeracluster.com/documentation-webpages/index.html | |
# https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mariadb-10-1-on-ubuntu-16-04-servers | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use file:///my/absolute/path/to/log4j.proerties or file:my/relative/path/to/log4j.properties | |
spark-submit \ | |
--driver-java-options "-Dlog4j.configuration=file:conf/log4j.properties" \ | |
--files conf/log4j.properties \ | |
--conf "spark.executor.extraJavaOptions='-Dlog4j.configuration=log4j.properties'" \ | |
... | |
OlderNewer