copy snippets from mac

This commit is contained in:
Willem van den Ende
2025-10-10 10:21:45 +01:00
parent 934d5ecd36
commit 2bd933dced
19 changed files with 417 additions and 0 deletions
@@ -0,0 +1,19 @@
# -*- mode: snippet -*-
# name: PlantUML Sequence diagram
# key: plantuml_sequence
# --
#+begin_src plantuml :file $0.png
@startuml
skinparam {
handwritten true
monochrome true
}
$1 -> Service: message(value)
Service -> Inside
Service --> $1: success(value)
Inside --> Service: success(value)
@enduml
#+end_src
+11
View File
@@ -0,0 +1,11 @@
# key: graphviz
# name: graphviz directed graph
# --
#+begin_src dot :file ${1:file}.png :cmdline -T${2:png} :exports none :results silent
`%`$0
digraph G {
a -> b [label=" a to b"]
}
#+end_src
[[file:$1]]
+10
View File
@@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: new llm call in orgmode
# uuid:
# key: llm
# condition: t
# --
#+BEGIN_SRC bash :results verbatim
llm prompt -m mlx-community/Qwen2.5-Coder-32B-Instruct-8bit '$0'
#+END_SRC
@@ -0,0 +1,38 @@
# -*- mode: snippet -*-
# name: plantuml class and package diagram
# key: plantuml-package
# --
#+begin_src plantuml :file vending-domain-package.png
@startuml embedded-machine
skinparam {
handwritten true
monochrome true
}
package $0 {
together {
class $1 {
$2($3: $4)
}
class Display {
show_message(message: str)
}
}
class Drawer {
deliver()
}
class Button {
push()
}
class CashRegister {
insert(coins: int)
checkout(price: int)
}
Button -> Drawer
Drawer --> CashRegister
Drawer --> Bin
CashRegister --> Display
Bin --> Display
}
@enduml
#+end_src
+31
View File
@@ -0,0 +1,31 @@
# -*- mode: snippet -*-
# name: plantuml state diagram
# key: stateDiagram
# --
#+begin_src plantuml
@startuml
[*] --> CheckingValidity
CheckingValidity: is valid [[roam:JSON]]
CheckingValidity --> [*] : fail
CheckingValidity -> ParsingAllFields
state ParsingAllFields {
ParsingFields : type
ParsingFields : attributes
ParsingFields : validations
ParsingFields : messages
ParsingFields : composite
ParsingFields -> ParsingCompositeField : composite
ParsingCompositeField : recursive ParsingFields
ParsingCompositeField : validations of combined part values
ParsingFields -> ParsingField : part
}
ParsingAllFields -> FindingLinks: FormDefinition
ParsingAllFields -> [*] : fail
FindingLinks --> [*]: not found
FindingLinks : conditional show
FindingLinks : none
FindingLinks -> RenderingFields: Enriched FormDefinition
RenderingFields --> [*]: success
@enduml
#+end_src