We'll use NixOps to deploy, so we need to install it
nix-env -i nixops
And to deploy on DigitalOcean we need to have an account and create an API access token for it.
We'll use NixOps to deploy, so we need to install it
nix-env -i nixops
And to deploy on DigitalOcean we need to have an account and create an API access token for it.
open System | |
//Helpers | |
let printOpt opt = | |
match opt with | |
|None -> printfn "None" | |
|Some v -> printfn "Some %s" v | |
// safe functions | |
let exclaimIt str = if str = "" then None else Some (str + "!") |
#load @".paket\load\net452\FSharpPlus.fsx" | |
open FSharpPlus | |
open System | |
[<AutoOpen>] | |
module rec IO = | |
let run (IO computation) = computation() | |
type IO<'T> = |
# Script to generate a new block every minute | |
# Put this script at the root of your unpacked folder | |
#!/bin/bash | |
echo "Generating a block every minute. Press [CTRL+C] to stop.." | |
address=`./bin/bitcoin-cli getnewaddress` | |
while : | |
do |
#!/usr/bin/env bash | |
set -e | |
get_display_info() { | |
xrandr --verbose | grep -w "$1 connected" -A8 | grep "$2" | cut -f2- -d: | tr -d ' ' | |
} | |
# cribbed from redshift, https://github.com/jonls/redshift/blob/master/README-colorramp | |
GAMMA_VALS=('1.0:0.7:0.4' # 3000K | |
'1.0:0.7:0.5' # 3500K |
"Allow project specific .vimrc execution | |
set exrc | |
"no backup files | |
set nobackup | |
"only in case you don't want a backup file while editing | |
set nowritebackup | |
"no swap files |
open System | |
[<Struct>] type Effect<'env, 'out> = Effect of ('env -> Async<'out>) | |
[<RequireQualifiedAccess>] | |
module Effect = | |
/// Create value with no dependency requirements. | |
let inline value (x: 'out): Effect<'env,'out> = Effect (fun _ -> async.Return x) | |
/// Create value which uses depenendency. |