This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* See http://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html | |
# signature;; | |
- : string = "ced6826de92d2bdeed8f846f0bf508e8559e98e4b0199114b84c54174deb456c" | |
*) | |
#require "cryptokit";; | |
open Cryptokit;; | |
let secret = "AWS4" ^ "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY";; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Create an image from a unikernel. | |
# Props to Mirage for this script, which was derived from | |
# https://raw.githubusercontent.com/mirage/mirage/master/scripts/ec2.sh | |
while getopts "hn:k:" arg; do | |
case $arg in | |
h) | |
echo "usage: $0 [-h] [-n <name>] [-r <region>] -k <unikernel> " | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type _ value = Bool : bool -> bool value | |
| Int : int -> int value | |
type _ atom = Abool : bool -> bool atom | |
| Aint : int -> int atom | |
type _ sexp = Sexp_atom : 'a atom -> 'b atom sexp | |
let val_of_atom : type t. t atom -> t value = | |
function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(** Mutable stack and queue. | |
** Queue implemented as two stacks. This is all the rage. *) | |
module type STACK = sig | |
type 'a t | |
val create : unit -> 'a t | |
val peek : 'a t -> 'a option |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- Implementation of the Exercises for the Forms section of the Elm Architecture Tut | |
- http://guide.elm-lang.org/architecture/user_input/forms.html | |
- | |
- Elm Platform 0.17.1 | |
-} | |
import Html exposing (..) | |
import Html.App as Html | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Prints Left or Right when mouse on left or right side of window respectively | |
{- | |
"dependencies": { | |
"elm-lang/core": "4.0.3 <= v < 5.0.0", | |
"elm-lang/html": "1.1.0 <= v < 2.0.0", | |
"elm-lang/mouse": "1.0.0 <= v < 2.0.0", | |
"elm-lang/window": "1.0.0 <= v < 2.0.0" | |
}, | |
"elm-version": "0.17.1 <= v < 0.18.0" | |
-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Config.Xfce | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Util.Replace(replace) | |
main = do | |
replace | |
xmonad $ ewmh xfceConfig | |
{ terminal = "xfce4-terminal --hide-menubar" | |
, manageHook = myManageHook <+> manageHook xfceConfig |