Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Paulo Coghi paulocoghi

🎯
Focusing
View GitHub Profile
@paulocoghi
paulocoghi / HAR.js
Created Feb 4, 2020
cdnjs.com's HAR with HTTP/3 enabled
View HAR.js
This file has been truncated, but you can view the full file.
{
"log": {
"version": "1.2",
"creator": {
"name": "Firefox",
"version": "72.0.1"
},
"browser": {
"name": "Firefox",
@paulocoghi
paulocoghi / App.html
Last active Mar 28, 2018
Multiple components and store variables ($)
View App.html
<InputAdd></InputAdd>
<List></List>
<script>
import InputAdd from './InputAdd.html'
import List from './List.html'
import { Store } from 'svelte/store.js';
@paulocoghi
paulocoghi / App.html
Created Mar 22, 2018
Using #each blocks with store ($) variables defined in runtime
View App.html
<input bind:value='newTodo' placeholder='buy milk'>
<button on:click='push("$todos", newTodo)'>add todo</button>
<ul>
{{#each $todos as todo, i}}
<li>
<button on:click='splice("$todos", i, 1)'>x</button>
{{todo}}
</li>
{{/each}}
@paulocoghi
paulocoghi / App.html
Created Mar 22, 2018
Using #each blocks with early defined variables (in data)
View App.html
<input bind:value='newTodo' placeholder='buy milk'>
<button on:click='push("todos", newTodo)'>add todo</button>
<ul>
{{#each todos as todo, i}}
<li>
<button on:click='splice("todos", i, 1)'>x</button>
{{todo}}
</li>
{{/each}}
@paulocoghi
paulocoghi / App.html
Last active Mar 22, 2018
Using #each blocks with variables defined in runtime
View App.html
<input bind:value='newTodo' placeholder='buy milk'>
<button on:click='push("todos", newTodo)'>add todo</button>
<ul>
{{#each todos as todo, i}}
<li>
<button on:click='splice("todos", i, 1)'>x</button>
{{todo}}
</li>
{{/each}}
@paulocoghi
paulocoghi / App.html
Last active Mar 28, 2018
Without multiple sub-components and store variables, everything works
View App.html
<input bind:value='newTodo' placeholder='buy milk'>
<button on:click='push("$todos", newTodo)'>add todo</button>
<ul>
{{#each ( $todos || [] ) as todo, i}}
<li>
<button on:click='splice("$todos", i, 1)'>x</button>
{{todo}}
</li>
{{/each}}
View ractive-decorators-bootstrap-select.js
/*
ractive-decorators-bootstrap-select
=============================================
Integrate Ractive with Bootstrap Select
==========================
Usage: Include this file on your page below Ractive, e.g: