Skip to content

Instantly share code, notes, and snippets.

View girishso's full-sized avatar

Girish Sonawane girishso

  • Pune, India
View GitHub Profile
# 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='
@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"}
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')
document.arrive("#chartContainer", (elem) => {
if(elem.dataset.type == "bar")
drawBarChart()
else
drawPieChart()
})
@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" ]
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
type Msg
= GotRepos (Result Http.Error RepoResponse)
type alias RepoResponse =
( List LinkHeader.WebLink, List Repo )
fetchRepos : Cmd Msg
fetchRepos =
> curl -I https://api.github.com/users/girishso/repos
.
.
Link: <https://api.github.com/user/35009/repos?page=2>; rel="next", <https://api.github.com/user/35009/repos?page=2>; rel="last"
.
.
@girishso
girishso / Main.elm
Created August 11, 2018 15:09 — forked from mdemin914/Main.elm
example of fetching data with elm and remote data
module Main exposing (..)
import RemoteData exposing (WebData, RemoteData(..), asCmd, fromTask)
import Html exposing (Html, text, div, input, br)
import Html.Events exposing (onClick)
import Html.Attributes exposing (type_, value)
import Http exposing (get, toTask)
import Json.Decode exposing (Decoder, string)
import Json.Decode.Pipeline exposing (decode, required)
import Random exposing (int, generate)
module BottomScroll exposing (main)
import InfiniteScroll as IS
import Html exposing (..)
import Html.Attributes exposing (style)
import Http
import Json.Decode as JD
type Msg