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
#!/bin/bash | |
INSTALL_DIR=/usr/lib/node_modules | |
SUB_DIR=$INSTALL_DIR/hexo-cli/node_modules | |
echo Getting root privileges... | |
sudo echo Done. | |
echo Installing in a temp directory... | |
mkdir tmp | |
cd tmp | |
npm install hexo-cli | |
echo "Done; moving to global NPM directory..." |
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
open Suave | |
open Suave.Filters | |
open Suave.Operators | |
open System | |
module View = | |
let page (data : Map<string, obj>) = | |
match data |> Map.tryFind "messages" with | |
| Some x -> | |
x :?> string list |> List.reduce (+) |
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
namespace ReaderMonad | |
// -- begin code lifted from #er demo -- | |
type ReaderM<'d, 'out> = 'd -> 'out | |
module Reader = | |
// basic operations | |
let run dep (rm : ReaderM<_,_>) = rm dep | |
let constant (c : 'c) : ReaderM<_,'c> = fun _ -> c | |
// lifting of functions and state |