Skip to content

Instantly share code, notes, and snippets.

View rapee's full-sized avatar
🥢
Coding with chopsticks

Rapee Suveeranont rapee

🥢
Coding with chopsticks
  • Boonmee Lab
  • Bangkok, Thailand
View GitHub Profile
@rapee
rapee / easy_proxy_server.sh
Last active August 29, 2015 13:57
Easy proxy server with Node
# Install bouncy globally
sudo npm install -g bouncy
# Create config file
echo '{"timetravel.boonmeelab.com":8000}' > bouncy_routes.json
# Start proxy server as background process
sudo bouncy bouncy_routes.json 80 &
@rapee
rapee / init.d.elasticsearch
Last active August 29, 2015 14:27
Install script to /etc/init.d/elasticsearch
#! /bin/bash
### BEGIN INIT INFO
# Provides: elasticsearch
# Required-Start: $all
# Required-Stop: $all
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Starts elasticsearch
# chkconfig: - 80 15
# Description: Elasticsearch
@rapee
rapee / slugify.js
Created July 1, 2016 09:37
Regex for multiple languages (en/th/jp)
/**
* Make slug from string.
* Support: en, th, ja
* @see https://gist.github.com/mathewbyrne/1280286
* @see http://so-zou.jp/software/tech/programming/tech/regular-expression/meta-character/variable-width-encoding.htm
* @see https://python3.wannaphong.com/2015/12/regular-expression-ภาษาไทย-และภาษาอื่น-python.html
* @return {String} Slug
*/
const whitespace_like_regex = /[\s_]+/g;
// en: a-z, A-Z, 0-9, -
@rapee
rapee / cityglide_api_doc.md
Last active October 24, 2016 07:46
CityGlide API Hack Manual
@rapee
rapee / Preferences.sublime-settings
Created October 13, 2016 03:21
Settings For Sublime Text 3
{
"bold_folder_labels": true,
"find_selected_text": true,
"font_size": 14,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"indent_guide_options":
@rapee
rapee / 0_reuse_code.js
Created March 12, 2017 15:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rapee
rapee / README.md
Created July 27, 2017 09:24 — forked from puripant/README.md
States I have visited

I lived in New York (in dark green) and have visited the green states. One rule: passing by or layover doesn't count; I have spent at least one night in these states. Major cities that I have visited are also shown as small bubbles.

Forked from

@rapee
rapee / latest.json
Last active August 4, 2017 14:30
Get latest maps from Bus Portrait
{
"data": [
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59847c5f1ad7e8ea3cade190.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59846229a5ff7ae041b8640f.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59846200a5ff7ae041b8640e.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59845f4ff05408df5208bfcf.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59845f32f05408df5208bfce.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59845f0e04940edf4771b8c3.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59845e48cbba0fde6190e35e.png",
"https://s3-ap-southeast-1.amazonaws.com/bml-may/59845e34cbba0fde6190e35d.png",
@rapee
rapee / gold.csv
Last active October 7, 2017 06:46
Practical Data Visualization
name gold
Thailand 35
Thailand 21
Thailand 38
Thailand 77
Thailand 32
Thailand 44
Thailand 47
Thailand 80
Thailand 37
@rapee
rapee / tile.stamen.js
Created October 14, 2017 10:35
Leaflet Tile Stamen
(function(exports) {
/*
* tile.stamen.js v1.3.0
*/
var SUBDOMAINS = "a. b. c. d.".split(" "),
MAKE_PROVIDER = function(layer, type, minZoom, maxZoom) {
return {
"url": ["http://{S}tile.stamen.com/", layer, "/{Z}/{X}/{Y}.", type].join(""),