Skip to content

Instantly share code, notes, and snippets.

View fengchangfight's full-sized avatar

fengchang fengchangfight

View GitHub Profile
@fengchangfight
fengchangfight / test.py
Created September 2, 2017 07:24
first git test
#!/usr/bin/python
print "Hello, Python!"
@fengchangfight
fengchangfight / wordcount_mapper.py
Created September 15, 2017 07:45
wordcount_mapper.py
#!/usr/bin/env python
#the above just indicates to use python to intepret this file
# ---------------------------------------------------------------
#This mapper code will input a line of text and output <word, 1>
#
# ---------------------------------------------------------------
import sys #a python module with system functions for this OS
@fengchangfight
fengchangfight / join1_FileA.txt
Last active September 15, 2017 14:31
hadoop assignment2
able,991
about,11
burger,15
actor,22
@fengchangfight
fengchangfight / install-oraclejdk8-remove-openjdk.sh
Created November 18, 2017 03:34
remove openjdk and install oracle jdk in centos
yum list java*
sudo yum -y remove java*
java -version
cd
mkdir tmp
cd tmp
curl -u uftp:uftp ftp://192.168.2.115/path/developer/jdk-8u151-linux-x64.tar.gz -o jdk-8u151-linux-x64.tar.gz
tar zxvf jdk-8u151-linux-x64.tar.gz
sudo mv jdk1.8.0_151 /usr/share/
sudo vim /etc/profile
@fengchangfight
fengchangfight / mysqlbackup.sh
Created May 18, 2023 14:13 — forked from jeffhigham-f3/mysqlbackup.sh
Mysql Database Backup & Rotation Script
#!/bin/bash
## Author: Jeff Higham <jeff@f3code.com>, <jeffhigham@gmail.com>
## Gist: https://gist.github.com/jeffhigham-f3/3b94d508269e614f1f2e701ada8239cc
##
## Usage: mysqlbackup
##
## BEGIN EDITING
# timestamp for backups