Skip to content

Instantly share code, notes, and snippets.

@madx
madx / view.css
Last active April 21, 2024 20:21
PersonCard Dataview view
.hasPersonCard h2[data-heading="Notes"] {
clear: both;
}
.k-PersonCard {
border-radius: var(--radius-l);
background-color: var(--background-modifier-hover);
border: var(--prompt-border-width) solid var(--prompt-border-color);
display: flex;
flex-direction: column;
@madx
madx / App.tsx
Last active July 29, 2022 05:58 — forked from j-bullard/App.tsx
Headless UI with React Hook Forms
import "./styles.css";
import { Person } from "./types";
import { Listbox } from "./listbox/listbox";
import { useForm } from "react-hook-form";
const people: Person[] = [
{ id: 1, name: "Durward Reynolds", unavailable: false },
{ id: 2, name: "Kenton Towne", unavailable: false },
{ id: 3, name: "Therese Wunsch", unavailable: false },
{ id: 4, name: "Benedict Kessler", unavailable: true },
@madx
madx / prezto.md
Last active March 16, 2021 14:18

prezto

Make slides from any Markdown source file URL

Press space or


You can go back with

@madx
madx / README.md
Last active August 19, 2020 01:35
Fluor 2

This is a draft of the next API for Fluor

The example is based on Alpine.js's memory card game example

The API is not final, expect a lot of things to change. It is 3:30AM I'll add more to this later, gotta get some sleep first

@madx
madx / build.js
Created August 18, 2020 08:38
A small site builder, used for Fluor's website
import fs from "fs"
import path from "path"
import util from "util"
import React from "react"
import ReactDOM from "react-dom/server"
import { Helmet } from "react-helmet"
import fastGlob from "fast-glob"
import ora from "ora"
import chalk from "chalk"
function makeAPIActions(entity) {
const path = ["entities", entity]
const EntityClass = Record({
isRequesting: false,
data: null,
error: null,
}, `Record$${entity}`)
const defaults = new EntityClass()
const actions = {
@madx
madx / gifcast.sh
Last active March 7, 2017 09:14
Quick GIF screencast recording on linux
#!/bin/bash
# Requirements:
# - byzanz-record to perform the actual screencast
# - xrectsel to be able to select which part of the screen you want to record
# - yad to display the stop button in your notification area
# - gsd-locate-pointer (optional) to be able to highlight the cursor when pressing Ctrl
# Output file name
FILE="$HOME/documents/videos/`date +%FT%T.gif`"
@madx
madx / README.md
Last active March 30, 2016 16:41
Import Rdio collection to Google Play Music using gmusicapi

Usage

$ edit pm_imported.py
Replace USER and PASS with your own credentials
$ python pm_importer.py
# Enjoy.

(Requires python3 and gmusicapi)

@madx
madx / 00_README.md
Last active December 16, 2020 08:32
A simpler alternative to the Flux/Redux pattern http://drop.madx.me/1cldht84o9e5r79j4g1jwtl6niph9pp.gif

This is my proposal for a simpler implementation of the Flux pattern (well, like Redux, it is not exactly Flux)

(The name has nothing to do with ego, it's a joke from @Uhsac :))

@madx
madx / build.js
Created October 21, 2015 09:29
Quick-n-dirty static site builder using deku
// File processing
import path from "path"
import fs from "fs"
import fmt from "chalk"
import glob from "glob"
import mkdirp from "mkdirp"
// Config
import pkg from "./package"
const {config} = pkg