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
module Main where | |
import Data.Time.Clock.POSIX | |
import Control.Concurrent | |
import Polysemy | |
import Polysemy.Final | |
import Polysemy.Trace | |
import Polysemy.Error | |
import Data.Kind | |
import Polysemy.Final (interpretFinal) |
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
with import <nixpkgs> {}; | |
stdenv.mkDerivation { | |
name = "sc3-plugins-3.7.0-beta"; | |
src = fetchgit { | |
url = "https://github.com/supercollider/sc3-plugins"; | |
rev = "a963ecb"; | |
sha256="0840jwh7ljmhg34zblahqx3abk42a3y3gvgb740r558rphbp1p19"; | |
fetchSubmodules = true; |
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
fibs :: [Integer] | |
fibs = 1 : scanl (+) 1 fibs | |
fibsN :: Int -> Integer | |
fibsN x = fibs !! x | |
fibsT :: Int -> Integer | |
fibsT x = last $ take x fibs | |
-- Scans Exercises |
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
data DatabaseItem = DbString String | DbNumber Integer | DbDate UTCTime | |
deriving (Eq, Ord, Show) | |
theDatabase :: [DatabaseItem] | |
theDatabase = | |
[ DbDate (UTCTime (fromGregorian 1911 5 1) (secondsToDiffTime 34123)) | |
, DbNumber 9001 | |
, DbString "Hello, world!" | |
, DbDate (UTCTime (fromGregorian 1921 5 1) (secondsToDiffTime 34123)) | |
] |
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
Eq Instances | |
1. | |
> data TisAnInteger = TisAn Integer | |
> instance Eq TisAnInteger where | |
> TisAn n == TisAn n' = n == n' | |
2. | |
> data TwoIntegers = Two Integer Integer | |
> instance Eq TwoIntegers where | |
> Two n m == Two n' m' = (n == n') && (m == m') | |
3. |
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 OverloadedStrings #-} | |
module Tui where | |
import Brick.AttrMap | |
import Brick.Main | |
import Brick.Types | |
import Brick.Util | |
import Brick.Widgets.Border | |
import Brick.Widgets.Core |
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
$ ansible-playbook ssh.yaml -vvv | |
ansible-playbook 2.5.1 | |
config file = /media/metaxis/stock/Coding/ops/playbook/ansible.cfg | |
configured module search path = [u'/home/metaxis/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] | |
ansible python module location = /usr/lib/python2.7/dist-packages/ansible | |
executable location = /usr/bin/ansible-playbook | |
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0] | |
Using /media/metaxis/stock/Coding/ops/playbook/ansible.cfg as config file | |
Parsed /media/metaxis/stock/Coding/ops/playbook/hosts inventory source with ini plugin |
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
CmdShow id -> do | |
doc <- cmdShowId @Note id | |
case doc of | |
Right Storage.Document{value} -> pprint $ withHeader "Note:" $ UI.noteViewFull $ noteView id value | |
Left _ -> do | |
doc <- cmdShowId @Contact id | |
case doc of | |
Right Storage.Document{value} -> pprint $ withHeader "Contact:" $ UI.contactViewFull $ contactView id value | |
Left e -> liftIO $ pprint a | |
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
$ ff search -w wiki -b | |
Wiki notes: | |
* Hello, wiki! | id 474uyd0t4oq-2lvlyseskf | |
* wiki | id 47jkpd8vkk8-2lvlyseskf | |
* wiki4 | id 47jlvd36qy3-2lvlyseskf | |
* wiki5 | id 47jlvq67rik-2lvlyseskf | |
* wiki4 | id 47jlvzc1kki-2lvlyseskf | |
$ ff search -c wiki -b | |
Contacts: | |
* wiki | id 47jodpnkeod-2lvlyseskf |
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 StrictData #-} | |
module FF.Options | |
( Cmd (..) | |
, CmdAction (..) | |
, Config (..) | |
, DataDir (..) | |
, Edit (..) | |
, New (..) | |
, Search (..) |
NewerOlder