This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
View | |
Action | |
Binder | |
# Responsible for binding Selectors to properties of the View | |
selectDerivedState -> State | |
State | |
selectedValue -> View |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Tiny video-player</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> | |
<link rel="stylesheet" href="video.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.min.js"></script> | |
<script defer src="video.js"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'ivy) | |
(require 'macros) | |
(require 'outshine) | |
(provide 'outline-ivy) | |
;;; Config | |
(defvar oi-height 20 | |
"Number of outlines to display, overrides ivy-height.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn find-in | |
"Find all of the keys & indices of the [tree] that leads to the | |
value of [s]earch" | |
[tree s] | |
(some | |
(fn [[k v]] | |
(cond | |
(= v s) [k] | |
(map? v) (if-let [r (find-in v s)] | |
(into [k] r)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn log | |
"Log all inputs to console or REPL, the input is returned for further manipulation" | |
[& in] | |
(do | |
(apply #?(:clj println :cljs js/console.log) in) | |
in)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> | |
<link rel="stylesheet" href="./slideshow.css"> | |
<title>Slideshow</title> | |
</head> | |
<body> | |
<div class="slideshow"> | |
<img src="https://files.slack.com/files-pri/T0DB7B8US-F2TTMTJG6/toppbilde_10mot2020_1920x400_06.jpg?pub_secret=d038f6b149"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let beer = document.querySelector('.beer'); | |
function spawnBubble() { | |
let bubble = document.createElement('span'); | |
let rand = parseInt(Math.random() * (100 - 0) - 0); | |
bubble.classList.add('bubble'); | |
bubble.classList.add('start'); | |
bubble.style.left = `${rand}%`; | |
let timer = setTimeout(() => { | |
beer.appendChild(bubble); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmethod read :lifelines/title | |
[{:keys [state]} k _] | |
{:value "Boooom!"}) | |
(defmethod read :lifelines/items | |
[{:keys [state ast] :as env} k _] | |
(let [st @state] | |
(if (contains? st k) | |
{:value (get st k)} | |
{:remote true}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Replace entity with the schema | |
{:find [...] | |
:in [...] | |
:where [...]} | |
;;; eav | |
[?e ?a ?v ?tx] | |
;;; txInstant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PS1="\[" | |
# Jobs | |
PS1+="\[$YELLOW\]\$([ \j -gt 0 ] && echo '[\j] ') \[$RESET\]" | |
# Path | |
PS1+="\[$CYAN\]\w \[$RESET\]" |