Skip to content

Instantly share code, notes, and snippets.

@ds604
ds604 / README.md
Created January 20, 2018 01:36 — forked from kohyama/README.md
A minimum setting to use browser REPL of ClojureScript

A minimum setting to use browser REPL of ClojureScript

Assumed that you have set leiningen up and can use it.

1. Prepare files

Copy project.clj, repl-test.cljs and brepl-test.html from this gist or git clone this gist and move or copy repl-test.cljs under src directory.

$ git clone https://gist.github.com/6183122.git
$ cd 6183122/
@ds604
ds604 / core.cljs
Created January 25, 2018 00:42 — forked from ChillyBwoy/core.cljs
Simple particles in ClojureScript
(ns particles.core)
(def display (.getElementById js/document "display"))
(def context (.getContext display "2d"))
(def damping 0.999)
(def max-particles 250)
(def line-width 2)
(def app-state (atom {:width (.-innerWidth js/window)
:height (.-innerHeight js/window)}))
from skimage import data
import matplotlib.pyplot as plt
import numpy as np
image = data.camera()
fig, (ax_jet, ax_gray) = plt.subplots(ncols=2, figsize=(10,5))
ax_jet.imshow(image, cmap='jet')
ax_gray.imshow(image, cmap='gray')
plt.show()
@ds604
ds604 / index.html
Created October 27, 2018 22:34
Quill Playground
<div id="editor-container">
</div>
@ds604
ds604 / index.html
Created October 27, 2018 22:42
Rich Text Editor - Draft.js example
<!--
Source https://github.com/facebook/draft-js/tree/master/examples/draft-0-10-0/rich
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Draft • Rich Text</title>
<style>
#target { width: 600px; }
@ds604
ds604 / counter.markdown
Created October 29, 2018 10:42
Counter
@ds604
ds604 / bouncing-ball.markdown
Created November 13, 2018 12:02
Bouncing Ball
@ds604
ds604 / README.md
Created April 1, 2020 07:00
SCRIPT-8
@ds604
ds604 / README.md
Created April 3, 2020 08:25
SCRIPT-8

Import CustomElements from .html files

This is the technical implementation of the idea and concept described in my article “Why don’t we use HTML to author web components?

Instead of using template literals, constructors and other specifics to define CustomElements, this is a proposal to just use standard HTML to define CustomElements.

The goal is to import CustomElements like this: