- Install https://github.com/michaellw/Obsidian-Canvas-Style-Menu into your vault
- Copy mindmap_helpers.json to
vault/.obsidian/plugins/canvas-style-menu/packages/mindmap_helpers.json
- Copy mindmap_helpers.css to `vault/.obsidian/snippets
- Enable "Mindmap Helpers" in Canvas Style Menu settings
- Enable snippets in Appearance settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adapted from https://gitlab.com/manzhara157/nanobelts/-/blob/main/example.pas | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"math" | |
"os" | |
"strconv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# translated from https://gitlab.com/manzhara157/nanobelts/-/blob/main/example.pas | |
import math | |
import os | |
import numpy | |
from contextlib import suppress | |
def clean_files(): | |
with suppress(FileNotFoundError): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# translated from https://gitlab.com/manzhara157/nanobelts/-/blob/main/example.pas | |
import array | |
import math | |
import random | |
import os | |
from contextlib import suppress | |
n0 = 200000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The goal: swap White and Black knights: | |
+-+ | |
A |W| | |
+-+-+ | |
B | | | | |
+-+-+-+ | |
C | |W| | | |
+-+-+-+-+ | |
D |B| |B| | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max_precise = 10 ** Float::DIG | |
last_best = 10 | |
2.upto(256) do |base| | |
total = base | |
bits = 0 | |
power2 = 1 | |
chars = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
canvas = JSON.parse(STDIN.read, symbolize_names: true) | |
all_ids = canvas[:nodes].map { |n| n[:id] } | |
dest_ids = canvas[:edges].map {|e| e[:toNode] }.uniq | |
root_ids = all_ids - dest_ids | |
nodes_by_id = canvas[:nodes].to_h {|n| [n[:id],n] } | |
graph = canvas[:edges].group_by {|e| e[:fromNode] }.transform_values { |vv| vv.map {|v| v[:toNode] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct PickleString { | |
u32 length; | |
char16 chars[length]; | |
char16 zeroChar; | |
}; | |
struct PickleEntry { | |
PickleString key; | |
PickleString value; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby lines_to_canvas.rb <items.txt >items.canvas | |
require 'random/formatter' | |
require 'json' | |
nodegap = 10 | |
nodewidth = 300 | |
nodeheight = 60 | |
list = STDIN.readlines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"runtime" | |
) | |
func main() { | |
var stats runtime.MemStats |
NewerOlder