This file contains hidden or 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 operator | |
| class Maybe(object): | |
| """ | |
| Basic concept | |
| use https://github.com/Suor/whatever/tree/0d8b2c4fcdcb94f3eb6fa79d2fcdf84c8e39286d | |
| for initial hacking | |
| """ | |
| def __init__(self, val, nothing=None): |
This file contains hidden or 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 Hello where | |
| import Graphics.Element exposing (Element, show) | |
| import Task exposing (Task, andThen) | |
| import Html exposing (..) | |
| import Html.Attributes exposing (style, value) | |
| import Html.Events exposing (onClick, on, targetValue) | |
| import Json.Decode as Json |
This file contains hidden or 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 Focus | |
| import Array | |
| import Maybe | |
| atL Int -> a -> Focus (Array.Array a) a | |
| atL index default = Focus.create ((Maybe.withDefault default) << (Array.get index))\ | |
| (\f r -> (Array.set index | |
| (f (Maybe.withDefault default (Array.get index r))) | |
| r)) |
This file contains hidden or 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 React from 'react'; | |
| import SchemaBranchMixin from 'baobab-react-schemabranchmixin'; | |
| const Counter = React.createClass({ | |
| displayName: 'Counter', | |
| mixins: [SchemaBranchMixin, ], | |
| schema: { | |
| value: 0, | |
| }, |
This file contains hidden or 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
| xx :: [a] -> [a] -> [[a]] | |
| [] `xx` xs = [] | |
| xs `xx` [] = [] | |
| (a:as) `xx` bs = (a `x` bs) ++ (as `xx` bs) | |
| x :: a -> [a] -> [[a]] | |
| a `x` [] = [] | |
| a `x` (b:bs) = [[a,b]] ++ (a `x` bs) |
This file contains hidden or 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
| markTree :: Tree () -> State Integer (Tree Integer) | |
| markTree (Leaf _) = do | |
| n <- get | |
| put (n+1) | |
| return (Leaf n) | |
| markTree (Fork l _ r) = do | |
| l' <- markTree l | |
| n <- get | |
| put (n+1) | |
| r' <- markTree r |
This file contains hidden or 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
| var responseFromGoogle = axios.get(googleBooksUrl); | |
| var responseFromCrossRef = = axios.get(crossRefUrl); | |
| Promise.all([responseFromGoogle, responseFromCrossRef]).then(function(responses){ | |
| var googleData = cleanGoogleBooks(responses[2]); | |
| var crossRefData = cleanCrossRef(responses[1]); | |
| response.send({google: googleData, crossRef: crossRefData}); | |
| }); |
This file contains hidden or 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 | |
| fallocate -l 10G /swapfile | |
| chmod 600 /swapfile | |
| mkswap /swapfile | |
| swapon /swapfile | |
| apt-get install htop | |
| htop | |
| ## curl https://gist.githubusercontent.com/ir4y/063a8b1912c3ed6ef03bb463cb2fcffa/raw/8eff8079c3853a11534dfa94fb26acc72ccb12e1/add_swap.sh | bash |
This file contains hidden or 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
| https://docs.google.com/presentation/d/1oejsDvtVuEHWKWAwJn_gHDL7p7zQrxI341fz33xMs24/edit#slide=id.p |
This file contains hidden or 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
| item: | |
| - text: Diagnostic | |
| linkId: diagnosis-code | |
| - text: Côté diagnostic | |
| linkId: acc-diagnosis-side | |
| answerOption: | |
| - valueCoding: | |
| code: left | |
| system: 'https://www.acc.co.nz' | |
| display: La gauche |