Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre-headless -y | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
| # NEW WAY / EASY WAY | |
| wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.deb | |
| sudo dpkg -i elasticsearch-0.90.7.deb |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| Install Ionic to dev android app on ubuntu 14.04 | |
| 0. Instal ubuntu-14.04-desktop-amd64.iso | |
| sudo apt-get update | |
| sudo apt-get install exfat-fuse exfat-utils | |
| sudo reboot | |
| 1. Copy jdk-7u60-linux-x64.tar.gz, apache-ant-1.9.4-bin.tar.gz to /opt and copy adt-bundle-linux-x86_64-20140321.zip to HOME/android | |
| cd /opt | |
| sudo tar zxvf jdk-7u60-linux-x64.tar.gz |
| import hashlib, hmac, mimetypes, os, time | |
| from base64 import b64encode, b64decode | |
| from calendar import timegm | |
| from datetime import datetime | |
| from email.utils import formatdate | |
| from urllib import quote | |
| from tornado.gen import coroutine, Return | |
| from tornado.httpclient import AsyncHTTPClient, HTTPError |
| from concurrent.futures import ThreadPoolExecutor | |
| from functools import partial, wraps | |
| import time | |
| import tornado.ioloop | |
| import tornado.web | |
| EXECUTOR = ThreadPoolExecutor(max_workers=4) |
| # -*- coding: utf-8 -*- | |
| import asyncio | |
| import re | |
| import asyncio_redis | |
| import tornado.concurrent | |
| import tornado.httpclient | |
| import tornado.web | |
| import tornado.platform.asyncio |
| #!/usr/bin/env python | |
| # -*- encoding: utf-8 -*- | |
| from tornado.ioloop import IOLoop, PeriodicCallback | |
| from tornado.web import RequestHandler, Application, url | |
| from tornado.httpserver import HTTPServer | |
| from tornado.httpclient import AsyncHTTPClient, HTTPError | |
| from tornado.gen import coroutine, Return, WaitIterator | |
| from tornado.netutil import bind_sockets, bind_unix_socket | |
| from tornado.process import fork_processes |
| # author: | |
| # @Bartosz Kosarzycki | |
| # | |
| sudo apt-get install npm | |
| sudo npm install -g react-native-cli | |
| sudo ln -s /usr/bin/nodejs /usr/bin/node | |
| cd /home/user/your/project/path | |
| react-native init AwesomeProject | |
| cd AwesomeProject |
| """ | |
| This is a simple example of WebSocket + Tornado + Simple EventEmitters usage. | |
| Thanks to pyee by https://github.com/jesusabdullah | |
| @Author:: Narayanaperumal G <[email protected]> | |
| """ | |
| import tornado.httpserver | |
| import tornado.websocket | |
| import tornado.ioloop | |
| import tornado.web | |
| from collections import defaultdict |
| # -*- coding: utf-8 -*- | |
| import asyncio | |
| import uvloop | |
| from aiohttp.web import Application, MsgType, WebSocketResponse | |
| def add_socket(app, socket, user_id): | |
| if user_id in app['connections']: | |
| pass |