Skip to content

Instantly share code, notes, and snippets.

💭
Hacking janus webrtc gateway

Globik Globik

  • Russia
View GitHub Profile
@Globik
Globik / tasks.c
Created May 8, 2018
How to reserve 1 thread task for for-ever loop
View tasks.c
/*
* Copyright (c) 2014 Joris Vink <joris@coders.se>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@Globik
Globik / file command
Last active Oct 4, 2017
hello_world in Lwan.c environment
View file command
file ./hello_world
./hello_world: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=16f24d59fb4fc8a31086dd8e8305edc289655a3a, not stripped
@Globik
Globik / index.html
Created May 1, 2017
Websocket multi room based on ws.js
View index.html
<html>
<body>
<h4>websocket</h4>
<h5>Group: <span id="group">darwin</span></h5>
<!-- a hardoced group name -->
<button onclick="bjoin();">join group</button><br>
<input id="text" type="text"/>
<span id="out"></span>
<script>
var group=document.getElementById("group").textContent;
@Globik
Globik / server.js
Created Oct 21, 2016
PostgresQL with node-pg(Pool) on Koa.js
View server.js
'use strict';
const koa=require('koa');
const render=require('./libs/render.js');
const path=require('path');
var debug=module.exports=require('debug')('icon')
debug('Hali halo debug!');
var serve=require('koa-static');
var bodyParser=require('koa-body');
var Router=require('koa-router');
@Globik
Globik / janus.exe
Last active Mar 24, 2016
Janus WebRTC Gateway under Msys2.0 on Windows 7 32-bit (gnu's ldd and nm output)
View janus.exe
User@User-DNS MSYS /usr/local/opt/j
$ ldd janus.exe
ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x76de0000)
kernel32.dll => /c/Windows/system32/kernel32.dll (0x76f50000)
KERNELBASE.dll => /c/Windows/system32/KERNELBASE.dll (0x74f50000)
msys-2.0.dll => /usr/bin/msys-2.0.dll (0x61000000)
msys-gcc_s-1.dll => /usr/bin/msys-gcc_s-1.dll (0x6ac00000)
@Globik
Globik / markserver.js
Last active Dec 14, 2018
Local variables in Koa.js context with Marko.js templating engin. + fs.watch for marko/hot-reload. Version1.
View markserver.js
//var chokidar=require('chokidar');=> alas, it will not work. Just I don't know how
var koa=require('koa');
var path=require('path');
var serve=require('koa-static');
var Router=require('koa-router');
var fs=require('fs');
var viewsDir=path.join(__dirname,'templates');
require('marko/node-require').install();
var marko=require('marko');
require('marko/hot-reload').enable();
@Globik
Globik / server
Created Mar 6, 2015
Koa, mongoskin, monk, koa-ejs, koa-passport
View server
var koa = require('koa');
var logger=require('koa-logger');
var path=require('path');
var Router = require('koa-router');
var bodyParser = require('koa-bodyparser');
var render = require('koa-ejs');
You can’t perform that action at this time.