Skip to content

Instantly share code, notes, and snippets.

@drmikecrowe
drmikecrowe / README.md
Last active August 11, 2024 14:30 — forked from jossef/main.py
vscode marketplace api list all extensions + download artifacts

This snippet takes your exported vscode extension list and adds the description and last updated date. Here's how I use it:

  • Export my existings to a list
  • Review that list and decide what extensions I need to clean up (delete those lines from this list)
code --list-extensions > installed.txt  
python VSCode_CSV.py  
#compdef op
compdef _op op
# zsh completion for op -*- shell-script -*-
__op_debug()
{
local file="$BASH_COMP_DEBUG_FILE"
if [[ -n ${file} ]]; then
echo "$*" >> "${file}"
@drmikecrowe
drmikecrowe / install.sh
Created June 28, 2023 08:56 — forked from mx00s/install.sh
NixOS install script based on @grahamc's "Erase Your Darlings" blog post
#!/usr/bin/env bash
#
# NixOS install script synthesized from:
#
# - Erase Your Darlings (https://grahamc.com/blog/erase-your-darlings)
# - ZFS Datasets for NixOS (https://grahamc.com/blog/nixos-on-zfs)
# - NixOS Manual (https://nixos.org/nixos/manual/)
#
# It expects the name of the block device (e.g. 'sda') to partition
TS2344: Type 'T[U]' does not satisfy the constraint '(...args: any) => any'.
Type 'T[OnlyFunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
Type 'T[T[keyof T] extends (...args: any) => any ? keyof T : never]' is not assignable to type '(...args: any) => any'.
Type 'T[keyof T]' is not assignable to type '(...args: any) => any'.
Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'.
Type 'T[string]' is not assignable to type '(...args: any) => any'.
16 | T extends Composer<never>,
17 | U extends OnlyFunctionPropertyNames<T> = OnlyFunctionPropertyNames<T>,
> 18 | > = Filter<Parameters<T[U]>, Middleware<never>>
@drmikecrowe
drmikecrowe / README.md
Last active February 1, 2024 18:02
My journaling template

I created the journals object that links a tag to a nested folder for all my journals. There are multiple issues this solves:

  • Journaling across multiple clients in different folders
  • Clicking on a link to a new journal entry that doesn't exist (see breadcrumb nested folder)
  • Client tagging

In the previous/next links, my link format is:

<< [[<% tag %>-<% tp.date.now("YYYY-MM-DD", -1) %>]] | [[<% tag %>-<% tp.date.now("YYYY-MM-DD", 1) %>]] >>
@drmikecrowe
drmikecrowe / launches.json
Last active March 4, 2022 12:14
My common launch.json config
[
{
"type": "node",
"request": "attach",
"port": 9229,
"sourceMaps": true,
"name": "Attach 9229",
"cwd": "${workspaceRoot}",
"address": "localhost",
"localRoot": "${workspaceFolder}",
@drmikecrowe
drmikecrowe / machine.js
Created September 17, 2020 09:04
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: "formModal",
initial: "closed",
states: {
closed: {
on: {
OPEN: "opened"
}
},
@drmikecrowe
drmikecrowe / machine.js
Last active September 17, 2020 01:24
Generated by XState Viz: https://xstate.js.org/viz
const PMachineOptions = {
guards: {
IS_FETCH_NEEDED: function (ctx) {
return !ctx.podcast.loaded;
},
IS_FETCHED_ALREADY: function (ctx) {
return ctx.podcast.loaded;
},
IS_SUBSCRIBE_NEEDED: function (ctx) {
return !ctx.currentDevice.isSubscribed(ctx.podcast);
@drmikecrowe
drmikecrowe / machine.js
Last active July 5, 2020 21:34
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@drmikecrowe
drmikecrowe / machine.js
Last active July 5, 2020 11:16
Generated by XState Viz: https://xstate.js.org/viz
const states = {
IDLE: 'IDLE',
SEARCHING: 'SEARCHING',
};
const searchNotEmptyTarget = {
target: states.SEARCHING,
cond: (_ctx, evt) => evt.search !== '', // && evt.search.length > 3,
actions: assign({ search: (_ctx, evt) => evt.search }),
};