I hereby claim:
- I am daothanh on github.
- I am thanhdx (https://keybase.io/thanhdx) on keybase.
- I have a public key whose fingerprint is 659D 608F D706 6578 FF16 24E4 AA35 24E7 A1A3 A23E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function signalEventHandler(event) { | |
if (event.type == "signal:begincall") { | |
//***************************Call Begin*********************************// | |
data = event.data.streamId.toString().split('|'); | |
_streamId = data[0]; | |
_name = data[1]; | |
state = 'begincall'; | |
hide('btn_'+_streamId); | |
//document.getElementById('acceptCallBox').style.display = 'block'; | |
//document.getElementById('acceptCallLabel').innerHTML = 'Có cuộc gọi đến từ ' + _name; |
//Gui signal begin call | |
session.signal({ | |
type: "begincall", | |
to: _stream.connection, | |
data: { | |
streamId: _selfstream.streamId + "|" + _selfstream.name | |
} | |
}, function(error) { | |
if (error) { | |
console.log("signal error: " + error.reason); |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(.*)$ public/$1 [L] | |
</IfModule> |
[ | |
{ | |
"button": "button1", | |
"count": 1, | |
"modifiers": ["ctrl"], | |
"press_command": "drag_select", | |
"command": "goto_definition" | |
} | |
] |
PHP handling on apache is done via modules of one sort or another, and running multiple version is problematic on a single instance. The solution is to run two instances of apache on the same machine. This allows one instance to run PHP 7 (the default on 16.04), and another can run PHP 5. Since normal http/https is on ports 80 and 443, the second instance will run on ports 81 and 444. Since it is running on the same machine, all file system and database access is the exact same.
All the commands herein have to be run as root, or with sudo
prefixed to the command.
Read /usr/share/doc/apache2/README.multiple-instances
Run sh ./setup-instance php5
from /usr/share/doc/apache2/examples
, where php5
is the suffix for the second site; all commands for the second site will have that suffix. This will keep all of the same configuration for all sites on the new instance, including SSL certif
# Install a Webserver | |
apt-get -y install apache2 | |
# Target docroot to /home/satis/web/ | |
# Install PHP5 CLI and needed programs. | |
apt-get -y install php5-cli php5-curl php5-json git wget | |
# Add a specifix user for our task | |
adduser satis |
function buildUrl(url, parameters){ | |
var query = window.location.search.substring(1), vars = query.split('&'), qs = ""; | |
if (vars.length) { | |
for(var j in vars) { | |
if (vars[j] !== "") { | |
var value = vars[j].split("="); | |
if (parameters.hasOwnProperty(value[0]) === false) { | |
parameters[value[0]] = value[1]; | |
} | |
} |
{ | |
"aps":{ | |
"senderName":"Ph\u00f2ng kh\u00e1m EasyCar", | |
"alert":"C\u00f3 cu\u1ed9c g\u1ecdi \u0111\u1ebfn t\u1eeb Ph\u00f2ng kh\u00e1m EasyCare", | |
"sound":"default", | |
"content-available":"1" | |
}, | |
"pushData":{ | |
"room":"je", | |
"token":"T1==cGFydG5lcl9pZD00NjA0NzAxMiZzaWc9NjQxNDYyMWRjNDk2ODYyMzUyZjc0ZDIxOWE1N2ExOTEzNGFiMmE3NjpzZXNzaW9uX2lkPTJfTVg0ME5qQTBOekF4TW41LU1UVXlNRGt6TVRZME5EZ3dOWDQxVFdodU9VVllSM2N6WVhGd2NsbGxOWEZuUVM5UWRqUi1VSDQmY3JlYXRlX3RpbWU9MTUyMDkzMTY0NCZyb2xlPXB1Ymxpc2hlciZub25jZT0xNTIwOTMxNjQ0Ljg3NzgxMTYwNDE0OTU5JmV4cGlyZV90aW1lPTE1MjA5NDYwNDM=", |