(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
:
The regex patterns in this gist are intended to match any URLs, | |
including "mailto:foo@example.com", "x-whatever://foo", etc. For a | |
pattern that attempts only to match web URLs (http, https), see: | |
https://gist.github.com/gruber/8891611 | |
# Single-line version of pattern: | |
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
package go | |
import java.util.concurrent.{ | |
BlockingQueue => JBlockingQueue, | |
ArrayBlockingQueue => JArrayBlockingQueue | |
} | |
object Channel { | |
def empty[A]: Channel[A] = new BlockingChannel() | |
def make[A]: Channel[A] = make(1) |
// Implementing the publishing Pusher REST API | |
// @see http://pusher.com/docs/rest_api | |
// with Play (scala) Framework | |
// @see http://scala.playframework.org/ | |
class Pusher { | |
val appId = Play.configuration.getProperty("pusher.appId") | |
val key = Play.configuration.getProperty("pusher.key") | |
val secret = Play.configuration.getProperty("pusher.secret") | |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
/** | |
* D Holbrook | |
* | |
* Code Club: PO1 | |
* | |
* (*) Define a binary tree data structure and related fundamental operations. | |
* | |
* Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported: | |
* | |
* Constructors |
"For comprehension" is a another syntaxe to use map
, flatMap
and withFilter
(or filter) methods.
yield
keyword is used to aggregate values in the resulting structure.
This composition can be used on any type implementing this methods, like List
, Option
, Future
...
import rapture.io._ | |
// Let's parse some JSON | |
val src: Json = Json.parse(""" | |
{ | |
"foo": "Hello world", | |
"bar": { | |
"baz": 42 | |
} | |
} |
import akka.actor.IO._ | |
import akka.actor.{Props, IO, IOManager, Actor, ActorSystem} | |
import akka.event.Logging | |
import akka.util.ByteString | |
import java.net.InetSocketAddress | |
class TCPEchoServer(port: Int) extends Actor { | |
val log = Logging(context.system, this) | |
val state = IterateeRef.Map.async[IO.Handle]()(context.dispatcher) |
import scala.collection.mutable | |
/** | |
* Bounded priority queue trait that is intended to be mixed into instances of | |
* scala.collection.mutable.PriorityQueue. By default PriorityQueue instances in | |
* Scala are unbounded. This trait modifies the original PriorityQueue's | |
* enqueue methods such that we only retain the top K elements. | |
* The top K elements are defined by an implicit Ordering[A]. | |
* @author Ryan LeCompte (lecompte@gmail.com) | |
*/ |