start new:
tmux
start new with session name:
tmux new -s myname
<!DOCTYPE html> | |
<head> | |
<title>HTML5 Camera Fun</title> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="http://www.nihilogic.dk/labs/exif/exif.js" type="text/javascript"></script> | |
<script src="http://www.nihilogic.dk/labs/binaryajax/binaryajax.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
// Wrapper around MPL-licensed http://www.nihilogic.dk/labs/binaryajax/binaryajax.js | |
// to support JavaScript typed arrays since binary strings are not supported in IE 10 | |
var createBinaryFile = function(uintArray) { |
# 需求说明 | |
# 后端调用打分服务,在 Rails app 中和打分服务建立一个 WebSocket 连接 | |
# 传输音频流数据到打分服务中 | |
# 打分服务完成打分后会通过 WebSocket 传回打分数据 | |
# 将拿到的打分数据返回到具体业务中 | |
class Scorer | |
WS_URL = "ws://localhost:8081".freeze | |
# 实现打分的功能 |
class Handler | |
instrument :ping, :fetch_feeds | |
def ping(req, _) | |
# … | |
end | |
def fetch_feeds(req, _) | |
# … | |
end |
package timestamp | |
import ( | |
"fmt" | |
"labix.org/v2/mgo/bson" | |
"strconv" | |
"time" | |
) | |
type Timestamp time.Time |
Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.
Terminology:
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |