mkdir chromium && cd chromium
fetch --nohooks chromium --nosvn=True
gclient sync --with_branch_heads --nohooks # May not even need this.
This file contains 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
# -*- mode: python -*- | |
{ | |
"targets": [ | |
{ | |
"include_dirs": ["<!(node -e \"require('nan')\")"], | |
"target_name": "TimerAndPromise", | |
"sources": [ | |
"timer-and-promise.cc" | |
], | |
"conditions": [ |
This file contains 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
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 |
This file contains 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
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_); |
This file contains 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
<?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); |
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
This file contains 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 mysql = require('mysql') | |
, bcrypt = require('bcrypt') | |
, db = { | |
host: 'localhost', | |
user: 'root', | |
database: 'prod' | |
}; | |
function checkUser(email, password, callback) { | |
var connection = mysql.createConnection(db); |