Skip to content

Instantly share code, notes, and snippets.

View girishso's full-sized avatar

Girish Sonawane girishso

  • Pune, India
View GitHub Profile
type Msg
= GotRepos (Result Http.Error RepoResponse)
type alias RepoResponse =
( List LinkHeader.WebLink, List Repo )
fetchRepos : Cmd Msg
fetchRepos =
module Main exposing (Model, Msg(..), extractRepoResponse, fetchRepos, getRepos, init, main, update, view)
import Browser
import Dict
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode
import Json.Decode.Pipeline as Pipeline
@girishso
girishso / view.elm
Last active December 6, 2018 16:03
view : Model -> Html Msg
view model =
let
renderSvg which =
div [ HA.id "chartContainer", HA.attribute "data-type" which ]
[ svg [ HA.id "bar", HA.width 700, HA.height 500 ] [] ]
in
div []
[ button [ onClick (ShowChart BarChart), disabled (model.chart /= NoChart) ] [ Html.text "Show Bar Chart" ]
, button [ onClick (ShowChart PieChart), disabled (model.chart /= NoChart) ] [ Html.text "Show Pie Chart" ]
document.arrive("#chartContainer", (elem) => {
if(elem.dataset.type == "bar")
drawBarChart()
else
drawPieChart()
})
import {
Elm
} from './Main.elm'
import './main.css'
import firebase from "firebase"
import gun from "gun"
const app = Elm.Main.init({
node: document.getElementById('main')
@girishso
girishso / cloudSettings
Created July 24, 2021 17:12
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-24T17:12:08.176Z","extensionVersion":"v3.4.3"}
# A multiline prompt with username, hostname, full path, return status, git branch, git dirty status, git remote status
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
local host_color="green"
if [ -n "$SSH_CLIENT" ]; then
local host_color="red"
fi
PROMPT='