<?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: volfcan</title>
    <description>The latest articles on DEV Community by volfcan (@volfcan).</description>
    <link>https://dev.to/volfcan</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%2F1062849%2Fa147bf24-efd6-4eb3-b56e-0816e2d4c9fd.jpeg</url>
      <title>DEV Community: volfcan</title>
      <link>https://dev.to/volfcan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/volfcan"/>
    <language>en</language>
    <item>
      <title>How to See Someone’s First Post on Instagram? 🤔</title>
      <dc:creator>volfcan</dc:creator>
      <pubDate>Thu, 17 Oct 2024 14:35:17 +0000</pubDate>
      <link>https://dev.to/volfcan/how-to-see-someones-first-post-on-instagram-1g92</link>
      <guid>https://dev.to/volfcan/how-to-see-someones-first-post-on-instagram-1g92</guid>
      <description>&lt;p&gt;Scrolling endlessly through a person’s profile is a pain.&lt;br&gt;
But what if there existed a trick that could help you scroll automatically for as long as you wished? 👾&lt;/p&gt;

&lt;p&gt;Open the developer console on the profile page you want to see the first post on&lt;/p&gt;

&lt;p&gt;and type enter the following command on the console section &lt;/p&gt;

&lt;p&gt;&lt;code&gt;scroll=window.setInterval(function(){window.scrollTo(0,document.body.scrollHeight);},1000);&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How git commands works? 👾</title>
      <dc:creator>volfcan</dc:creator>
      <pubDate>Sun, 13 Oct 2024 08:37:05 +0000</pubDate>
      <link>https://dev.to/volfcan/how-git-commands-works-54nj</link>
      <guid>https://dev.to/volfcan/how-git-commands-works-54nj</guid>
      <description>&lt;p&gt;I've made a infographic that shows how git commands works 👇¡&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl52mdq34cp7p603e0z3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl52mdq34cp7p603e0z3j.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to design a URL shortener?</title>
      <dc:creator>volfcan</dc:creator>
      <pubDate>Sat, 12 Oct 2024 09:54:32 +0000</pubDate>
      <link>https://dev.to/volfcan/how-to-design-a-url-shortener-1p7c</link>
      <guid>https://dev.to/volfcan/how-to-design-a-url-shortener-1p7c</guid>
      <description>&lt;p&gt;Popular System Design Interview Question: &lt;br&gt;
How to design a URL shortener?&lt;/p&gt;

&lt;p&gt;Here is how to answer with a step-by-step approach: ↓&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Requirements&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Functional requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A user enters a URL and gets back a short URL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The short URL redirect to the long URL when accessed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The lifetime of the short URL can be customized&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The usage of the short URL can be tracked for analytics&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Non Functional requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;High availability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Minimal latency for URL redirection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;each short URL shall be unique&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Design the Data Model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We create three tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;ShortURL (urlId, creationDate, userID, longURL) -&amp;gt; ~= 500 bytes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User (userId, creationDate, lastUpdate, email) -&amp;gt; ~= 100 bytes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;UsageMetric (metricId, url_id, timestamp, metric_type) -&amp;gt; ~= 200 bytes&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;UsageMetric has a one to many strong relationship with ShortURL.&lt;/p&gt;

&lt;p&gt;User has a one to many weak relationship with ShortURL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Back of the Envelope estimation&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;10M users / create 3 URL per month -&amp;gt; 30M writes and 2B reads per month -&amp;gt; ~= 12 writes, 770 reads per second&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;High level system design&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are two main data flows: request a short URL and access a short URL. From the user device, each request hit the Load Balancer before going to a web server. Without the load balancer, the requests would be unevenly distributed to the servers, causing congestions and failures.&lt;/p&gt;

&lt;p&gt;The functionalities for requesting and accessing a short URL are encapsulated by two different set of APIs (write and read APIs) handled by separated services. &lt;/p&gt;

&lt;p&gt;To avoid single point of failures, the database can be replicated using a single-leader architecture. The write requests go to the leader, the read requests to the replicas. An in-memory cache is also used to reduce latency. Since the requests do not require any complex joins or strong relationships with data a NoSQL database using urlId as primary key fits the requirements. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Analytic Service&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A frontend web page sends requests to the analytic service and displays the analytics to the users. If real-time statistics are not required, the service can be implemented by batch jobs running at regular intervals.&lt;/p&gt;

&lt;p&gt;h/t: Fernando Franco&lt;/p&gt;

</description>
    </item>
    <item>
      <title>how to download single file from a repository? 📁</title>
      <dc:creator>volfcan</dc:creator>
      <pubDate>Mon, 07 Oct 2024 16:57:00 +0000</pubDate>
      <link>https://dev.to/volfcan/how-to-download-single-file-from-a-repository-3gp2</link>
      <guid>https://dev.to/volfcan/how-to-download-single-file-from-a-repository-3gp2</guid>
      <description>&lt;p&gt;if there are tons of directories in a single github repo and you want to use/download just one of them.&lt;/p&gt;

&lt;p&gt;i've got you covered ⚡️&lt;/p&gt;

&lt;p&gt;here's a tool for downloading a single directory from a github repo 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/MinhasKamal/DownGit" rel="noopener noreferrer"&gt;https://github.com/MinhasKamal/DownGit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzzke80iy3r4tfcgqhfo4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzzke80iy3r4tfcgqhfo4.png" alt="Image description" width="800" height="2787"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>github</category>
      <category>softwaredevelopment</category>
      <category>webdev</category>
    </item>
    <item>
      <title>⚡️ trick: take a screenshot of a webpage with the dev console ™</title>
      <dc:creator>volfcan</dc:creator>
      <pubDate>Mon, 12 Aug 2024 07:26:44 +0000</pubDate>
      <link>https://dev.to/volfcan/trick-take-a-screenshot-of-a-webpage-from-dev-console-3coh</link>
      <guid>https://dev.to/volfcan/trick-take-a-screenshot-of-a-webpage-from-dev-console-3coh</guid>
      <description>&lt;p&gt;taking screenshots of a webpage and its components is one of the key steps for proper product design and development.&lt;/p&gt;

&lt;p&gt;here is the trick 👇&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;open the developer console of the web page you want to take screenshot.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;choose the element and right click "Capture node screenshot"&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;you can whether take a screenshot of a full page or individual component/element with this mechanic&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3f4jik1fdnc52y3j4ub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3f4jik1fdnc52y3j4ub.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>⚡️ trick: hide youtube video player hud</title>
      <dc:creator>volfcan</dc:creator>
      <pubDate>Sun, 11 Aug 2024 11:33:52 +0000</pubDate>
      <link>https://dev.to/volfcan/trick-hide-youtube-video-player-hud-5194</link>
      <guid>https://dev.to/volfcan/trick-hide-youtube-video-player-hud-5194</guid>
      <description>&lt;p&gt;you can't read what's going on the terminal or shell while watching a youtube tutorial?&lt;/p&gt;

&lt;p&gt;If you write &lt;code&gt;document.querySelector(".ytp-chrome-bottom").style.display= 'None';&lt;/code&gt; on the console tab of the developer console, It hides the bottom timeline of the youtube video so you can see much better the content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fezpaggjrzf7mdx0g289y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fezpaggjrzf7mdx0g289y.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;like so:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg7n0vp9eabgouvv6u15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg7n0vp9eabgouvv6u15.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>development</category>
    </item>
  </channel>
</rss>
