Skip to content

Instantly share code, notes, and snippets.

@benmerckx
benmerckx / index.js
Last active March 4, 2020 21:58
devd-bin
var binwrap = require("binwrap");
var path = require("path");
var packageInfo = require(path.join(__dirname, "package.json"));
var version = packageInfo.version.split('.').slice(0, 2).join('.');
var root = "https://dl.bintray.com/benmerckx/devd/devd-" + version;
module.exports = binwrap({
dirname: __dirname,
binaries: [
import haxe.DynamicAccess;
using Reflect;
@:forward
abstract Merge<A: {}, B: {}>(B) {
public function new(a: A, b: B) {
final res: DynamicAccess<Dynamic> = cast {};
for (field in a.fields()) res[field] = a.field(field);
for (field in b.fields()) res[field] = b.field(field);
import {view} from './jotai-view'
import {atom} from 'jotai'
const countAtom = atom(0)
const Counter = view((props, get, set) => {
return (
<button onClick={() => set(countAtom, get(countAtom) + 1)}>
count is {get(countAtom)}
</button>
import {Atom, useStore} from 'jotai'
import {useCallback, useEffect, useReducer, useRef} from 'react'
/*
const countAtom = atom(0)
function Counter() {
const [get, set] = useJotai()
return (
<button onClick={() => set(countAtom, get(countAtom) + 1)}>
count is {get(countAtom)}
@benmerckx
benmerckx / drizzle-rado.txt
Last active August 23, 2024 08:34
drizzle-rado
:: drizzle
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
execution: local
script: bench.js