As configured in my dotfiles.
start new:
tmux
start new with session name:
"""Simple TCP server for playing Tic-Tac-Toe game. | |
Use Player-to-Player game mode based on naming auth. | |
No thoughts about distribution or pub/sub mode | |
(for monitoring or something like this). Just | |
basic functionality. | |
""" | |
import time | |
import logging |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
struct stock5Min | |
{ | |
unsigned short monthDay; // 月日 | |
unsigned short hourMin; // 小时, 分钟 |
[program:mongodb] | |
command=/opt/mongodb/bin/mongod --dbpath /storage/mongodb_data --rest | |
directory=/opt/mongodb | |
user=root | |
autostart=false |
As configured in my dotfiles.
start new:
tmux
start new with session name:
* + table { | |
border-style:solid; | |
border-width:1px; | |
border-color:#e7e3e7; | |
} | |
* + table th, * + table td { | |
border-style:dashed; | |
border-width:1px; | |
border-color:#e7e3e7; |
from time import sleep | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.web import Application, asynchronous, RequestHandler | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
def run_background(func, callback, args=(), kwds={}): | |
def _callback(result): |
import tornado.web | |
import tornado.httpserver | |
import tornado.ioloop | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Greetings from the instance %s!" % tornado.process.task_id()) | |
app = tornado.web.Application([ | |
(r"/", MainHandler), |
# From a fresh install of squeeze | |
apt-get install ruby rubygems # Need ruby to use fpm | |
gem1.8 install fpm --no-ri --no-rdoc | |
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -zxvf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125 | |
rm -rf /tmp/ruby193 |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
evernote_doAction( document.popupNode, 'CLIP_ACTION_FULL_PAGE' ); | |
evernote_doAction( document.popupNode, 'CLIP_ACTION_IMAGE' ); | |
evernote_doAction( document.popupNode, 'CLIP_ACTION_SELECTION' ); | |
evernote_doAction( document.popupNode, 'CLIP_ACTION_URL' ); | |
evernote_doAction( document.popupNode, 'NEW_NOTE_ACTION' ); |