For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| var mysql = require('mysql') | |
| , bcrypt = require('bcrypt') | |
| , db = { | |
| host: 'localhost', | |
| user: 'root', | |
| database: 'prod' | |
| }; | |
| function checkUser(email, password, callback) { | |
| var connection = mysql.createConnection(db); |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux
| <?php | |
| class SanitizeUrl { | |
| public static function slug($string, $space="-") { | |
| $string = utf8_encode($string); | |
| if (function_exists('iconv')) { | |
| $string = iconv('UTF-8', 'ASCII//TRANSLIT', $string); | |
| } | |
| $string = preg_replace("/[^a-zA-Z0-9 \-]/", "", $string); |
| class PortAllocatorFactoryWrapper : public PortAllocatorFactory { | |
| public: | |
| PortAllocatorFactoryWrapper(talk_base::Thread* worker_thread, int minPort, int maxPort) | |
| : PortAllocatorFactory(worker_thread), minPort_(minPort), maxPort_(maxPort) {} | |
| virtual cricket::PortAllocator *CreatePortAllocator( | |
| const std::vector<StunConfiguration> &stun, | |
| const std::vector<TurnConfiguration> &turn) override { | |
| auto allocator = PortAllocatorFactory::CreatePortAllocator(stun, turn); | |
| allocator->SetPortRange(minPort_, maxPort_); |
| client | |
| dev tun | |
| # "Allow calling of built-in executables and user-defined scripts." In other | |
| # words, this must be specified for the `up` script to be executed. | |
| script-security 2 | |
| route-nopull | |
| up vpn-up.sh | |
| down vpn-down.sh |
| # -*- mode: python -*- | |
| { | |
| "targets": [ | |
| { | |
| "include_dirs": ["<!(node -e \"require('nan')\")"], | |
| "target_name": "TimerAndPromise", | |
| "sources": [ | |
| "timer-and-promise.cc" | |
| ], | |
| "conditions": [ |