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
| /** | |
| * ========================================== | |
| * HUMAN TYPING SIMULATION (INDONESIA) | |
| * ========================================== | |
| */ | |
| const CONFIG = { | |
| // Kecepatan Dasar (ms per karakter) | |
| baseSpeed: { min: 40, max: 90 }, | |
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
| import {Phonetic} from './phonetic'; | |
| describe('convert phone number to local number', () => { | |
| const phonetic = new Phonetic('62'); | |
| test('international code with plus', () => { | |
| expect(phonetic.localize('+628123')).toEqual('08123'); | |
| }); | |
| test('international code with plus and leading zero', () => { | |
| expect(phonetic.localize('+6208123')).toEqual('08123'); |
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/sh | |
| ### BEGIN INIT INFO | |
| # Provides: haproxy | |
| # Required-Start: $local_fs $network $remote_fs $syslog $named | |
| # Required-Stop: $local_fs $remote_fs $syslog $named | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: fast and reliable load balancing reverse proxy | |
| # Description: This file should be used to start and stop haproxy. | |
| ### END INIT INFO |
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
| var ZongJi = require('zongji'); | |
| var RETRY_TIMEOUT = 4000; | |
| function zongjiManager(dsn, options, onBinlog) { | |
| var newInst = new ZongJi(dsn, options); | |
| newInst.on('error', function(reason) { | |
| newInst.removeListener('binlog', onBinlog); | |
| setTimeout(function() { | |
| // If multiple errors happened, a new instance may have already been created |
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
| runtime: go | |
| api_version: go1 | |
| threadsafe: yes | |
| handlers: | |
| - url: /.well-known/.* | |
| script: _go_app | |
| - url: /.* | |
| script: _go_app | |
| secure: always |
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
| handlers: | |
| - url: /$ | |
| static_files: public/index.html | |
| upload: public/index.html | |
| # Handle folder urls by serving the index.html page inside. | |
| - url: /(.*)/$ | |
| static_files: public/\1/index.html |