(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
:
class Repeater | |
@@subscribers = [] | |
# Add the new subscriber to our list of subscribers | |
def subscribe(newSubscriber) | |
@@subscribers << newSubscriber | |
end | |
# Send the message to all of our subscribers | |
def broadcast(message) |
// convert a byte into a list of ones and zeros | |
def bits(num: Int): List[Int] = (for (i <- Range(0,8)) yield (((num << i) & 0xff) >>> 7)).toList | |
// given a list, take the first N bits | |
def next(bits: List[Int], numBits: Int) = { | |
val filler = List[Int](8 - numBits) map (_ => 0) | |
val bitList = filler ++ bits.take(numBits) |
(ns three.demo) | |
(def camera (THREE.Camera. 75 (/ window/innerWidth | |
window/innerHeight) 1 10000)) | |
(set! (.z (.position camera)) 1000) | |
(def scene (THREE.Scene.)) | |
(def geometry (THREE.CubeGeometry. 200 200 200)) | |
(def obj (js/Object.)) | |
(set! (.color obj) 0xff0000) | |
(set! (.wireframe obj) true) | |
(def material (THREE.MeshBasicMaterial. obj)) |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<title>Jasmine Spec Runner</title> | |
<link rel="shortcut icon" type="image/png" href="jasmine/jasmine_favicon.png"> | |
<link rel="stylesheet" type="text/css" href="jasmine/jasmine.css"> | |
<script type="text/javascript" src="jasmine/jasmine.js"></script> |
(ns evolvefn) ;; Lee Spector (lspector@hampshire.edu) 20111018 | |
;; This code defines and runs a genetic programming system on the problem | |
;; of finding a function that fits a particular set of [x y] pairs. | |
;; The aim here is mostly to demonstrate how genetic programming can be | |
;; implemented in Clojure simply and clearly, and several things are | |
;; done in somewhat inefficient and/or non-standard ways. But this should | |
;; provide a reasonable starting point for developing more efficient/ | |
;; standard/capable systems. |
def activate_virtualenv(name): | |
"""Activate given virtualenv. | |
Virtualenv home folder is given by environment variable ``WORKON_HOME`` or | |
``~/Envs`. | |
""" | |
if 'WORKON_HOME' in os.environ: | |
home = os.environ['WORKON_HOME'] | |
else: | |
home = os.path.expanduser(os.path.join('~', 'Envs')) |
type Cell[T] = ref object | |
car: T | |
cdr: Cell[T] | |
type List[T, N] = distinct Cell[T] | |
proc makeNil[T]: List[T, range[0..0]] = nil | |
proc makeCons[T, N](car: T; cdr: List[T, N]): auto = | |
type N1 = range[0..high(N)+1] |
var webrtc = require('webrtc-swarm') | |
var signalhub = require('signalhub') | |
var hyperdrive = require('hyperdrive') | |
var memdb = require('memdb') | |
var pump = require('pump') | |
var DEFAULT_SIGNALHUBS = 'https://signalhub.mafintosh.com' | |
var drive = hyperdrive(memdb()) |