Skip to content

Instantly share code, notes, and snippets.

View doitian's full-sized avatar
🎯
Focusing

ian doitian

🎯
Focusing
View GitHub Profile
@doitian
doitian / analogy-between-list-of-vectors-and-list-of-subspaces.md
Last active November 20, 2025 00:36
List of Vectors vs List of Subspaces

This query asks for a comparison between a list of vectors and a list of subspaces based on the concepts established in the sources, particularly regarding properties like span, linear independence, and basis.

Both lists of vectors and lists of subspaces are fundamental building blocks used to describe and structure a vector space $V$. They share analogies rooted in set theory, especially concerning how they generate or combine to form larger structures, but they differ fundamentally in the nature of their elements.

Here is a comparison based on the source material:

1. Fundamental Nature of Elements

Feature List of Vectors ($v_1, \dots, v_m$) List of Subspaces ($V_1, \dots, V_m$)
@doitian
doitian / ractor-fsm.rs
Created November 17, 2025 11:26
Ractor FSM
#[derive(Debug, Clone)]
enum ConnectionState {
Disconnected,
Connecting { attempts: u32 },
Connected { session_id: String },
Reconnecting { last_session: String },
}
enum FSMMessage {
Connect,
#!/bin/bash
# Script to delete AWS Glacier archives with retry logic and resume functionality
# Usage: ./delete-glacier-archives.sh [resume_archive_id]
#
# The script reads archive IDs from the provided file and deletes them one by one
# If an archive deletion fails, it prints the error and retries
# The script can resume from a specific archive ID if provided as an argument
set -euo pipefail
@doitian
doitian / git
Created June 21, 2024 01:51
git shim for WSL
#!/bin/bash
# Check if the current directory starts with /mnt/
if pwd -P | grep -q "^/mnt/"; then
# Use git.exe for directories under /mnt/
exec git.exe "$@"
else
# Use /usr/bin/git for other directories
exec /usr/bin/git "$@"
fi
This file has been truncated, but you can view the full file.
"use strict";
var obsidian = require("obsidian");
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
#!/bin/bash
# Start Python REPL and setup rich
# https://rich.readthedocs.io/en/latest/introduction.html#rich-in-the-repl
""":"
PYTHON=${PYTHON:-python}
if command -v python3 &>/dev/null; then
PYTHON=python3
fi
import base64
from Crypto.Hash import SHA256
from Crypto.PublicKey import ECC
from Crypto.Signature import DSS
from Crypto.Util.asn1 import DerSequence
response = {
"signature": "MEUCICF25qdO6nLreEoBHnyaw-9R6XFHbIu-NwsAI53t016qAiEAgmhlwTEMxoWx"
"Kj79R1rUkB_6nrhJfws82DqHkY_HnqQ",
{
"openrpc": "1.0.0-rc1",
"info": {
"version": "1.0.0",
"title": "Petstore",
"license": {
"name": "MIT"
}
},
"servers": [
@doitian
doitian / settings.json
Created September 1, 2023 02:38
vscode settings
{
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
@doitian
doitian / input.js
Last active August 11, 2023 03:31
Obisidian CustomJS module to ask for user input
class Input {
PromptModal = class extends customJS.obsidian.Modal {
title = "Input";
value = "";
submitted = false;
placeholder = "Type text here";
constructor(opts = {}) {
super(app);
Object.assign(this, opts);