- East coast (NY, Washington),
- Midwest (Chicago, Mount Rushmore)
- West coast (Los Angeles, San Francisco)
- Nevada (Las Vegas, Grand Canyon)
- Floria (Miami)
- Cuba
- Mexico
const allCustomElements = []; | |
function isCustomElement(el) { | |
const isAttr = el.getAttribute('is'); | |
// Check for <super-button> and <button is="super-button">. | |
return el.localName.includes('-') || isAttr && isAttr.includes('-'); | |
} | |
function findAllCustomElements(nodes) { | |
for (let i = 0, el; el = nodes[i]; ++i) { |
https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html
If variable is defined on stack then it won't move:
let x = 5;
let y = x;
Observe the galaxy above your head and the soil beneath your feet. Thus found the law of nature. - "I Ching, Xi Ci, Part 1"
Similar voices make an echo, similar souls make a strong bond. - "I Ching, Qian, Wenyan"
A noble one suppresses evil and promotes good, in harmony with the will of Heaven. - "Book of Changes, Great Possession"
Understanding the discussion of life and death. - "I Ching, Xi Ci, Part 1"
#!/bin/bash | |
# https://www.haproxy.com/blog/how-to-run-haproxy-with-docker/ | |
docker pull haproxy | |
docker pull jmalloc/echo-server | |
docker network create --driver=bridge mynetwork | |
docker run -d --name web1 --net mynetwork jmalloc/echo-server:latest | |
docker run -d --name web2 --net mynetwork jmalloc/echo-server:latest | |
docker run -d --name web3 --net mynetwork jmalloc/echo-server:latest |
use std::io; | |
use rand::Rng; | |
fn guess_number() -> i32 { | |
let mut guess = String::new(); | |
println!("What is your guess?"); | |
io::stdin().read_line(&mut guess).expect("Could not read line"); | |
return match guess.trim().parse() { | |
Ok(n) => n, | |
Err(_e) => { |
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: openebs-lvmpv | |
allowVolumeExpansion: true | |
parameters: | |
storage: "lvm" | |
volgroup: "vg0" | |
reclaimPolicy: Retain | |
volumeBindingMode: WaitForFirstConsumer |
(* http://alaska-kamtchatka.blogspot.com/2012/07/theorems-for-free-monad-edition.html *) | |
module type FUNCTOR = sig | |
type 'a t | |
val fmap : ('a -> 'b) -> ('a t -> 'b t) | |
end | |
module type APPLICATIVE = sig | |
type 'a t | |
val pure : 'a -> 'a t |
(executable | |
(name main) | |
(preprocess (pps ppx_deriving.show))) |