Skip to content

Instantly share code, notes, and snippets.

View haiy's full-sized avatar

hai haiy

View GitHub Profile
@haiy
haiy / java code style check
Created December 2, 2014 07:30
mvn checkStyle
1. java style check
http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-checker-config.html
http://stackoverflow.com/questions/12180765/maven-check-style-as-a-part-of-the-build
find . -type f -print | xargs grep "some string"
@haiy
haiy / yarn-spark Test
Created October 28, 2014 06:16
yarn spark test
1 清理日志
j log
cd $SPARK_HOME &&spark-submit --class org.apache.spark.examples.SparkPi \
--master yarn-cluster \
--num-executors 3 \
--driver-memory 4g \
--executor-memory 2g \
--executor-cores 1 \
lib/spark-examples*.jar \
1sudo apt-get install compiz meta
2 metacity --replace &
3 /etc/profile
4 fcitx
sudo add-apt-repository ppa:fcitx-team/nightly
sudo apt-get update
sudo apt-get install fcitx-sogoupinyin
mirrors.aliyun.com/deepin/pool/non-free/f/fcitx-sogoupinyin-release/
fcitx-light-UI
@haiy
haiy / .ctags
Last active August 29, 2015 14:08 — forked from hdeshev/.ctags
1.将下面文件导入 ~/.ctags
--langdef=scala
--langmap=scala:.scala
--regex-scala=/^[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\1/c,classes/
--regex-scala=/.*trait[ \t]+([a-zA-Z0-9_]+)/\1/t,traits/
--regex-scala=/^[ \t]*sealed[ \t]+trait[ \t]+([a-zA-Z0-9_]+)/\1/t,sealed traits/
--regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/
--regex-scala=/^[ \t]*def[ \t]+([a-zA-Z0-9_]+)/\1/m,methods/
--regex-scala=/^[ \t]*private def[ \t]+([a-zA-Z0-9_]+)/\1/m,methods/
#!/bin/bash
log=/alidata1/data/hdfs/nodemanager_log
rsync -avc root@ZERONE-01:/alidata1/data/hdfs/nodemanager_log/ $log
current_dir=`pwd`
origin_log_dir=/alidata1/data/hdfs/nodemanager_log
cd $origin_log_dir
target_dir=`ls -t | head -n 1`
cd $origin_log_dir/$target_dir