- Create an app following the official Shadow-CLJS Quick Start instructions.
- Modify
shadow-cljs.edn
;; shadow-cljs configuration
{:source-paths
["src/dev"
"src/main"
"src/test"]
;; ADD - CIDER middleware for nREPL (required by fireplace.vim)
RELEASE_TYPE ?= patch | |
LATEST_TAG ?= $(shell git ls-remote -q --tags --sort=-v:refname | head -n1 | awk '{ print $2 }' | sed 's/refs\/tags\///g') | |
LATEST_SHA ?= $(shell git rev-parse origin/main) | |
NEW_TAG ?= $(shell docker run -it --rm alpine/semver semver -c -i $(RELEASE_TYPE) $(LATEST_TAG)) | |
release: | |
git tag "v$(NEW_TAG)" $(LATEST_SHA) | |
git push origin "v$(NEW_TAG)" |
shadow-cljs.edn
;; shadow-cljs configuration
{:source-paths
["src/dev"
"src/main"
"src/test"]
;; ADD - CIDER middleware for nREPL (required by fireplace.vim)
Using example.com as the input domain, this module will:
module Combinators | |
// These are basic combinators that work with ASP.NET HttpContext. | |
// Feel free to add your own. | |
// | |
// most of this adapted from Giraffe v0.1.0-alpha025 | |
// https://github.com/dustinmoris/Giraffe/blob/v0.1.0-alpha025/src/Giraffe/HttpHandlers.fs | |
// Some combinators adapted from Suave | |
// https://github.com/SuaveIO/suave | |
// Both projects are Apache 2.0 Licensed |
module Tuple2 | |
let replicate x = x, x | |
let curry f x y = f (x, y) | |
let uncurry f (x, y) = f x y | |
let swap (x, y) = (y, x) |
;; React supports "refs" as a way for a component to get a | |
;; handle to its children. Classically, refs were string-based. | |
;; Recent versions of React support callback attributes as a | |
;; more elegant variant of accessing DOM notes or components. | |
;; | |
;; This example uses a Form-3 component as per | |
;; https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components | |
;; | |
;; For callback refs, see React's documentation | |
;; https://facebook.github.io/react/docs/more-about-refs.html |
[12:03 AM] acemarke: "controlled" and "uncontrolled" inputs
[12:04 AM] acemarke: if I have a plain, normal HTML page, and I put <input id="myTextbox" type="text" />
in my page(edited)
[12:04 AM] acemarke: and I start typing into that textbox
[12:04 AM] acemarke: it remembers what I've typed. The browser stores the current value for that input
[12:05 AM] acemarke: and then sometime later, I can get the actual element, say, const input = document.getElementById("myTextbox")
, and I can ask it for its value: const currentText = input.value;
[12:05 AM] acemarke: good so far?
[12:08 AM] acemarke: I'll keep going, and let me know if you have questions
[12:08 AM] lozio: ok, actually I'm reading
[12:09 AM] lozio: good
[12:09 AM] acemarke: so, a normal HTML input field effectively stores its own value at all times, and you can get the element and ask for its value
static class AsyncResultExtensions | |
{ | |
//added to chain awaitable methods | |
public static async Task<Result<TResult>> OnSuccessAsync<T, TResult>(this Result<T> result, Func<T, Task<Result<TResult>>> func) | |
{ | |
var res = result; | |
if (res.Failed) | |
return Result<TResult>.Fail(res.Error); | |
return await func(res.Value); |
In Terminal
mkdir ~/.bash
Copy the raw git-prompt.sh
file from git contrib in to the ~/.bash
directory: https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh
Inside ~/.bashrc
or ~/.bash_profile
(choose the file where you normally put any bash customizations/setup), add the lines: