Skip to content

Instantly share code, notes, and snippets.

"use strict";
let downloadGoogleSpreadsheet = require("./downloadGoogleSpreadsheet");
downloadGoogleSpreadsheet("1Wl4MriZ-4HM_DmXWxHyH7Xt2VKoRPK3RfCji_KhFa7U", (data) => {
console.log(JSON.stringify(data, null, "\t"));
});
{
"title": "Test for Javascript",
"orderedSheetsTitle": [
"Sheet1",
"Sheet2",
"Sheet3"
],
"orderedSheetsId": [
"od6",
"o1anaj",
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (onInput)
-- import Debug exposing (..)
main =
Html.beginnerProgram
@lucamug
lucamug / main.01.elm
Created April 28, 2017 19:40
Recycling in Elm
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
type alias Model =
{ name : String
, price : Float
@lucamug
lucamug / main.01.elm
Created April 29, 2017 08:22
Tutorial - How to recycle in Elm
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
type alias Model =
{ name : String
, price : Float
@lucamug
lucamug / main.02.elm
Last active April 29, 2017 08:30
Tutorial - How to recycle in Elm
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
type alias Model =
{ name : String
, price : Float
@lucamug
lucamug / main.03.elm
Created April 29, 2017 09:08
Tutorial - How to recycle in Elm
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Array
type alias Product =
{ name : String
module Main exposing (main)
import Element exposing (..)
import Html exposing (Html)
foo =
(+) 3 << (+) 2
<div id="app"></div>
<script src="js/elm.v.1.js"></script>
<script>
Elm.Main.init({
node: document.getElementById("app"),
flags: {
url: "https://api.myjson.com/bins/74l63"
}
});
</script>
<div id="app">
<div v-for="product in products">
<input type="number" v-model="product.quantity">
<button @click="product.quantity += 1">
Add 1
</button>
{{ product.name }}
</div>
<p>Total Inventory: {{ totalProducts }}</p>
<p>Quantities: {{products.map(function(p){return p.quantity})}}</p>