Skip to content

Instantly share code, notes, and snippets.

View first087's full-sized avatar

Artit Kiuwilai first087

View GitHub Profile
@first087
first087 / WebLogFrequencyDistributionProcessor.java
Last active September 4, 2015 02:05
Hadoop Training (Hadoop 2) - Day 2
package analysis;
import java.io.IOException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapred.*;
@first087
first087 / nexus-ota-updates-2016-01-01.md
Created February 3, 2016 02:11 — forked from jduck/nexus-ota-updates-2016-01-01.md
January 2016 Nexus OTA Updates - Security Level 2016-01-01
@first087
first087 / nexus-ota-updates-2016-02-01.md
Created February 9, 2016 01:54 — forked from jduck/nexus-ota-updates-2016-02-01.md
February 2016 Nexus OTA Updates - Security Level 2016-02-01
@first087
first087 / VSCode v1.0.0 Bug Report.mp4
Last active April 14, 2016 21:20
VSCode v1.0.0 Bug Report
@first087
first087 / GitLab-reCAPTCHA-http.png
Last active April 19, 2016 04:43
GitLab vs reCAPTCHA
GitLab-reCAPTCHA-http.png
@first087
first087 / README.md
Created December 29, 2016 02:21
Script for attach drive D: into Docker Toolbox for Windows

How to use script

  1. Run Docker Toolbox from shortcut Docker Quickstart Terminal
  2. Shutdown boot2docker docker-machine stop
  3. Open VirtualBox and goto Settings of default machine
  4. At Shared Folders menu, click + icon, Select folder path to drive D: and set folder name is d, checked all options
  5. Copy attach-drive-d.sh script to Docker Toolbox folder (C:\Program Files\Docker Toolbox)
  6. Edit start.sh add command sh attach-drive-d.sh before finalize step
  7. Run Docker Toolbox from shortcut Docker Quickstart Terminal again
  8. Have fun!!!
Enterprise: NJVYC-BMHX2-G77MM-4XJMR-6Q8QF
Professional: KBJFW-NXHK6-W4WJM-CRMQB-G3CDH
Keys are generic ones. These are the same from MSDN account.
Product Key : -6Q8QF
Validity : Valid
Product ID : 00369-90000-00000-AA703
Advanced ID : XXXXX-03699-000-000000-00-1032-9200.0000-0672017
@first087
first087 / thai2arabic.js
Last active May 26, 2018 02:14
Convert thai number to arabic
const src = `
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
๑๒๓๔๕๖๗๘๙๐
@first087
first087 / MathCalc.kt
Last active August 22, 2019 04:21
โจทย์เลข ป.4
fun calc() {
val ans = mutableListOf<Double>()
do {
val random8 = mutableListOf<Int>()
for (i in 1..8) {
random8.add(Random.nextInt(0, 9 + 1))
}
fun charToRandomNumber(ch: Char) = random8[ch.toByte() - 65]
fun transformDigit(digit: Int, ch: Char) = 10.0.pow(digit - 1) * charToRandomNumber(ch)