Skip to content

Instantly share code, notes, and snippets.

View anovikov1984's full-sized avatar

anovikov1984

  • Limassol, Cyprus
  • 20:51 (UTC +03:00)
View GitHub Profile
A telephony to JSSIP gateway.
A Node.js based server serving a single HTTPS web page that provides bidirectional web calling (audio only). A single HTTP parameter to the page (id) identifies the user.
There is no authentication or storage for user accounts. User may open a page with any non-negative, numerical id, a user opening a page with negative, duplicating (two identical at same time), or non-numerical id MAY result in unspecified behavior.
Javascript in page MUST be compatible with the reasonably recent Google Chrome browser. Need not be compatible with any other browser.
HTTPS certificate for the page MAY be stored locally as part of delivery, provision or maintenance of certificate is not a part of scope. Just one received manually from letseencrypt is acceptable.
When a page with a given ID is opened somewhere by the user, say
```https://example.com?id=1001```
[[14:01:33.090]] [LOG] trace { direction: 'out',
info: { ssrc: 1293561603 },
timestamp: 22059947189,
type: 'pli' }
[[14:01:33.198]] [LOG] trace { direction: 'in',
info:
{ isKeyFrame: true,
marker: 'false',
payloadSize: 1146,
payloadType: 96,
[[13:12:16.651]] [LOG] trace { direction: 'out',
info: { ssrc: 1366638920 },
timestamp: 22056990756,
type: 'pli' }
[[13:12:16.743]] [LOG] trace { direction: 'in',
info:
{ isKeyFrame: true,
marker: 'false',
payloadSize: 1133,
payloadType: 96,
{
"options": {
"basicWidth": 1280,
"basicHeight": 720,
"frameRate": 30,
"path": "/tmp/codeda/test.mp4"
},
"items": [
{
"layer": 1,
#!/usr/bin/python
import csv
data = []
with open('./SolarWindTotal.csv', 'rb') as inp:
rdr = csv.reader(inp, delimiter=';')
for row in rdr:
data.append(row);
public void testSub() throws PubNubException, InterruptedException {
PNConfiguration pnConfiguration = new PNConfiguration();
pnConfiguration.setSubscribeKey("demo");
pnConfiguration.setPublishKey("demo");
PubNub pubnub = new PubNub(pnConfiguration);
pubnub.addListener(new SubscribeCallback() {
@Override
public void status(PubNub pubnub, PNStatus status) {
import os
import sys
import logging
import time
from pubnub.callbacks import SubscribeCallback
from pubnub.pnconfiguration import PNConfiguration
from pubnub.pubnub import PubNub
d = os.path.dirname
@anovikov1984
anovikov1984 / pubnub_rts_template_generation.php
Created November 9, 2015 17:16
Appending PubNub keys while generating template
<script>
var pubnub = PUBNUB.init({
publish_key: '<?php echo getenv("PUBNUB_PUBLISH_KEY"); ?>',
subscribe_key: '<?php echo getenv("PUBNUB_SUBSCRIBE_KEY"); ?>'
});
</script>
@anovikov1984
anovikov1984 / pubnub_rts_htaccess_config
Created November 9, 2015 17:12
Defining environment variables using .htaccess file
SetEnv PUBNUB_PUBLISH_KEY my_publish_key
SetEnv PUBNUB_SUBLISH_KEY my_subscribe_key
@anovikov1984
anovikov1984 / pubnub_rts_json_keys_response.json
Created November 9, 2015 17:08
JSON response with PubNub keys
{"publish_key": "your_publish_key", "subscribe_key": "your_subscribe_key"}