Skip to content

Instantly share code, notes, and snippets.


Thai Pangsakulyanont dtinth

  • Taskworld; Labs
  • Krungthepmahanakhonamonrattanakosinmahintharayutthayamahadilokphopnoppharatratchathaniburiromudomratchaniwetmahasathanamonphimanawatansathitsakkathattiyawitsanukamprasit (Bangkok), Thailand
Block or report user

Report or block dtinth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dfs-bfs.c
#include <stdio.h>
#include <stdlib.h>
#define NUM_VERTEX 10
struct Vertex {
char name;
int mark;
struct Node* list;
dtinth /
Last active Oct 13, 2019
Batch File Rename Script

Batch File Rename

Use JavaScript for Automation to rename files in batch!


dtinth / .gitignore
Last active Sep 26, 2019
Live coding 2019-09-25 — brute forcing AunJessada’s upcoming song title
View bms_sound_process.rb
file_list = Dir['original/*.wav']
file_list.each_with_index do |original_wav, index|
basename = File.basename(original_wav)
target_wav = "processed/#{basename}"
gain = case basename
when /^piano/; 4
else; 0
puts "[#{index + 1}/#{file_list.length}] #{basename} (#{gain})"
system "sox", original_wav, target_wav, "gain", "#{gain}" or raise "Cannot convert"
dtinth /
Created Aug 13, 2019
Transcribing Thai YouTube video using Google Cloud

How to transcribe Thai speech in videos into text.


View Hangman.ts
import * as Immutable from 'immutable'
import * as rxjs from 'rxjs'
import { scan, startWith, map } from 'rxjs/operators'
export function reactiveHangman(
secretWord: string,
letters: rxjs.Observable<string>
): rxjs.Observable<Output> {
const initialState = initialize(secretWord)
return letters.pipe(
dtinth / cut.js
Created Jun 28, 2019
Thai word cut in Chrome
View cut.js
// Note: Using non-standard V8 feature
// The standard is now Intl.Segmenter but no browser implements it yet.
function cut(text) {
const iterator = new Intl.v8BreakIterator(["th"]);
const result = [];
let pos = iterator.first();
dtinth / thai.php
Created Nov 26, 2010
Utility function to fix floating tone marks when outputting as PDF.
View thai.php
function thai($x) {
$back = array(
"\xE0\xB9\x88" => "\xEF\x9C\x85",
"\xE0\xB9\x89" => "\xEF\x9C\x86",
"\xE0\xB9\x8A" => "\xEF\x9C\x87",
"\xE0\xB9\x8B" => "\xEF\x9C\x88",
"\xE0\xB9\x8C" => "\xEF\x9C\x89"
View index.ts
import * as functions from 'firebase-functions'
import * as admin from 'firebase-admin'
import 'firebase-functions'
import express from 'express'
import { middleware, Client } from '@line/bot-sdk'
export const bot = functions.https.onRequest((req, res) => {
const config = {
channelAccessToken: functions.config(),
channelSecret: functions.config()
dtinth /
Last active May 28, 2018
ISO 29110 Lecture

ISO 29910 Lecture

This lecture note is taken from Workgroup Software Development Process course...

PDCA Cycle

  • Plan, do, check, act.
You can’t perform that action at this time.