Skip to content

Instantly share code, notes, and snippets.

@nik-kor
nik-kor / stuns
Created March 6, 2016 20:00 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
var funcCalls = {
/**
* Hash - func-name => last-called-timestamp
*/
timestamp: {},
/**
* Hash func-name => calls count
*/
count: {},
/**
* Получение комбинаций чисел, сумма которых равна sum
*
* Всю основную работу делает функция generate(см. комментарий к ней).
*
*
* @param {Array} - input - произвольный входящий массив
* @param {Number} - sum - сумма комбинации чисел
*/
function getCombs(input, sum) {
@nik-kor
nik-kor / bar.thrift
Created August 15, 2013 14:33
buggy node.js compilation in thrift@0.9.0
include "foo.thrift"
@nik-kor
nik-kor / client.js
Last active December 19, 2015 13:59
An example of buggy generated code by Thrift 0.8.0 for node.js. Bug is on 'namespace'-feature.
var thrift = require('thrift')
, Foo = require('./gen-nodejs/test_types.js');
@nik-kor
nik-kor / gist:2049486
Created March 16, 2012 10:32
interview questions

Common

Simple

  • Что такое класс/объект. Разница между ними. Как с ними обстоит дело в конкретных языках; Зачем они вообще нужны;
  • Зачем нужны абстрактные классы;
  • в чем отличие фрэймворка от библиотеки;
  • приходилось ли на практике писать тесты;
  • рассказать про какую-нибудь конкретную решеную задачу. Возможно, самую сложную и интересную;
@nik-kor
nik-kor / gist:1058640
Created July 1, 2011 14:25
node.js make failed
/usr/bin/python "/home/nick/dev/js/node/tools/scons/scons.py" -j 1 -C "/home/nick/dev/js/node/build/default/" -Y "/home/nick/dev/js/node/deps/v8" visibility=default mode=release arch=ia32 toolchain=gcc library=static snapshot=on gdbjit=on
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o obj/release/compiler.o -c -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-strict-aliasing -fno-rtti -fno-exceptions -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-strict-aliasing -DV8_TARGET_ARCH_IA32 -DENABLE_GDB_JIT_INTERFACE -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/home/nick/dev/js/node/deps/v8/src /home/nick/dev/js/node/deps/v8/src/compiler.cc
scons: building terminated because of errors.
DEST_OS: linux
DEST_CPU: ia32
Parallel Jobs: 1
Produc