<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>dont reinvent велосипед</title><link>https://dontreinventbicycle.com/</link><description></description><lastBuildDate>Sat, 23 Oct 2021 00:00:00 +0800</lastBuildDate><item><title>You should probably use enum flags</title><link>https://dontreinventbicycle.com/enum-flags.html</link><description>&lt;p&gt;Enum flags are a clever optimisation technique that make use of bitwise logic operations paired with &lt;a href="https://en.wikipedia.org/wiki/Enumerated_type"&gt;enumerated types&lt;/a&gt; that sadly see a lack of use in more modern codebases and languages such as JavaScript, in spite of &lt;code&gt;enum&lt;/code&gt;s being otherwise fairly popular in TypeScript.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;Guild&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Mage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Rogue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Warrior …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Sat, 23 Oct 2021 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2021-10-23:/enum-flags.html</guid><category>code</category><category>optimise</category><category>improve</category></item><item><title>4 years at Piktochart</title><link>https://dontreinventbicycle.com/piktochart.html</link><description>&lt;p&gt;On &lt;time datetime="2021-07-27"&gt;Tuesday, the 27th of July 2021&lt;/time&gt;, I served my final day at &lt;a href="https://piktochart.com/"&gt;Piktochart&lt;/a&gt;. I spent 4 years and some change at the company, joining as a JavaScript intern and leaving a DevOp &amp;amp; backend engineer for &lt;a href="https://piktostory.com/"&gt;Piktostory&lt;/a&gt;. Piktochart was my first “real” job and having spent a good part of …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Sun, 10 Oct 2021 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2021-10-10:/piktochart.html</guid><category>personal</category><category>devux</category><category>devops</category><category>javascript</category><category>typescript</category><category>rxjs</category><category>svelte</category><category>vue</category><category>firebase</category></item><item><title>installing google-cloud-sdk on apple silicon m1 (early 2021)</title><link>https://dontreinventbicycle.com/m1-gcloud-early-2021.html</link><description>&lt;p&gt;If you were to attempt to install &lt;code&gt;google-cloud-sdk&lt;/code&gt; natively (via &lt;a href="https://brew.sh/"&gt;Homebrew&lt;/a&gt;) on Apple Silicon, you'd get the following error:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$ brew install --cask google-cloud-sdk
&lt;span class="c1"&gt;# etc...&lt;/span&gt;
&lt;span class="o"&gt;==&lt;/span&gt;&amp;gt; Installing Cask google-cloud-sdk
Beginning update. This process may take several minutes.
ERROR: &lt;span class="o"&gt;(&lt;/span&gt;gcloud.components.update&lt;span class="o"&gt;)&lt;/span&gt; The following components are unknown &lt;span class="o"&gt;[&lt;/span&gt;kuberun, anthoscli&lt;span class="o"&gt;]&lt;/span&gt;.
&lt;span class="o"&gt;==&lt;/span&gt;&amp;gt; Purging files &lt;span class="k"&gt;for&lt;/span&gt; version …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Fri, 08 Jan 2021 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2021-01-08:/m1-gcloud-early-2021.html</guid><category>tips</category><category>gcloud</category><category>macos</category></item><item><title>how to fix the zsh setup on macos</title><link>https://dontreinventbicycle.com/macos-missing-zprofile.html</link><description>&lt;p&gt;Apple has defaulted macOS to using the &lt;code&gt;zsh&lt;/code&gt; shell since &lt;a href="https://support.apple.com/en-us/HT208050"&gt;macOS Catalina&lt;/a&gt;. For many, the switch (if they weren't already using &lt;code&gt;zsh&lt;/code&gt;) was as simple as running &lt;code&gt;chsh -s /bin/zsh&lt;/code&gt; and everything would appear to be working just fine.&lt;/p&gt;
&lt;p&gt;On brand new Macs however, both the &lt;code&gt;.zprofile&lt;/code&gt; and &lt;code&gt;.zshrc …&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Thu, 07 Jan 2021 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2021-01-07:/macos-missing-zprofile.html</guid><category>tips</category><category>shell</category><category>macos</category></item><item><title>how to use a valid email when signing up for Sephora</title><link>https://dontreinventbicycle.com/sephora-email-compliance.html</link><description>&lt;p&gt;&lt;em&gt;Please don't take anything in this article seriously.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gmail.com/"&gt;Gmail&lt;/a&gt;, &lt;a href="https://outlook.com/"&gt;Outlook&lt;/a&gt;, and &lt;a href="https://mail.yahoo.com/"&gt;Yahoo! Mail&lt;/a&gt; are popular options for creating incredible email addresses that will be compliant with most software and are allowed to bypass sophisticated spam filters as the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;gmail.com&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
    &lt;span class="nx"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;yahoo.com&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
    &lt;span class="nx"&gt;endsWith …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Tue, 24 Nov 2020 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2020-11-24:/sephora-email-compliance.html</guid><category>joke</category><category>javascript</category><category>php</category><category>regex</category></item><item><title>Free and open source software and GitHub</title><link>https://dontreinventbicycle.com/foss-and-github.html</link><description>&lt;p&gt;The news that &lt;a href="https://youtube-dl.org/"&gt;youtube-dl&lt;/a&gt; had been struck by DMCA takedown notice by RIAA has been circulating in many tech circles such as &lt;a href="https://news.ycombinator.com/item?id=24872911"&gt;Hacker News&lt;/a&gt;, inviting regular criticism of GitHub and the volatility of software hosting platforms. Akin to &lt;a href="https://news.ycombinator.com/item?id=17221527"&gt;when Microsoft acquired GitHub&lt;/a&gt; or when &lt;a href="https://news.ycombinator.com/item?id=20542731"&gt;GitHub banned users in Iran&lt;/a&gt; (among …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Thu, 05 Nov 2020 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2020-11-05:/foss-and-github.html</guid><category>code</category><category>hosting</category><category>git</category></item><item><title>how to migrate your GitHub repository to Codeberg</title><link>https://dontreinventbicycle.com/github-to-codeberg-howto.html</link><description>&lt;p&gt;The easiest way to migrate repositories is to simply change where your local repository remote points to. In a locally cloned repository, assert that you should have a git remote (usually named &lt;code&gt;origin&lt;/code&gt;) by running &lt;code&gt;git remote -v&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;origin&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="nv"&gt;@github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nl"&gt;com&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;origin&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="nv"&gt;@github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nl"&gt;com …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Wed, 04 Nov 2020 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2020-11-04:/github-to-codeberg-howto.html</guid><category>tips</category><category>hosting</category><category>git</category></item><item><title>rewriting "gnome screenshot locations"</title><link>https://dontreinventbicycle.com/rewriting-screenshot-locations.html</link><description>&lt;p&gt;I know I previously said that I'd follow up my &lt;a href="/rewriting-night-light.html"&gt;rewriting "night light slider"&lt;/a&gt; article with that detailing the write up of the preferences panel,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This article would be followed up by a write-up of the preferences panel rewrite&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;...but I am a true open source developer that lacks accountability …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Sun, 11 Oct 2020 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2020-10-11:/rewriting-screenshot-locations.html</guid><category>code</category><category>gnome-shell</category><category>gnome-shell-extension</category><category>gjs</category><category>gtk</category></item><item><title>rewriting "night light slider"</title><link>https://dontreinventbicycle.com/rewriting-night-light.html</link><description>&lt;p&gt;I'm the author of the &lt;a href="https://extensions.gnome.org/extension/1276/night-light-slider/"&gt;Night Light Slider extension&lt;/a&gt; for GNOME Shell. When I originally authored the extension in late 2017, my intention was to simply add a slider, kin to the brightness slider, to manage the temperature of the GNOME Shell "Night Light" feature. A couple of feature requests …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Tue, 06 Oct 2020 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2020-10-06:/rewriting-night-light.html</guid><category>code</category><category>gnome-shell</category><category>gnome-shell-extension</category><category>gjs</category><category>gtk</category></item><item><title>"debounce" in gjs</title><link>https://dontreinventbicycle.com/gjs-debounce.html</link><description>&lt;p&gt;The following code is licensed under the &lt;a href="https://www.gnu.org/licenses/lgpl-3.0.txt"&gt;GNU Lesser General Public License v3.0 or later&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cm"&gt;/* exported debounce */&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;GLib&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cm"&gt;/**&lt;/span&gt;
&lt;span class="cm"&gt; * Copyright 2020 Dafne Kiyui&lt;/span&gt;
&lt;span class="cm"&gt; *&lt;/span&gt;
&lt;span class="cm"&gt; * This program is free software: you can redistribute it and/or modify&lt;/span&gt;
&lt;span class="cm"&gt; * it under the terms of the GNU Lesser General Public License as …&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dafne Kiyui</dc:creator><pubDate>Wed, 16 Sep 2020 00:00:00 +0800</pubDate><guid isPermaLink="false">tag:dontreinventbicycle.com,2020-09-16:/gjs-debounce.html</guid><category>tips</category><category>gnome-shell</category><category>gjs</category><category>gtk</category></item></channel></rss>