<?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: HazTechyContent</title>
    <description>The latest articles on DEV Community by HazTechyContent (@haztechycontent).</description>
    <link>https://dev.to/haztechycontent</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%2F2214785%2Fa0480de9-e577-4c55-bfd1-703feba3d77b.jpg</url>
      <title>DEV Community: HazTechyContent</title>
      <link>https://dev.to/haztechycontent</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haztechycontent"/>
    <language>en</language>
    <item>
      <title>How I Cured My Game Addiction With Python</title>
      <dc:creator>HazTechyContent</dc:creator>
      <pubDate>Wed, 27 Aug 2025 14:38:26 +0000</pubDate>
      <link>https://dev.to/haztechycontent/how-i-cured-my-game-addiction-with-python-446c</link>
      <guid>https://dev.to/haztechycontent/how-i-cured-my-game-addiction-with-python-446c</guid>
      <description>&lt;p&gt;So lately I've been playing a lot of games. And being a (somewhat) productivity nerd, I really want to game less. I was like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fr1zezxpvhijtkjoxl2kw.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fr1zezxpvhijtkjoxl2kw.webp" alt=" " width="593" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that is when I had this idea, why not create an app that allows me to play games and use apps like Netflix if I work hard enough for it (that means spend time on productive apps).&lt;/p&gt;

&lt;p&gt;So I started coding:&lt;/p&gt;

&lt;h1&gt;
  
  
  How It went
&lt;/h1&gt;

&lt;p&gt;This Python App is the first project I've ever made using video coding.&lt;/p&gt;

&lt;p&gt;Nah just kidding.&lt;/p&gt;

&lt;p&gt;Before this I was mostly stuck on &lt;code&gt;CLI&lt;/code&gt; toy projects or tutorial hell, I had made a &lt;code&gt;Django&lt;/code&gt; market place app, an AI web scrapper but none have come close to this project in terms of shear difficulty and the things I had to learn.&lt;/p&gt;

&lt;p&gt;Here is a list of libraries used in this project&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;psutils&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;code&gt;threading&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;textual&lt;/code&gt; (to create a &lt;code&gt;TUI&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tkinter&lt;/code&gt; (to create a &lt;code&gt;GUI&lt;/code&gt; which I haven't started)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;datetime&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;poetry&lt;/code&gt;
So when I started coding I thought it was going to be easy but more deeper I went into this project, the more I realized it is much more complex than my anticipation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  I Started coding.
&lt;/h5&gt;

&lt;p&gt;I had to learn how to get, add, update, modify and remove data from a &lt;code&gt;json&lt;/code&gt; files. And then check if a process it active. Allocating time to unproductive apps. &lt;/p&gt;

&lt;p&gt;Fucked up real bad and nuked it like 2 - 3 times in the beninging.&lt;/p&gt;

&lt;p&gt;Then realizing that sequential execution isn't gonna cut it. Then learning threads. Refactoring code because logic got confused (yes that happened).&lt;/p&gt;

&lt;p&gt;Also realizing using &lt;code&gt;pid&lt;/code&gt; (process id) to track apps was a bad idea (thanks AI you really screwed me) because there are mulitple processes of the same name so &lt;code&gt;pid&lt;/code&gt; for each of them is going to be separate. &lt;/p&gt;

&lt;p&gt;Refactoring my code again to use process name. Then finding out that this app is utilizing 25% of my CPU (I was genuinely surprised). Learned how to optimize code (which was easy).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2exmd621pku1h7094398.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2exmd621pku1h7094398.jpg" alt=" " width="736" height="747"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;&lt;em&gt;So yeah&lt;/em&gt;&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;It was nothing short of chaos. After near 500 lines of code and a month later,  I have to admit these were the most difficult lines of code I had ever written.&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;&lt;em&gt;No Tutorials, no AI. Just Pure Agony&lt;/em&gt;&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;And after an entire month of pain. I finally made it. &lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;&lt;em&gt;The most ironic part?&lt;/em&gt;&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Instead of using it every day&lt;/em&gt;&lt;/strong&gt; to stop gaming, &lt;strong&gt;&lt;em&gt;what actually happened&lt;/em&gt;&lt;/strong&gt; was that during this period I dropped gaming almost entirely because &lt;strong&gt;&lt;em&gt;coding became my default&lt;/em&gt;&lt;/strong&gt; activity on my machine and also because I switched to Linux.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[!WARNING]&lt;br&gt;
I use arch btw&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It honestly kind of makes me sad, spending so much time on something I would never use. Still I'm really happy with the project and as of today I'm making a &lt;code&gt;tui&lt;/code&gt; (terminal user interface which is a &lt;code&gt;gui&lt;/code&gt; in a terminal) for it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Closing Thoughts
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Creating this changed me.&lt;/em&gt;&lt;/strong&gt; It made me realize that coding is actually hard. And yet completing it (by &lt;em&gt;completing&lt;/em&gt; I mean core logic is done) really made me confident in my skills, it showed me that anyone can actually make good things. &lt;/p&gt;

&lt;p&gt;My imposter syndrome went to basically zero after this project.&lt;/p&gt;

&lt;p&gt;The fact that you can learn a lot from a unique and a large project is genuinely freakin amazing.&lt;/p&gt;

&lt;p&gt;I would genuinely suggest every coder out there to build scary projects that force you to get out of your comfort zone because:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;The PATH to PARADISE begins in HELL!!!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cheers mate&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Sic Parvis Magna&lt;/em&gt;&lt;/strong&gt; | &lt;strong&gt;&lt;em&gt;Greatness from small beginnings&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
~ &lt;em&gt;Sir Francis Drake&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;[!Note]&lt;br&gt;
Can you people give me some project ideas.&lt;br&gt;
I really want to make something else.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>python</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Cool SHIT you can do with docker</title>
      <dc:creator>HazTechyContent</dc:creator>
      <pubDate>Mon, 11 Nov 2024 11:50:53 +0000</pubDate>
      <link>https://dev.to/haztechycontent/cool-shit-you-can-do-with-docker-3lan</link>
      <guid>https://dev.to/haztechycontent/cool-shit-you-can-do-with-docker-3lan</guid>
      <description>&lt;p&gt;Docker is the most revolutionary tech when it comes to containerization. Mainly because it’s fast and ensures that the app runs flawlessly in different environments with zero configurations (or minimal configuration depending on the needs).&lt;/p&gt;

&lt;p&gt;In this blog we are going to discuss the different ways you can use docker for your homelab.&lt;/p&gt;

&lt;p&gt;Reader Note: This blog is arranged in the sequence of more commonly used to more advanced and interesting things you can do with docker.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is a homelab?
&lt;/h1&gt;

&lt;p&gt;If you are new to concept of the homelab then to explain it simply it just a server running on your private network (you can also assign a domain to it) to host services like pihole, ad guard (both of which blocks ads), nextcloud (to host your own cloud server), jellyfin (to create your own youtube or media server) et cetera. Most of these will be discussed in this blog. So LET’S get right into it:&lt;/p&gt;

&lt;h2&gt;
  
  
  Downloading Docker:
&lt;/h2&gt;

&lt;p&gt;Obviously you have to install docker for doing any of the below&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; &lt;strong&gt;Choose Your Operating System:&lt;/strong&gt;&lt;br&gt;
Docker supports Windows, macOS, and Linux. Visit the official Docker website (&lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;https://www.docker.com/&lt;/a&gt;) to select your OS.&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt; &lt;strong&gt;Download the Installer:&lt;/strong&gt;&lt;br&gt;
Click the “Get Started” button and follow the on-screen instructions to download the appropriate installer for your system.&lt;br&gt;
&lt;strong&gt;3.&lt;/strong&gt; &lt;strong&gt;Run the Installer:&lt;/strong&gt;&lt;br&gt;
Double-click the downloaded installer file and follow the prompts to install Docker.&lt;br&gt;
Note: On Windows, you might need to restart your computer after installation.&lt;br&gt;
&lt;strong&gt;4.&lt;/strong&gt; &lt;strong&gt;Verify Installation:&lt;/strong&gt;&lt;br&gt;
Open a terminal or command prompt and type docker --version. If Docker is installed correctly, you should see the installed Docker version.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Considerations:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Docker Desktop:&lt;/strong&gt; For Windows and macOS, you might be prompted to install Docker Desktop, which includes Docker Engine, Docker Compose, and Kubernetes.&lt;br&gt;
&lt;strong&gt;WSL2 (Windows Subsystem for Linux):&lt;/strong&gt; On Windows, you might need to enable WSL2 for optimal performance.&lt;br&gt;
&lt;strong&gt;Rootless Mode:&lt;/strong&gt; For added security, consider using rootless mode, which allows you to run Docker without root privileges.&lt;br&gt;
Remember: Always refer to the official Docker documentation for the most up-to-date instructions and troubleshooting tips.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reader Note: All of these can be done with your personal that you use everyday however it is more recommended that you use a seperate pc (it can be your old potato pc or an old laptop) or a raspberry pi if you have one.&lt;/p&gt;

&lt;p&gt;Another Note: I recommend you using docker compose files to create the container mainly because everthing is better organized when you use docker compose&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Extra Resources:
&lt;/h2&gt;

&lt;p&gt;One last thing before getting into the cool stuff is that you should be familar with &lt;a href="https://www.youtube.com/watch?v=A3G-3hp88mo" rel="noopener noreferrer"&gt;linux file system&lt;/a&gt; and &lt;a href="https://www.youtube.com/playlistlist=PLIhvC56v63IJlnU4k60d0oFIrsbXEivQo" rel="noopener noreferrer"&gt;docker&lt;/a&gt; (click on them to go to the linked videos)&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Nextcloud | you personal Google drive:
&lt;/h1&gt;

&lt;p&gt;I have seen people who use google drive or google photos to store their memories and important work which eventually run out storage. When that happens you only have two choices either delete some of your data or pay for extra storage. This is where nextcloud comes in.&lt;/p&gt;

&lt;p&gt;Nextcloud is like google workspace but self hosted and opensource. It has the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Nextcloud Office (optional)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;High performance backend for Nextcloud Talk and TURN-server (optional)&lt;/li&gt;
&lt;li&gt;Nextcloud Talk Recording-server (optional)&lt;/li&gt;
&lt;li&gt;Backup solution (optional)
-Imaginary (optional, for previews of heic, heif, illustrator, pdf, svg, tiff and webp)&lt;/li&gt;
&lt;li&gt;ClamAV (optional, Antivirus backend for Nextcloud)&lt;/li&gt;
&lt;li&gt;Full text search (optional)&lt;/li&gt;
&lt;li&gt;Whiteboard (optional)&lt;/li&gt;
&lt;li&gt;Docker Socket Proxy (optional) 
If you do the math the “Basic” google subscriptions costs “1.99” which is about 20$ yearly and with that amount of money you can get a new 1 terabyte hard disk (it may cost more but it will definitely pay off in a year or two)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find the download guides it &lt;a href="https://github.com/nextcloud/all-in-one#how-to-use-this" rel="noopener noreferrer"&gt;here&lt;/a&gt; or if you are a dummy like me &lt;a href="https://www.youtube.com/watch?v=_WsvF5Y5d2I" rel="noopener noreferrer"&gt;here&lt;/a&gt; is a video for you.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. jellyfin | your own media server:
&lt;/h1&gt;

&lt;p&gt;Let’s say you have a lot memories and movies (pirated, hope I’m not the only one!) and you want to access from anywhere in the world (or your home network) without plugging a USB in the back of your TV then you can use jellyfin.&lt;/p&gt;

&lt;p&gt;You can find the instructions (to download and use it) &lt;a href="https://jellyfin.org/docs/general/installation/container/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Or if you want to locally on your windows or mac machine (with no involvement of docker) you can view the instructions &lt;a href="https://jellyfin.org/docs/general/installation/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reader Note: Ususally there are two versions of docker images one by &lt;a href="https://docs.linuxserver.io/images/" rel="noopener noreferrer"&gt;linux server&lt;/a&gt; (which I highly recommend you to visit for more cool stuff) and other is officially by the creators themselves however the configuration of linux server docker images are different.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  3. Affine or obsidian | host your own notetaking app:
&lt;/h1&gt;

&lt;p&gt;Ever wished that you had access to your notes form anywhere without paying a scent while also not giving your data to a ‘sus’ company which uses that data to make money (by selling it) and give personalized ads and also train some AI model (to all the programmer write bad open source code to poison the AI models’ training).&lt;/p&gt;

&lt;p&gt;Then Hosting your very own note taking app is the best option. This is useful because if you are a person like me who uses multiple devices then you can access that (note taking) app from your browser.&lt;/p&gt;

&lt;p&gt;Two of the most popular open source note taking app are &lt;a href="https://docs.affine.pro/docs/self-host-affine" rel="noopener noreferrer"&gt;affine&lt;/a&gt; (basically &lt;a href="https://notion.so" rel="noopener noreferrer"&gt;notion&lt;/a&gt; but open source) and &lt;a href="https://hub.docker.com/r/linuxserver/obsidian" rel="noopener noreferrer"&gt;obsidian&lt;/a&gt; (which stores notes in markdown).&lt;/p&gt;

&lt;p&gt;Both of these have pros and cons like obsidian has a learning curve while affine is easy to use (almost like notion at this point). Affine stores data in a database while obsidian stores data on you pc in markdown file (which is easier to backup and setup).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=cBzc5r-FNW0" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is a video tutorials to help you get started with obsidian&lt;/p&gt;

&lt;p&gt;A video on how to get started with obsidian&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Locally Hosted AI models
&lt;/h1&gt;

&lt;p&gt;Lets say that you have no internet or chat GPT is not currently up and running (mainly due to high demand) and you desperately need it. Then running an AI model locally on your computer is the best option. If you didn’t knew that was possible then you’ll have a working proof of this after reading this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reader Note: Although it will work on windows it is recommended that you run it on a linux OS like debian or ubuntu or wsl linux (use kali linux with kex for a GOATed wsl linux experience but not for this AI hosting stuff).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So what you need to do is go to &lt;a href="https://gist.github.com/notthebee/1dfc5a82d13dd2bb6589a1e4747e03cf" rel="noopener noreferrer"&gt;this&lt;/a&gt; github repo and run the docker compose file (shout out to @WolfgangsChannel on youtube who made it)&lt;/p&gt;

&lt;p&gt;To integrate it with your code editor you can use use the continue plugin (click to see the full docs).&lt;/p&gt;

&lt;p&gt;If you want a video tutorial then &lt;a href="https://www.youtube.com/watch?v=OpmMe0md0tA" rel="noopener noreferrer"&gt;here&lt;/a&gt; is a video by @WolfgangsChannel and &lt;a href="https://www.youtube.com/watch?v=Wjrdr0NU4Sk" rel="noopener noreferrer"&gt;here&lt;/a&gt; is a video by Network Chuck&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Pi-hole | block ads and speed up internet
&lt;/h1&gt;

&lt;p&gt;Some people don’t have access to very fast internet. To increase your internet speed there are only three ways&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change the DNS server&lt;/li&gt;
&lt;li&gt;Contact your ISP and upgrade it&lt;/li&gt;
&lt;li&gt;Use an ad blocker&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the problem with ad blockers is that most websites have ad blocker blocker that prevent you from using it.&lt;/p&gt;

&lt;p&gt;So to solve this problem there is Pi Hole. How it works is that it acts like a DNS server but blocks all the ad sites and trackers making browsing on the internet much smooth. Also you can block websites with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hub.docker.com/r/pihole/pihole" rel="noopener noreferrer"&gt;Here&lt;/a&gt; are the download guides&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reader Note: A DNS server is recommended to run all time so you should definitely install pi hole on a Raspberry Pi (mainly because it consumes less power) or any other machine that is ON 24/7.&lt;/p&gt;
&lt;h1&gt;
  
  
  6. Run virtual machines (I’m not joking)
&lt;/h1&gt;

&lt;p&gt;It just runs virtual machine that you can access over your private network. That’s all what it is. &lt;a href="https://docs.linuxserver.io/images/docker-kali-linux/" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is a link to a kali linux docker image. Personally I find the idea of accessing virtual machine from any device on the private network to be quite cool 😎.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  7. Libre Office | microsoft office but Open Source
&lt;/h1&gt;

&lt;p&gt;Microsoft office is expensive and not every one can afford it. There are some online alternatives like google docs or google sheet but they along with other harvest our data. So to solve this problem we have libreoffice. Its a great alternative to microsoft office.&lt;br&gt;
&lt;a href="https://hub.docker.com/r/linuxserver/libreoffice" rel="noopener noreferrer"&gt;Here&lt;/a&gt; are the download quides &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Reader Note: There is another version of libre office that runs on the machine with no need of docker. If you want it click &lt;a href="https://www.libreoffice.org/" rel="noopener noreferrer"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  8. Danger Zone
&lt;/h1&gt;

&lt;p&gt;Danger Zone is software that scans file for viruses in a sandbox (can’t interact with the out side). This is useful if you want to open a pdf (because you are curious) but also don’t want your computer to get infected by viruses. Click &lt;a href="https://dangerzone.rocks/" rel="noopener noreferrer"&gt;here&lt;/a&gt; to view the guides.&lt;/p&gt;

&lt;p&gt;Reader Note: When you click download danger zone for windows it will download a .msi file and you have to run it and it will install in docker (I’m telling this so you don’t get confused)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's it for today guys hope you like it. It took a lot of effort and back and forth to write it. If you have any questions leave them in the comments and please follow for more content like this.&lt;/p&gt;

&lt;p&gt;(also this blog was posted by me on medium. click &lt;a href="https://medium.com/gitconnected/cool-shit-you-can-do-with-docker-for-your-home-lab-af857dfc206d" rel="noopener noreferrer"&gt;here&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containerapps</category>
      <category>containers</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
