(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
var s = '' | |
var result = '' | |
var step = async (x, y, last) => { | |
const response = await fetch(`/step?s=${s}&x=${x}&y=${y}`) | |
const json = await response.json() | |
const adjacent = json.adjacent.filter( | |
item => JSON.stringify(item) !== JSON.stringify(last) | |
) | |
if (json.end) { |
class JsonEncodedDict(sqlalchemy.TypeDecorator): | |
"""Enables JSON storage by encoding and decoding on the fly.""" | |
impl = sqlalchemy.VARCHAR | |
def process_bind_param(self, value, dialect): | |
if value is not None: | |
value = json.dumps(value) | |
return value | |
def process_result_value(self, value, dialect): |
#this script can never fail | |
#Usage: put this line into your config.fish | |
# source $HOME/.config/fish/ssh_agent_start.fish && start_agent | |
setenv SSH_ENV $HOME/.ssh/environment | |
function __setup_env | |
if [ -f $SSH_ENV ] | |
. $SSH_ENV > /dev/null |
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
'''Change the order of the last command and excute again | |
Not completed, canceled. | |
@Author [email protected] | |
''' | |
import logging | |
import os | |
import subprocess |
#!/bin/zsh | |
# with bugs, can not use $$, it is the current pid, use $PPID instead | |
function Usage() { | |
cat<<EOF | |
change the parameter orders of the last command and execute again | |
eg: | |
for commmand 'ls -l -a -h' | |
chargs 3 1 2 |
Asynchronous programming can be tricky for beginners, therefore I think it's useful to iron some basic concepts to avoid common pitfalls.
For an explanation about generic asynchronous programming, I recommend you one of the [many][2] [resources][3] [online][4].
I will focus on solely on asynchronous programming in [Tornado][1]. From Tornado's homepage: