Skip to content

Instantly share code, notes, and snippets.

@dr2050
Last active May 8, 2025 16:40
Show Gist options
  • Save dr2050/21b3d7966cc7a0c3056d0776ff7ab8dd to your computer and use it in GitHub Desktop.
Save dr2050/21b3d7966cc7a0c3056d0776ff7ab8dd to your computer and use it in GitHub Desktop.
Convert all Mermaid Markdown files (mermaid-*.md) to jpg with white background.
#!/usr/bin/env ruby
def convert_mermaid_md_to_jpg
Dir["mermaid-*.md"].each do |f|
slug = f["mermaid-".length...f.length-".md".length]
command = "~/node_modules/.bin/mmdc -i mermaid-#{slug}.md -o mermaid-#{slug}.png -b '#FFFFFF'"
puts "Converting mermaid-#{slug}.md to mermaid-#{slug}.png"
`#{command}`
end
end
if __FILE__ == $0
puts "Converts files matching mermaid-*.md to mermaid-*.png"
puts "If this fails you might need to run:"
puts "cd ~ && npm install mermaid.cli && popd"
convert_mermaid_md_to_jpg
end
@Kazerozsw
Copy link

@Kazerozsw
Copy link

@ZULFA2019
Copy link

flowchart TD
%% Define custom styles with high contrast colors
classDef mainConcept fill:#FF1493,stroke:#000,stroke-width:2px,color:white
classDef institution fill:#4169E1,stroke:#000,stroke-width:2px,color:white
classDef dynamics fill:#228B22,stroke:#000,stroke-width:2px,color:white
classDef change fill:#8B008B,stroke:#000,stroke-width:2px,color:white

LA[/"LOGIC OF APPROPRIATENESS<br>What is appropriate for<br>someone like me in this situation?"\]
class LA mainConcept

subgraph Institutions["INSTITUTIONAL FRAMEWORK"]
    direction TB
    FI["FORMAL INSTITUTIONS<br>• Laws<br>• Written Rules<br>• Official Policies"]
    II["INFORMAL INSTITUTIONS<br>• Social Norms<br>• Cultural Practices<br>• Unwritten Rules"]
end
class FI institution
class II institution

subgraph PowerDyn["POWER & AGENCY"]
    direction TB
    GP["GENDER & POWER<br>• Hierarchies<br>• Power Relations<br>• Gender Norms"]
    SA["STRUCTURE & AGENCY<br>• Individual Actions<br>• Collective Behavior<br>• Decision Making"]
end
class GP dynamics
class SA dynamics

subgraph Change["INSTITUTIONAL TRANSFORMATION"]
    direction TB
    IC["CHANGE<br>• Reforms<br>• New Practices<br>• Innovation"]
    Con["CONTINUITY<br>• Tradition<br>• Resistance<br>• Stability"]
end
class IC change
class Con change

%% Define relationships
LA --> FI & II
FI <--> II
II & FI --> GP & SA
GP <--> SA
GP & SA --> IC & Con
IC <--> Con

%% Style subgraphs
style Institutions fill:#E6E6FA,stroke:#000,stroke-width:2px
style PowerDyn fill:#E8F5E9,stroke:#000,stroke-width:2px
style Change fill:#FFE6F3,stroke:#000,stroke-width:2px

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment