<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code on JOURNAL.ROBBI.MY</title><link>https://journal.robbi.my/tags/code/</link><description>Recent content in Code on JOURNAL.ROBBI.MY</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 30 Jun 2026 03:01:59 +0000</lastBuildDate><atom:link href="https://journal.robbi.my/tags/code/index.xml" rel="self" type="application/rss+xml"/><item><title>DX Code of Conduct</title><link>https://journal.robbi.my/indieweb/240702123456/</link><pubDate>Tue, 02 Jul 2024 12:34:56 +0800</pubDate><guid>https://journal.robbi.my/indieweb/240702123456/</guid><description>&lt;h1 id="dx-code-of-conduct"&gt;DX Code of Conduct&lt;/h1&gt;
&lt;p&gt;As a reference for myself, and for all those engaged in amateur radio, here is a copy of the DX code of conduct. You are encouraged to copy it wherever you like. To make things clearer, I numbered each rule of conduct and highlighted the most important parts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I will listen, and listen, and then listen again before calling.&lt;/li&gt;
&lt;li&gt;I will only call, if I can copy the DX station properly.&lt;/li&gt;
&lt;li&gt;I will not trust the DX cluster and will be sure of the DX station’s call sign before calling.&lt;/li&gt;
&lt;li&gt;I will not interfere with the DX station nor anyone calling and will never tune up on the DX frequency or in the QSX slot.&lt;/li&gt;
&lt;li&gt;I will wait for the DX station to end a contact before I call.&lt;/li&gt;
&lt;li&gt;I will always send my full call sign.&lt;/li&gt;
&lt;li&gt;I will call and then listen for a reasonable interval. I will not call continuously.&lt;/li&gt;
&lt;li&gt;I will not transmit when the DX operator calls another call sign, not mine.&lt;/li&gt;
&lt;li&gt;I will not transmit when the DX operator queries a call sign not like mine.&lt;/li&gt;
&lt;li&gt;I will not transmit when the DX station requests geographic areas other than mine.&lt;/li&gt;
&lt;li&gt;When the DX operator calls me, I will not repeat my call sign unless I think he has copied it incorrectly.&lt;/li&gt;
&lt;li&gt;I will be thankful if and when I do make a contact.&lt;/li&gt;
&lt;li&gt;I will respect my fellow hams and conduct myself so as to earn their respect.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mirror:&lt;/p&gt;</description></item><item><title>23 11 15 1003_test Again Reality</title><link>https://journal.robbi.my/indieweb/231115100323/</link><pubDate>Wed, 15 Nov 2023 10:03:23 +0800</pubDate><guid>https://journal.robbi.my/indieweb/231115100323/</guid><description>&lt;p&gt;Mirror:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://archive.ph/jOA4J"&gt;https://archive.ph/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web.archive.org/web/20231115020551/https://borretti.me/article/test-against-reality"&gt;https://web.archive.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Python 🐍 - active screen cursor movement</title><link>https://journal.robbi.my/posts/230303011110/</link><pubDate>Fri, 03 Mar 2023 13:11:10 +0800</pubDate><guid>https://journal.robbi.my/posts/230303011110/</guid><description>&lt;p&gt;Sometimes, I need to let the computer running so I can monitor &lt;code&gt;logs&lt;/code&gt; or make some application not goes to sleep.
So I use this python script to make random mouse movement and pressing some keyboard stroke on some interval of time.&lt;/p&gt;
&lt;div class="code-block"&gt;
 &lt;div class="code-header font-mono"&gt;
 &lt;span class="code-lang"&gt;python&lt;/span&gt;
 &lt;div class="code-window-controls"&gt;
 &lt;button class="code-copy" onclick="copyCode(this)" title="Copy to clipboard"&gt;📋 Copy&lt;/button&gt;
 &lt;span class="ctrl-min"&gt;&lt;/span&gt;
 &lt;span class="ctrl-max"&gt;&lt;/span&gt;
 &lt;span class="ctrl-close"&gt;&lt;/span&gt;
 &lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="code-content"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; time &lt;span style="color:#ff79c6"&gt;as&lt;/span&gt; t
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; random &lt;span style="color:#ff79c6"&gt;as&lt;/span&gt; rand
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;from&lt;/span&gt; pynput.mouse &lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; Controller &lt;span style="color:#ff79c6"&gt;as&lt;/span&gt; mouseController
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;from&lt;/span&gt; pynput.keyboard &lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; Key, Controller, Listener
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; keyboard &lt;span style="color:#ff79c6"&gt;as&lt;/span&gt; keyb
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# This function will move the cursor and &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# press &amp;#39;space&amp;#39; every couple of seconds&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;def&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;active_cursor_mover&lt;/span&gt;():
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; start &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; t&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;time()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; mouse &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; mouseController()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; keyboard &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; Controller()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;while&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;True&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#6272a4"&gt;# Random movements&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; movedirX &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; rand&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;randint(&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt;&lt;span style="color:#bd93f9"&gt;100&lt;/span&gt;, &lt;span style="color:#bd93f9"&gt;100&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; movedirY &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; rand&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;randint(&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt;&lt;span style="color:#bd93f9"&gt;100&lt;/span&gt;, &lt;span style="color:#bd93f9"&gt;100&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; mouse&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;move(movedirX, movedirY)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; keyboard&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;press(Key&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;space)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#6272a4"&gt;# Every _ seconds&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; t&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;sleep(&lt;span style="color:#bd93f9"&gt;2.0&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; ((t&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;time() &lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; start) &lt;span style="color:#ff79c6"&gt;%&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;2&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;if&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;__name__&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;==&lt;/span&gt; &lt;span style="color:#f1fa8c"&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; active_cursor_mover()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You need 2 python package to make it run&lt;/p&gt;</description></item><item><title>Hugo Conversation Dialog</title><link>https://journal.robbi.my/posts/210902121740/</link><pubDate>Thu, 02 Sep 2021 12:17:40 +0800</pubDate><guid>https://journal.robbi.my/posts/210902121740/</guid><description>&lt;div class="conversation not-prose flex gap-4 my-6 items-start"&gt;
 &lt;div class="w-16 flex-shrink-0"&gt;
 &lt;img src="https://journal.robbi.my/img/optimus-prime-tile.png" alt="Optimus Prime" class="w-16 h-16 rounded-lg object-cover border border-base-300" loading="lazy" /&gt;
 &lt;/div&gt;
 &lt;div class="flex-1 font-mono text-sm leading-relaxed text-base-content/80 pt-1"&gt;
 &amp;lt;&lt;strong class="text-primary font-bold"&gt;Optimus Prime&lt;/strong&gt;&amp;gt; Were we so different? They&amp;rsquo;re a young species. They have much to learn. But I&amp;rsquo;ve seen goodness in them. Freedom is the right of all sentient beings.
 &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Hello everyone.. do you see conversation dialog strip above from Optimus Prime? Well, it my new Hugo features and I really like this kind of dialog stuff. It kinda cool and nostalgic too&amp;hellip;&lt;/p&gt;</description></item><item><title>How to write issues / bug report?</title><link>https://journal.robbi.my/posts/210606100700/</link><pubDate>Sun, 06 Jun 2021 22:07:00 +0800</pubDate><guid>https://journal.robbi.my/posts/210606100700/</guid><description>&lt;p&gt;To be honest, there are many articles written before on this very subject but I gonna write it based on what I learned and experienced working with european, asian company and my involvement with opensource and proprietary software. This 5 criteria helps you getting a clear report and getting fast response.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stay cool&lt;/strong&gt; - Don’t expect all of your issue to be accepted and paid for (bug bounty?). You should report it ASAP if you found problems and collect all log, screenshot or any evidance to prove what you want to tell. You might missed something and the expertise such as developer may ask you more stuff and guide you how to get it, some won&amp;rsquo;t but please do stop youself from reporting.&lt;/p&gt;</description></item><item><title>Patching cvs files using patch manually and how to revert it</title><link>https://journal.robbi.my/posts/200922013400/</link><pubDate>Tue, 22 Sep 2020 01:34:00 +0800</pubDate><guid>https://journal.robbi.my/posts/200922013400/</guid><description>&lt;p&gt;Assalamualaikum and hello everyone!&lt;/p&gt;
&lt;p&gt;Today, I gonna put my note how to patch file using &amp;ldquo;patch&amp;rdquo; (linux utility tool). Have you using it? Well, please read &lt;a href="https://linux.die.net/man/1/patch"&gt;https://linux.die.net/man/1/patch&lt;/a&gt; if you are looking for standard manual from man pages.&lt;/p&gt;
&lt;p&gt;I know it already 2020 and yes, someone like me are still using CVS.&lt;/p&gt;
&lt;p&gt;CVS (Concurrent Version Control) is very old source code control but it still use nowadays for certain project, even BSD ports still using CVS. To be honest, I don’t like CVS but because it they only SCM (source control management) tool for certain project.&lt;/p&gt;</description></item></channel></rss>