This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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, - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 & |
NewerOlder