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 exposing (..) | |
import Browser | |
import Html exposing (Html, div, h1, input, p, text) | |
import Html.Attributes exposing (placeholder) | |
import Html.Events exposing (onInput) | |
import Regex as R | |
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 exposing (main) | |
import Browser | |
import GraphQL.Client.Http as GraphQLClient | |
import GraphQL.Request.Builder exposing (..) | |
import Html exposing (Html, div, text) | |
import Task exposing (Task) | |
{-| Responses to `starWarsRequest` are decoded into this type. |
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
find . -name '*.cabal' -exec sh -c 'cabal-fmt $0 > output.tmp; mv output.tmp $0' {} ';' |
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 ? (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.09.tar.gz) | |
, system ? builtins.currentSystem | |
}: | |
let | |
haskellnix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz); | |
overlay = _: pkgs: | |
let | |
hnPkgs = pkgs.haskell-nix.stackProject { | |
src = ./.; |
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
getPersonStream :: ConduitT () PeopleRequest ServerErrorIO () | |
-> ConduitT PeopleResponse Void ServerErrorIO () | |
-> ServerErrorIO () | |
getPersonStream source sink = runConduit $ source .| reStream .| sink | |
where | |
reStream = do | |
req <- await | |
case req of | |
Nothing -> return () | |
Just r -> do |
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
import React, { useReducer, createContext } from 'react' | |
import { propOr } from 'ramda' | |
import en from '../../assets/literals/EN' | |
import es from '../../assets/literals/ES' | |
const translations = { en, es } | |
const getTranslate = lang => key => propOr(key, key, translations[lang]) | |
const initialState = { lang: 'en', t: getTranslate('en') } |
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 GoogleChart exposing (..) | |
import Html exposing (Html) | |
import Html.Attributes as HtmlA | |
import Json.Encode as E | |
import List.Extra as List | |
import Chart exposing (..) | |
colors = |
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
Show hidden characters
{ | |
"presets": [ | |
"@babel/preset-react", | |
[ | |
"@babel/preset-env", | |
{ | |
"targets": { | |
"browsers": [ | |
"last 2 versions", | |
"ie >= 11" |
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
function sum(a, b) { | |
// Aquí puede haber comentarios importantes... | |
// ...sobre todo para gente que hace librerías, etc... | |
return a + b; | |
} | |
// En la primera versión de la especificación... | |
sum.toString() // > "function sum() { return a + b }" |
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
Symbol('react').description // > "react" | |
Symbol.iterator.description // > "Symbol.iterator" | |
Symbol.for('preact').description // > "preact" |