Skip to content

Instantly share code, notes, and snippets.

View mildronize's full-sized avatar

Thada Wangthammang mildronize

View GitHub Profile
@mildronize
mildronize / .vimrc
Last active August 25, 2024 01:13
Minimal .vimrc for ACM-ICPC
set nocompatible " use vim, not vi api
syntax on " enable syntax processing
set number " show line numbers
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set autoindent " Indent at the same level of the previous line
set smartindent " If you wnat to paste in INSERT MODE, press `F5` (PASTE toggle)
@mildronize
mildronize / auto_sync_to_remote.bat
Created February 13, 2017 10:30
[Windows] Auto upload files changed to remote host
:: Name: auto_sync_to_remote.bat
:: Purpose: Auto upload files changed to remote host without removing any remote files
:: Author: Thada Wangthammang <[email protected]>
:: Revision: 2017/02/13 Initial version
:: Ref: http://steve-jansen.github.io/guides/windows-batch-scripting/part-10-advanced-tricks.html
:: http://schier.co/blog/2013/03/13/start-virtualbox-vm-in-headless-mode.html
:: Prerequisite
:: - `Winscp`
@mildronize
mildronize / Readme.md
Last active December 18, 2017 16:02
Docker Cmder Alias - setup docker environment if the docker machine is started
@mildronize
mildronize / GitCommitEmoji.md
Created July 6, 2018 05:09 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@mildronize
mildronize / Readme.md
Created July 20, 2018 06:42
Workflow | Publish Bear note to markdown on iOS
@mildronize
mildronize / Technukrom.md
Last active September 11, 2018 17:30
Technukrom Road map & Todo

ภาพรวม

โปรเจ็คมี 2 ส่วน

  1. Frontend: Technukrom
  2. Background Service: ตัวดึงข้อมูล feed data-crawler

Frontend stacks:

  • Web: Next.js (React)
@mildronize
mildronize / d3-force-graph.html
Created November 6, 2019 17:16
d3-force-graph.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js" > </script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<style>
body {
overflow:hidden;
@mildronize
mildronize / logger.ts
Created October 27, 2020 06:43
Example for using Winston Logger ( Modify from https://github.com/danielfsousa/express-rest-boilerplate)
const winston = require('winston');
const { format } = winston;
const formatConsole = format.printf(( { message, level, timestamp }: any ) => {
return `${timestamp} ${level}: ${message}`;
});
const formatFile = format.printf(( { message, level, timestamp }: any ) => {
return JSON.stringify({ message, level, timestamp });
});
@mildronize
mildronize / instance-loader.ts
Created November 2, 2020 16:36
Creating TypeScript Classes Dynamically - Totally based on Steve Fenton solution (Type Safe)
// Credit
// https://www.stevefenton.co.uk/2014/07/creating-typescript-classes-dynamically
// https://gist.github.com/mfdeveloper/c337408608d6033fde967fc2e76b12c4
interface ObjectKeyString {
[key: string]: any;
}
class InstanceLoader {
@mildronize
mildronize / ReflectiveInjector.ts
Last active November 6, 2020 03:38
Example usage of ReflectiveInjector in `injection-js` ( Angular 4 API) read more: https://v4.angular.io/api/core/ReflectiveInjector ( @Injectable should separate file)
import 'reflect-metadata';
import { ReflectiveInjector, Injectable, Injector } from 'injection-js';
class Service {
get() {
return "my service";
}
}
class Service2 {