Skip to content

Instantly share code, notes, and snippets.

View hex108's full-sized avatar

Jun Gong hex108

  • Tencent
View GitHub Profile
@hex108
hex108 / config_and_start_hadoop.sh
Created November 27, 2014 03:40
Configure Hadoop so that we could start Hadoop in a local machine. Then it will start Hadoop which includes HDFS and Yarn.
#!/bin/bash
set -u
set -e
if [ $# -ne 1 ]; then
echo "Usage: $0 hadoop_home_directory"
echo " e.g. $0 /home/test/hadoop-2.4.1"
exit -1
fi
@hex108
hex108 / tmx.sh
Last active August 29, 2015 14:10 — forked from chenchun/.tmux.conf
#! /bin/sh
tmux attach -t chen || tmux new -s chen
@hex108
hex108 / get_ip.sh
Last active August 29, 2015 14:10
Get IP for specified host using 'http://ping.eu/ping', then write it to hosts.
#!/bin/bash
# Get IP for specified host using 'http://ping.eu/ping', then write it to hosts.
if [ $# -ne 1 ]; then
echo "Usage: $0 host"
echo " e.g. # $0 baidu.com"
exit 0
fi