Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
steveklabnik / README.md
Last active February 6, 2025 22:16
An {#trycmdinclude} for mdbook (based on work by @bryceberger)

This is a little thing I put together to let you write mdbooks where you can test the output of CLI code examples with trycmd.

I've provided an example .trycmd, mdbook chapter page, and the mdbook plugin. Please note that the example .trycmd has a bunch of odd stuff in it; I'm using this for a jj tutorial, and you need to do certain things to ensure reproducibility there.

I'm not making this into a github repo yet because there's a few caveats and i want you to understand them before you give it a go:

  1. this, like trycmd generally, executes whatever you tell it to in a tempdir. Don't try to colorize the output of rm -rf / --no-preserve-root and then get mad at me.
  2. my code is bad. i put it together last night and this morning. no error handling, debug lines still in there, i didn't even run rustfmt or clippy.
  3. unlike {#include in rustdoc, the syntax highlighting can add lines, so the lines don't correspond to the .trycmd directly. It'll take some trial and error to get them right.
  4. other c
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active April 26, 2025 02:08
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@MSFTserver
MSFTserver / disco_v5_plus_Win_Install.md
Last active June 25, 2023 02:13
guide to installing disco v5+ locally on windows

Install Disco Diffusion v5 for Windows

NOTE: Pytorch3d no longer has to be compiled i have stripped out the function we use to make this a lot easier and also so we do not have to use WSL2 with linux and can now run directly on your windows system.

Comments section is not checked often for issues please join the disco diffusion discord for assistance

https://discord.gg/mK4AneuycS

You may now use the official disco diffusion notebook with this tutorial as it has been uodated to reflect the changes here for better cross platform support

@ChrisShank
ChrisShank / xstate-routing.js
Created October 19, 2021 00:32
My *current* approach to handling routing with xstate
/**
This gist is more or less pseudocode for how I think we should deal with routing.
The largest problem with routing is that is permates *all* layers of an application (business logic, rendering, ect.)
and most routing library to be an all in one solution to this problem. As a result routing libraries are becoming more like
state management libraries than routing libraries. I recommend that we break routing into three distinct concerns:
1. Application-specific routing logic
- Use any state management tool you want, xstate is a good fit here
2. Serializing/deserializing the URL
- Deals specifically with interacting with the broswers History API and extracting data from the URL
@tallguyjenks
tallguyjenks / obsidian.md
Last active December 9, 2024 00:03
My custom theme for the Obsidian Editor

To get a copy of my most up to date custom CSS sign up to my monthly newsletter [[HERE]] Thank you! 🙏🏻️

use futures::{
future::{Future, IntoFuture},
sync::oneshot,
};
use std::{
collections::VecDeque,
sync::{Arc, Mutex},
};
struct Inner<T> {
@Hotell
Hotell / cra-2-ts-css-modules-guide.md
Last active March 25, 2022 16:07
typed css-modules - CRA 2.0

CRA 2.x + TS setup:

This will give you complete intellisense and type safety within your app and CSS modules

typesafe-css-modules

🚨 NOTE

  • refactoring className from ts file wont update your css/scss className, to change class names you have to change it within your .module.scss file
@yelouafi
yelouafi / algebraic-effects-series-1.md
Last active April 17, 2025 05:09
Operational Introduction to Algebraic Effects and Continuations

Algebraic Effects in JavaScript part 1 - continuations and control transfer

This is the first post of a series about Algebraic Effects and Handlers.

There are 2 ways to approach this topic:

  • Denotational: explain Algebraic Effects in terms of their meaning in mathematics/Category theory
  • Operational: explain the mechanic of Algebraic Effects by showing how they operate under a chosen runtime environment

Both approaches are valuables and give different insights on the topic. However, not everyone (including me), has the prerequisites to grasp the concepts of Category theory and Abstract Algebra. On the other hand, the operational approach is accessible to a much wider audience of programmers even if it doesn't provide the full picture.

@esmevane
esmevane / README.md
Last active January 26, 2018 15:35
[ Markdown / React / Front-end / Components ]: Interesting React & Front-end libs