npm run eject
npm install mobx mobx-react --save
npm i babel-plugin-transform-decorators-legacy --save-dev
npm run eject
npm install mobx mobx-react --save
npm i babel-plugin-transform-decorators-legacy --save-dev
| sudo apt install python3 | |
| sudo apt install python3-pip | |
| sudo apt install python-minimal | |
| sudo apt install python-pip |
| export LC_ALL=C | |
| sudo apt-get update | |
| sudo apt-get install software-properties-common python-software-properties | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
| sudo apt-get update | |
| sudo apt-get install -y docker-ce |
git clone https://github.com/tarantool/websocket.git .
luarocks make
tarantoolctl rocks install https://raw.githubusercontent.com/tarantool/websocket/master/websocket-scm-1.rockspec
https://aws.amazon.com/ru/cloud9/
# which node
# /root/.nvm/versions/node/v8.11.3/bin/node
mkdir aws-cloud9
| import asyncio | |
| import random | |
| q = asyncio.Queue() | |
| async def producer(num): | |
| while True: | |
| await q.put(num + random.random()) | |
| await asyncio.sleep(random.random()) |
| import asyncio | |
| import random | |
| q = asyncio.Queue() | |
| async def producer(num): | |
| while True: | |
| await q.put(num + random.random()) | |
| await asyncio.sleep(random.random()) |
| #!/usr/bin/env tarantool | |
| local cqueues = require "cqueues" | |
| local fiber = require "fiber" | |
| local socket = require "socket" | |
| package.loaded["http.client"] = nil -- tarantool has a namespace clash | |
| local websocket = require "http.websocket" | |
| local cq = cqueues.new() | |
| -- Hook up cqueues loop inside tarantool fiber |
docker volume create mongo-volume
docker run --name some-mongo -p 27017:27017 -v mongo-volume:/data/db -d mongo
docker exec -it some-mongo mongo admin
db.createUser({ user: 'username', pwd: 'userpass', roles: [ { role: "root", db: "admin" } ] });
use admin
db.createUser({ user: 'user1', pwd: 'pass1', roles: [ { role: "read", db: "public" } ], mechanisms:["SCRAM-SHA-1"] });
exit
Block reserved IPS:
iptables -A OUTPUT -p tcp -s 0/0 -d 0.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 100.64.0.0/10 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 169.254.0.0/16 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.0.0.0/24 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.0.2.0/24 -j DROP