Skip to content

Instantly share code, notes, and snippets.

View Globik's full-sized avatar
💭
Hacking janus webrtc gateway

Globik Globik

💭
Hacking janus webrtc gateway
  • Russia
View GitHub Profile
@Globik
Globik / tasks.c
Created May 8, 2018 23:47
How to reserve 1 thread task for for-ever loop
/*
* 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 October 4, 2017 17:22
hello_world in Lwan.c environment
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 15:27
Websocket multi room based on ws.js
<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 October 21, 2016 16:20
PostgresQL with node-pg(Pool) on Koa.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 March 24, 2016 17:08
Janus WebRTC Gateway under Msys2.0 on Windows 7 32-bit (gnu's ldd and nm output)
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 December 14, 2018 19:25
Local variables in Koa.js context with Marko.js templating engin. + fs.watch for marko/hot-reload. Version1.
//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 March 6, 2015 13:53
Koa, mongoskin, monk, koa-ejs, koa-passport
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');