<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://notepad.onghu.com/</id><title>Notepad.ONGHU</title><subtitle>A blog about Ruby, Rails, Intelligent Transport, Programming, Life and other things. Written by Mohit Sindhwan.</subtitle> <updated>2024-01-26T16:38:00+08:00</updated> <author> <name>Mohit Sindhwani</name> <uri>https://notepad.onghu.com/</uri> </author><link rel="self" type="application/atom+xml" href="https://notepad.onghu.com/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://notepad.onghu.com/"/> <generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator> <rights> © 2024 Mohit Sindhwani </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>Ruby Tips 12 - Launch a Windows Application from Ruby</title><link href="https://notepad.onghu.com/2024/ruby-tips-012-launch-a-windows-cmd-from-ruby/" rel="alternate" type="text/html" title="Ruby Tips 12 - Launch a Windows Application from Ruby" /><published>2024-01-14T12:45:00+08:00</published> <updated>2024-01-14T12:45:00+08:00</updated> <id>https://notepad.onghu.com/2024/ruby-tips-012-launch-a-windows-cmd-from-ruby/</id> <content src="https://notepad.onghu.com/2024/ruby-tips-012-launch-a-windows-cmd-from-ruby/" /> <author> <name>Mohit Sindhwani</name> </author> <category term="Ruby" /> <category term="Programming" /> <category term="Tips" /> <category term="RubyOnWindows" /> <category term="Windows" /> <summary> Some times, you want to be able to launch a Windows Command file from a Ruby script. This is the easy way to do it. 1 2 h = Hash.new z = h[key] || some_default In all honesty, I wrote this because I forget these things &amp;#8211; and often end up rewriting it in application code myself. Hope you found it useful. If there are more things that you find useful to do, just add them in the comments be... </summary> </entry> <entry><title>Making Mermaid Sequence Diagrams Prettier</title><link href="https://notepad.onghu.com/2024/making-mermaid-sequence-diagrams-prettier/" rel="alternate" type="text/html" title="Making Mermaid Sequence Diagrams Prettier" /><published>2024-01-12T23:15:00+08:00</published> <updated>2024-01-12T23:15:00+08:00</updated> <id>https://notepad.onghu.com/2024/making-mermaid-sequence-diagrams-prettier/</id> <content src="https://notepad.onghu.com/2024/making-mermaid-sequence-diagrams-prettier/" /> <author> <name>Mohit Sindhwani</name> </author> <category term="DiagramsAsCode" /> <category term="Mermaid" /> <summary> I like Mermaid but I find the rendered diagrams do not look at pretty as some of the other tools, so I set out to find out more on how the diagrams could be styled to look different. In this post, I summarise my findings and approach for styling sequence diagrams (the diagram that I want to use the most). Themes and styles Let&amp;#8217;s start by taking a very simple sequence that we will use for ... </summary> </entry> <entry><title>Rendering Structurizr in Jekyll</title><link href="https://notepad.onghu.com/2024/using-structurizr-in-a-textile-post-jekyll/" rel="alternate" type="text/html" title="Rendering Structurizr in Jekyll" /><published>2024-01-10T13:15:00+08:00</published> <updated>2024-01-10T13:15:00+08:00</updated> <id>https://notepad.onghu.com/2024/using-structurizr-in-a-textile-post-jekyll/</id> <content src="https://notepad.onghu.com/2024/using-structurizr-in-a-textile-post-jekyll/" /> <author> <name>Mohit Sindhwani</name> </author> <category term="DiagramsAsCode" /> <category term="Structurizr" /> <summary> Recently, I have taken a lot of interest in using C4 models for architecture, specifically using Structurizr to model architecture using C4 models and rendering the diagrams interactively. This post covers how to add Structurizr UI to a Jekyll site. I&amp;#8217;m using Textile markup but the instructions will work also for Markdown pages. There are a few main things we need to do: Get the UI pack... </summary> </entry> <entry><title>Ruby Learning by Reversing: Native Gems, Part 7</title><link href="https://notepad.onghu.com/2024/learning-by-reversing-s1-e7-native-gems/" rel="alternate" type="text/html" title="Ruby Learning by Reversing: Native Gems, Part 7" /><published>2024-01-08T13:00:00+08:00</published> <updated>2024-01-08T13:00:00+08:00</updated> <id>https://notepad.onghu.com/2024/learning-by-reversing-s1-e7-native-gems/</id> <content src="https://notepad.onghu.com/2024/learning-by-reversing-s1-e7-native-gems/" /> <author> <name>Mohit Sindhwani</name> </author> <category term="Ruby" /> <category term="Programming" /> <category term="Tricks" /> <category term="RubyOnWindows" /> <category term="Gems" /> <summary> The first series of Learning by Reversing examines a Ruby native gem to understand how it works. Part 7 examines how native code is documented. Previously, in this series, we have had: Part 1 &amp;#8211; Background to the gem we are looking at (including installing, changing and rebuilding it) Part 2 &amp;#8211; How a native gem is loaded Part 3 &amp;#8211; How the files get packaged so that the native... </summary> </entry> <entry><title>Escaping Liquid Tags in Jekyll</title><link href="https://notepad.onghu.com/2023/escaping-liquid-tags-in-jekyll/" rel="alternate" type="text/html" title="Escaping Liquid Tags in Jekyll" /><published>2023-12-30T23:15:00+08:00</published> <updated>2023-12-30T23:15:00+08:00</updated> <id>https://notepad.onghu.com/2023/escaping-liquid-tags-in-jekyll/</id> <content src="https://notepad.onghu.com/2023/escaping-liquid-tags-in-jekyll/" /> <author> <name>Mohit Sindhwani</name> </author> <category term="Jekyll" /> <summary> If you need to show a piece of Liquid markup in a code sample in Jekyll, you need to escape it. The way to do it is to enclose it within another tag raw and then end that with endraw so that it is not interpreted as tags. For example, you can see that the Liquid tags on Lines 2 and 4 are shown when we use it as below. {% if page.mermaid %} ... the rest of the Javascript code from above ... {... </summary> </entry> </feed>
