start new:
tmux
start new with session name:
tmux new -s myname
-module(date_util). | |
-compile(export_all). | |
epoch() -> | |
now_to_seconds(now()) | |
. | |
epoch_hires() -> | |
now_to_seconds_hires(now()) | |
. |
(use '[clojure.core.match :only [match]]) | |
(defn evaluate [env [sym x y]] | |
(match [sym] | |
['Number] x | |
['Add] (+ (evaluate env x) (evaluate env y)) | |
['Multiply] (* (evaluate env x) (evaluate env y)) | |
['Variable] (env x))) | |
(def environment {"a" 3, "b" 4, "c" 5}) |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Require Import Utf8. | |
Inductive subtype (a b : Set) : Set := | |
| ST : (a -> b) -> subtype a b. | |
Infix ":>" := subtype (at level 50). | |
Definition st {x y} f := ST x y f. | |
Definition unpack {a b : Set} (st : a :> b) := |
%%% led_controller is a module to toggle LEDs wired to gpio pins on the raspberry pi | |
-module(led_controller). | |
-behavior(gen_server). | |
-export([start_link/1]). | |
% standard gen_server | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). | |
% Public Interface | |
-export([on/1, off/1, blink/2]). | |
% Don't call these directly | |
-export([blink_cast/2]). |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "precise32" |
class Box<T> { constructor(public value: T) {} } | |
class A {} | |
class B { foo() {} } | |
var bb : Box<B> = new Box<B>(null); | |
// This typechecks (it shouldn't; T is used both in a co- and contra-variant position, so it's invariant)... | |
var ba : Box<A> = xb; | |
ba.value = new A(); |
module Main | |
{- | |
Compile with: | |
idris --package javascript --target javascript test.idr -o test.js | |
<html> | |
<head> |