tmux new [-s name] [cmd]
(:new
) - new session
tmux ls
(:ls
) - list sessionstmux switch [-t name]
(:switch
) - switches to an existing session
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Value int | |
} |
const ( | |
ModeAll = iota | |
ModeRoundRobin | |
) | |
type Publisher interface { | |
Publish(string, []byte) error | |
} | |
type PublishHandler struct { |
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
package main | |
import ( | |
"myapp/webserver/app/common" | |
"github.com/golang/glog" | |
"github.com/gorilla/mux" | |
"encoding/json" | |
"strconv" | |
"flag" | |
"fmt" |
{ | |
init: function(elevators, floors) { | |
elevators.forEach(function(e) { | |
e.isDestination = function(floorNum) { | |
return e.destinationQueue.indexOf(floorNum) != -1; | |
} | |
e.on("floor_button_pressed", function(floorNum) { | |
if (!e.isDestination(floorNum)) | |
e.goToFloor(floorNum); |
This guide describes how to bootstrap new Production Core OS Cluster as High Availability Service in a 15 minutes with using etcd2, Fleet, Flannel, Confd, Nginx Balancer and Docker.
:
and not ::
, and the consing operator conversely is ::
instead of :
where
clauses, only let/in
"""
data
corresponds to type
in Elm, and also, Haskell's type
corresponds to Elm's type alias
($)
is (<|)
, but you don't use it all that much – Elm people like the flipped operator (|>)
which lets you build something that reads like a pipeline(|>)
(.)
is (<<)
, and a flipped version (>>)
exists, but I don't see it used that much either(>>=)
is not an available operator and would not be polymorphic (no typeclasses, see below), and is instead commonly named SomeType.andThen
– e.g. Maybe.andThen : Maybe a -> (a -> Maybe b) -> Maybe b
public class AnnotationHelper { | |
private static final String ANNOTATIONS = "annotations"; | |
public static final String ANNOTATION_DATA = "annotationData"; | |
public static boolean isJDK7OrLower() { | |
boolean jdk7OrLower = true; | |
try { | |
Class.class.getDeclaredField(ANNOTATIONS); | |
} catch (NoSuchFieldException e) { | |
//Willfully ignore all exceptions |
declare module 'react-svg-pan-zoom' { | |
import * as React from 'react' | |
type Tool = 'auto' | 'none' | 'pan' | 'zoom-in' | 'zoom-out' | |
type ToolBarPosition = 'none' | 'top' | 'right' | 'bottom' | 'left' | |
export const ReactSVGPanZoom: ReactSVGPanZoom | |
interface ReactSVGPanZoom extends React.ComponentClass<ReactSVGPanZoomProps> {} |