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
-- The problem is that I need to model the following routes: | |
-- * /profile/:username | |
-- * /profile/:username/favourites | |
-- | |
-- And I'm a little stuck and I'm not sure whether it is my encoding of the routes, | |
-- that I'm missing an important combinator or Obelisk just doesn't handle this yet. | |
newtype Username = Username { unUsername :: Text } deriving (Eq, Ord, Show) | |
makeWrapped ''Username |
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
jbetz> is `rhyolite` for enabling the frontend to subscribe to backend events via web sockets? and has anyone outside of obsidian tried using it? | |
02:06 <Cale> jbetz: rhyolite is a bunch of partially-baked miscellaneous libraries which are at various levels of polish, but which we needed to open-source early for various reasons. Use it at your own risk, but please let us know if you find anything particularly good/bad if you do end up trying it out. | |
02:07 We've been breaking out pieces of it, taking off the sharp edges, and open sourcing them as separate libraries as time permits. | |
02:08 Rhyolite.Backend.App does contain something like what you described though | |
02:10 → mtesseract joined ([email protected]) | |
02:13 <jbetz> Cale: gotcha. I got curious when I started looking through obsidian's tezos projects. | |
02:18 also, I really like the idea of widget's subscribing to database queries. there's a clojure project called `precept` that pretty much does this. the database is just a graph of facts, wi |
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
copyToClipboard elt doc = do | |
JsHtmlElement.focus elt | |
JsInput.select elt | |
JsDocument.execCommand_ doc ("copy"::String) False (Nothing::Maybe String) | |
pure () |
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
pkgs: self: super: | |
let | |
foo = ../../consumer-data-au-api-client; | |
upstreamOverrides = { | |
consumer-data-au-api-types = import ../../consumer-data-au-api-types/nix/consumer-data-au-api-types-overrides.nix; | |
consumer-data-au-api-client = import "${foo}/nix/consumer-data-au-api-client-overrides.nix"; | |
}; | |
bankOverrides = pkgs: self: super: { | |
consumer-data-au-api-types = self.callPackage (import ../../consumer-data-au-api-types/consumer-data-au-api-types.nix) {}; |
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
-- So I want to set up three machine, with two builder nodes having ssh access to the cache to be able | |
-- to copy closure to that cache machine so that nix-serve can serve up that binary cache so that both | |
-- builders have a common cache that they can push to and share. This is simulating the setup you may | |
-- want if you had an existing CI cluster but wanted to build things on it while having a cluster wide | |
-- cache. | |
let | |
pub = import ./nix-cache-key.pub; | |
sec = import ./nix-cache-key.sec; | |
builder = keyname: { config, nodes, pkgs, resources, lib, ... }: { | |
deployment.keys.privateKey = { |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE RecursiveDo #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Frontend where | |
import qualified Data.Text as T | |
import qualified Data.Text.Lazy as TL |
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
{ nixpkgs ? import <nixpkgs> {} }: | |
with nixpkgs; | |
let | |
hpkgs = pkgs.haskell.packages.ghc843; | |
nlopt-new = hpkgs.mkDerivation { | |
pname = "nlopt-haskell"; | |
version = "0.1.2.0"; | |
src = fetchFromGitHub { | |
owner = "peddie"; | |
repo = "nlopt-haskell"; |
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
{ nixpkgs ? import <unstable> {} }: | |
with nixpkgs; | |
let | |
hpkgs = pkgs.haskell.packages.ghc843; | |
nlopt-new = hpkgs.mkDerivation { | |
pname = "nlopt-haskell"; | |
version = "0.1.2.0"; | |
src = fetchFromGitHub { | |
owner = "peddie"; | |
repo = "nlopt-haskell"; |
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
bkolera at bkolera in ~ | |
$ cat /etc/nixos/configuration.nix | |
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
let | |
unstable = import <unstable> {}; | |
sni = import ./lib/sni.nix; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.