Skip to content

Instantly share code, notes, and snippets.

View alersenkevich's full-sized avatar
🤔
hard working

01001010011011110100101001101111 alersenkevich

🤔
hard working
  • Yekaterinburg, Russian Federation
View GitHub Profile
@alersenkevich
alersenkevich / webpack.config.js
Last active October 26, 2017 16:36
webpack config for pixi.js
const path = require('path')
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'public'),
filename: 'bundle.js',
},
module: {
@alersenkevich
alersenkevich / .cpp
Created October 20, 2017 07:02
oserver realization
#include <iostream>
#include <string>
#include <list>
using namespace std;
class SupervisedString;
class IObserver
{
public:
@alersenkevich
alersenkevich / applyMiddleware.js
Last active October 26, 2017 09:50
applyMiddleware function
const dummy = ws => ws
export const applyMiddlewareForWebSocket = (ws, ...fnList) => {
let tmp = ws
fnList.forEach((fn, index) => {
tmp = fn(tmp, fnList[index + 1] || dummy)
})
}