This file contains hidden or 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
import React, { useReducer } from "react"; | |
import { messages, initialMessagesState } from "./slices/messages"; | |
const App: React.FC = () => { | |
const [messageList, dispatch] = useReducer( | |
messages.reducer, | |
initialMessagesState | |
); | |
return ( |
This file contains hidden or 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
type User = { name: string, email: string } | |
type Admin = { name: string, role: string } | |
// Let's say hi to a user! | |
const greet1 = (u: User) => console.log(`Hi, ${u.name}`) | |
// What if we want to greet an Admin though... We can't re-use this | |
// What about taking a page out of C#'s book and use an interface? | |
interface INamed { name: string } |
This file contains hidden or 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
import React, { ChangeEvent } from "react"; | |
import "./App.css"; | |
import { RecoilRoot, atom, useRecoilState } from "recoil"; | |
const useRecoilReducer = <S, A>( | |
reducer: (s: S, a: A) => S, | |
recoilState: any | |
) => { | |
const [state, setState] = useRecoilState(recoilState); | |
const dispatch = (a: A) => { |
This file contains hidden or 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
module Sketch | |
type Step = | |
| VSI | |
| BusinessAddress | |
| Offer | |
| AccountHolder | |
| BusinessDetails | |
| Identity | |
| Concessions |
This file contains hidden or 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
(ns cursive-test.core | |
(:require [clj-http.client :as client]) | |
(:require [clojure.core.async :as async])) | |
; setup async pipelines | |
(def publisher (async/chan)) | |
(def publication | |
(async/pub publisher #(:topic %))) |
This file contains hidden or 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 contains-in? | |
[m ks] | |
(not= ::absent (get-in m ks ::absent))) | |
(defn update-in-if-contains | |
[m ks f & args] | |
(if (contains-in? m ks) | |
(apply (partial update-in m ks f) args) | |
m)) |
This file contains hidden or 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
# run `lein uberjar` before releasing | |
echo "preparing..." | |
mkdir -p ./dist/js | |
mkdir -p ./dist/css | |
mkdir -p ./dist/assets | |
echo "copying files..." | |
cp ./target/cljsbuild/public/js/app.js ./dist/js/app.js | |
cp -r ./resources/public/css ./dist |
This file contains hidden or 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
public static class ExampleUse { | |
public static void Example(ObjectPoolingSystem pool) { | |
pool.Get(ObjectPoolType.SelectFx, fx => { | |
fx.transform.position = new Vector3(1, 1, 1); | |
}); | |
} | |
} |
This file contains hidden or 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
I am attesting that this GitHub handle bfollington is linked to the Tezos account tz1XHjbFVsAqp1J2gS9wbMXXMTv1cbh4F915 for tzprofiles | |
sig:edsigtwzLSLDr9RMKL4ZiKHp1hWgZ9ix9DvBWWF934p4RhYjcGenFgbnrGM7grWK5qXysPv9onXRzAeXBtVPXVRdTHod4td52hX |
This file contains hidden or 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
import calendar | |
from datetime import datetime, timedelta | |
from pathlib import Path | |
import platform | |
def create_ascii_art_grid(): | |
# Get the current year | |
current_year = datetime.now().year | |
start_date = datetime(current_year, 1, 1).date() # Convert to date | |
end_date = datetime(current_year, 12, 31).date() # Convert to date |