<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex Saveau</title>
    <description>The latest articles on DEV Community by Alex Saveau (@supercilex).</description>
    <link>https://dev.to/supercilex</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F138726%2F0c5711fb-6a09-4ff3-a665-539485d2e662.png</url>
      <title>DEV Community: Alex Saveau</title>
      <link>https://dev.to/supercilex</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/supercilex"/>
    <language>en</language>
    <item>
      <title>Customize GitHub’s code font</title>
      <dc:creator>Alex Saveau</dc:creator>
      <pubDate>Sun, 17 May 2020 00:00:00 +0000</pubDate>
      <link>https://dev.to/supercilex/customize-github-s-code-font-2po0</link>
      <guid>https://dev.to/supercilex/customize-github-s-code-font-2po0</guid>
      <description>&lt;p&gt;It occurred to me yesterday that I’ve spent way too much time nitpicking over my IDE’s font, but then come time for code reviews… not a ligature in sight. Here’s a quick guide to change that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Install &lt;a href="https://github.com/sindresorhus/refined-github#install" rel="noopener noreferrer"&gt;Refined GitHub&lt;/a&gt;. It’s probably a sin at this point to not use that extension. 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Change your font
&lt;/h2&gt;

&lt;p&gt;In Refined GitHub’s settings (&lt;code&gt;chrome://extensions/?options=hlepfoohegkhhmjieoechaddaejaokhf&lt;/code&gt;), paste in this custom CSS:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;

&lt;span class="c"&gt;/*
The wght@450 part is the font weight.
If you want less or more boldness, decrease or increase this number.
*/&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="sx"&gt;url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@450&amp;amp;display=swap")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nt"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;code&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.blob-code&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.blob-code-marker&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Fira Code'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;monospace&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I personally love Fira Code, but you can change this to whatever you want as long as the font is hosted somewhere.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;After&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://alexsaveau.dev/assets/general/default-github-code-font.webp" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Falexsaveau.dev%2Fassets%2Fgeneral%2Fdefault-github-code-font.webp" alt="Default GitHub font"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://alexsaveau.dev/assets/general/custom-github-code-font.webp" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Falexsaveau.dev%2Fassets%2Fgeneral%2Fcustom-github-code-font.webp" alt="Custom GitHub code font"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;That’s it! Enjoy.&lt;/p&gt;

</description>
      <category>github</category>
      <category>fonts</category>
      <category>styling</category>
    </item>
    <item>
      <title>Save money with this one Firestore free quota trick for CRON jobs</title>
      <dc:creator>Alex Saveau</dc:creator>
      <pubDate>Sun, 18 Nov 2018 00:00:00 +0000</pubDate>
      <link>https://dev.to/supercilex/save-money-with-this-one-firestore-free-quota-trick-for-cron-jobs-11d3</link>
      <guid>https://dev.to/supercilex/save-money-with-this-one-firestore-free-quota-trick-for-cron-jobs-11d3</guid>
      <description>&lt;p&gt;I’m sorry, but I just couldn’t resist that clickbaity title. 😛 Jokes aside, let’s say you have a monthly CRON job that empties out your users’ trash and does some other Firestore related cleanup. This is a great use of Firebase Cloud Functions, but it comes at a cost: you’re creating/updating/deleting documents all in one go.&lt;/p&gt;

&lt;p&gt;Remember, Firestore free quota resets daily. So if you’re too small to max out your free quota everyday, but too big to stay on the Spark plan, you should consider running &lt;em&gt;daily&lt;/em&gt; jobs instead.&lt;/p&gt;

&lt;p&gt;As long as your Cloud Functions only query the data they’re going to process, then it’ll be far cheaper to run a job every day and take full advantage of that free quota. As an added bonus, you’ll be able to better predict your monthly bill because you’ll be spreading out Firestore usage over each day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://alexsaveau.dev/assets/chris-pratt.gif"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YP-7vTsx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://alexsaveau.dev/assets/chris-pratt.gif" alt="Chris Pratt Happy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Running daily jobs
&lt;/h2&gt;

&lt;p&gt;Running a daily CRON job is ridiculously easy to do: simply create a&lt;a href="https://cloud.google.com/scheduler/"&gt;Cloud Scheduler&lt;/a&gt; job set to run at 3am each morning(&lt;code&gt;0 3 * * *&lt;/code&gt;) that publishes an empty data payload (&lt;code&gt;{}&lt;/code&gt;) to a topic of your choice (&lt;code&gt;daily-tick&lt;/code&gt;). It’ll look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://alexsaveau.dev/assets/firebase/daily-tick.webp"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QOm7DyyG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://alexsaveau.dev/assets/firebase/daily-tick.webp" alt="GCP Scheduler Daily Tick"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tick is completely free!&lt;/p&gt;

&lt;p&gt;In your functions’ index file, subscribe to the &lt;code&gt;daily-tick&lt;/code&gt; pubsub event and you’re good to go.&lt;/p&gt;




&lt;p&gt;Hopefully this will help you save a few bucks. Happy coding!&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>firestore</category>
      <category>cron</category>
    </item>
  </channel>
</rss>
