Skip to content

Instantly share code, notes, and snippets.

View excelwang's full-sized avatar
🎯
Focusing

Huajin Wang excelwang

🎯
Focusing
  • Computer Network Information Center, Chinese Academy of Sciences
View GitHub Profile
@excelwang
excelwang / ntfs
Last active January 8, 2017 13:31
Re-mount the latest attached NTFS disk on macOS manually: 1) Put it into a Spotlight searchable folder, 2) attribute it executable, and 3) call it using Spotlight when you need to write to the latest attached NTFS disk.
#!/bin/bash
dev=`df|tail -1`
volume=`echo ${dev##*% }|sed 's/\ /\\\ /g'`
dev=${dev%% *}
diskutil info $dev|grep NTFS>/dev/null
if [ $? -ne 0 ] ; then
echo "Latest mounted disk ($volume) is not a NTFS device!"
echo "Press Return button to exit!"
read
else
@airawat
airawat / 00-CreatingSequenceFile
Last active March 19, 2019 18:35
Hadoop Sequence File - Sample program to create a sequence file (compressed and uncompressed) from a text file, and another to read the sequence file.
This gist demonstrates how to create a sequence file (compressed and uncompressed), from a text file.
Includes:
---------
1. Input data and script download
2. Input data-review
3. Data load commands
4. Mapper code
5. Driver code to create the sequence file out of a text file in HDFS
6. Command to run Java program