Skip to content

Instantly share code, notes, and snippets.

View tsuyo's full-sized avatar
💭
Where there is a will, there is a way

Tsuyoshi Miyake tsuyo

💭
Where there is a will, there is a way
View GitHub Profile
@tsuyo
tsuyo / aws-user-data-jdk
Last active July 22, 2024 00:25
AWS user-data for JDK installation
#!/bin/bash
# You can use this script as AWS user-data like
# $ aws ec2 run-instances [<other_params>] --user-data https://gist.githubusercontent.com/tsuyo/a6fe43549599b622c8f2331a14f795da/raw/aws-user-data-jdk
JDK_URL=http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-linux-x64.tar.gz
JDK_VER=jdk1.8.0_102
CUR_USER=${SUDO_USER:-$(tail -1 /etc/passwd | cut -d: -f1)}
installJDK() {
@tsuyo
tsuyo / ncdc.sh
Last active February 14, 2022 14:42 — forked from aligusnet/ncdc.sh
Download a weather dataset from the National Climatic Data Center (NCDC, http://www .ncdc.noaa.gov/). Prepare it for examples of "Hadoop: The Definitive Guide" book by Tom White. http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/1449311520Usage:./ncdc.sh 1901 1930 # download wheather datasets for period from 1901 to 1930.
#!/usr/bin/env bash
# global parameters
g_tmp_folder="ncdc_tmp";
g_output_folder="ncdc_data";
g_remote_host="ftp.ncdc.noaa.gov";
g_remote_path="pub/data/noaa";
@tsuyo
tsuyo / eclipse_memo.txt
Created March 3, 2016 15:06
Eclipse Memo
# keybind (for ver 4.5.0)
Window -> Preferences -> General -> Keys
Scheme: Emacs
Delete Previous: Ctrl+H
Contenst Assist: Ctrl+/
Set Mark: Ctrl+Space
Find and Replace: Ctrl+], Shift+5 (aka M-%)
@tsuyo
tsuyo / JavaC.sublime-build
Created August 2, 2012 07:00
JavaC.sublime-build to both compile & run a Java class at the same time for Sublime Text 2
{
"cmd": ["sh", "-c", "javac $file_base_name.java && java $file_base_name"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}