<?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: tp1050</title>
    <description>The latest articles on DEV Community by tp1050 (@tabaluga).</description>
    <link>https://dev.to/tabaluga</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%2F607446%2Fcccd7dec-2084-47a5-a6b4-df32ecb7a298.png</url>
      <title>DEV Community: tp1050</title>
      <link>https://dev.to/tabaluga</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tabaluga"/>
    <language>en</language>
    <item>
      <title>Brave Sucks</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Sat, 01 Feb 2025 10:37:27 +0000</pubDate>
      <link>https://dev.to/tabaluga/brave-sucks-4a7c</link>
      <guid>https://dev.to/tabaluga/brave-sucks-4a7c</guid>
      <description>&lt;p&gt;Brave has grown quite resource-intensive! Here's what makes it hefty:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;It's built on Chromium, which already has a large footprint
Additional privacy features and ad-blocking capabilities add more layers
Shader caches (as shown in your output) accumulate over time
Wallet and crypto features contribute to the size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To slim it down, you can:&lt;/p&gt;

&lt;p&gt;rm -rf ~/.config/BraveSoftware/Brave-Browser/Default/Cache/*&lt;/p&gt;

&lt;p&gt;rm -rf ~/.config/BraveSoftware/Brave-Browser/Default/Code\ Cache/*&lt;/p&gt;

&lt;p&gt;rm -rf ~/.config/BraveSoftware/Brave-Browser/Default/GPUCache/*&lt;/p&gt;

&lt;p&gt;For a lighter browsing experience, you might enjoy alternatives like:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;qutebrowser
Falkon
Midori
Min browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;These browsers offer a more minimalist approach while maintaining good functionality.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ubunutu 24.04 Linux 6.8.0-41-generic sucks so bad</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Mon, 02 Sep 2024 06:23:27 +0000</pubDate>
      <link>https://dev.to/tabaluga/ubunutu-2404-linux-680-41-generic-sucks-so-bad-5f8c</link>
      <guid>https://dev.to/tabaluga/ubunutu-2404-linux-680-41-generic-sucks-so-bad-5f8c</guid>
      <description>&lt;p&gt;So if you are here you do not need me telling you about the nightmare that is the YOUBOONT2 24.04 It simply just does not work.&lt;br&gt;
If you are like me; have a messy personal desktop, you do not wish to reinstall the system because unlike your work machine this one is not backed-up properly, even the passwords are synced wrong, some places of the hard drive have encryptions I have forgotten the keys to them back in university and........ anyway below are the steps you want to take if you want to speed up your installation before attempting a full reinstall. &lt;/p&gt;

&lt;p&gt;I mean UBUNTU IS FREE i should not nag, but why.......??????????&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt autoremove

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt clean

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install bleachbit

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu

LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
        snap remove "$snapname" --revision="$revision"
    done

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker system prune

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
flatpak list
flatpak uninstall --unused
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo add-apt-repository ppa:oguzhaninan/stacer
sudo apt update
sudo apt install stacer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Fuck the Dark Mode</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Tue, 01 Nov 2022 09:15:54 +0000</pubDate>
      <link>https://dev.to/tabaluga/fuck-the-dark-mode-jpg</link>
      <guid>https://dev.to/tabaluga/fuck-the-dark-mode-jpg</guid>
      <description>&lt;p&gt;Just want to say I hate the dark mode it actually hurts my eyes to look at it&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to completely get rid of mysql and its traces</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Wed, 26 Oct 2022 08:57:43 +0000</pubDate>
      <link>https://dev.to/tabaluga/how-to-completely-get-rid-of-mysql-and-its-traces-1f9d</link>
      <guid>https://dev.to/tabaluga/how-to-completely-get-rid-of-mysql-and-its-traces-1f9d</guid>
      <description>&lt;p&gt;mysql server is like a crazy ex that you can not get rid of it leaves its peaces everywehre&lt;/p&gt;

&lt;p&gt;to do so&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rm -r -f /var/lib/mysql&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lazy ass SuperUsering</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Sat, 22 Oct 2022 17:30:49 +0000</pubDate>
      <link>https://dev.to/tabaluga/lazy-ass-superusering-13c9</link>
      <guid>https://dev.to/tabaluga/lazy-ass-superusering-13c9</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Security matters if you have something to lose&lt;/li&gt;
&lt;li&gt;if you have nothing to hide, just put everything in the open and save the CPU overhead DUDE&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;sudo visudo&lt;/code&gt;&lt;br&gt;
this is going to load up &lt;br&gt;
&lt;code&gt;/etc/sudoers&lt;/code&gt;&lt;br&gt;
 add this to the bottom of it:&lt;br&gt;
&lt;code&gt;username ALL=(ALL) NOPASSWD:ALL&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;this is going to get read of need for password&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Guide: Extremely Shitty SSH server</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Sat, 15 Oct 2022 08:12:47 +0000</pubDate>
      <link>https://dev.to/tabaluga/guide-extremely-shitty-ssh-server-20i</link>
      <guid>https://dev.to/tabaluga/guide-extremely-shitty-ssh-server-20i</guid>
      <description>&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=net.xnano.android.sshserver&amp;amp;hl=en&amp;amp;gl=US"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First off thanks for making an app that is mute! The ssh-server is setup to use RSA- for AUTHENTICATION but off course the coders did not bother to add that somewhere, or add an example setup for fellow Linux user, well here it is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo nano ~/.shh/config&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host mobile     
     HostName 192.168.1.102 --&amp;gt; Any 
     Port 6907
     IgnoreUnknown UseKeychain
     UseKeychain yes
     HostKeyAlgorithms +ssh-rsa,ssh-dss


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

&lt;/div&gt;



&lt;p&gt;then go--&amp;gt;&lt;br&gt;
&lt;code&gt;ssh mobile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;off course the ssh shell is useless but..... if you &lt;br&gt;
use the network file browsers:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ctrl+l&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then &lt;br&gt;
type:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh://192.168.1.102&lt;/code&gt;&lt;br&gt;
dont forget to bookmark it&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Journalctl as a webservice</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Wed, 28 Sep 2022 10:06:25 +0000</pubDate>
      <link>https://dev.to/tabaluga/journalctl-as-a-webservice-24dj</link>
      <guid>https://dev.to/tabaluga/journalctl-as-a-webservice-24dj</guid>
      <description>&lt;p&gt;&lt;code&gt;sudo apt-get install systemd-journal-remote&lt;br&gt;
sudo systemctl enable --now systemd-journal-gatewayd&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Journalctl content on your browser</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Wed, 28 Sep 2022 10:04:48 +0000</pubDate>
      <link>https://dev.to/tabaluga/journalctl-content-on-your-browser-pmk</link>
      <guid>https://dev.to/tabaluga/journalctl-content-on-your-browser-pmk</guid>
      <description>&lt;p&gt;Practically better than bread it self:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt-get install systemd-journal-remote&lt;br&gt;
sudo systemctl enable --now systemd-journal-gatewayd&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>dynamic name setting for classes</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Sat, 17 Sep 2022 19:50:15 +0000</pubDate>
      <link>https://dev.to/tabaluga/dynamic-name-setting-for-classes-43jf</link>
      <guid>https://dev.to/tabaluga/dynamic-name-setting-for-classes-43jf</guid>
      <description>&lt;p&gt;When you need to create classes on the go , this is the easiest way &lt;/p&gt;

&lt;p&gt;def create_class(cls_name):&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self,*args, **kwargs):&lt;br&gt;
        super(type(self),self).&lt;strong&gt;init&lt;/strong&gt;(*args, **kwargs)&lt;br&gt;
        pass&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return type(cls_name.upper(), (Parrent_Class), {'__init__': __init__,'__some_hidden_stuff__' : cls_name.lower(),'none_hidden_stuff':'some value})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Working with existing DB Tables through Python</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Sat, 10 Sep 2022 10:32:15 +0000</pubDate>
      <link>https://dev.to/tabaluga/working-with-existing-db-tables-through-python-3j8m</link>
      <guid>https://dev.to/tabaluga/working-with-existing-db-tables-through-python-3j8m</guid>
      <description>&lt;p&gt;The whole point of coding is to not learn stuff and do things faster, no one codes because they want to learn some random framework by heart as if it was a religious book sent down by some divine power!&lt;/p&gt;

&lt;p&gt;What is on the web? &lt;br&gt;
Millions of Tutorials who insist on teaching DB interaction through creation of Tables and manipulation of DB via Python.&lt;br&gt;
Reality--&amp;gt; A programmer needs a simple mechanism of inserting simple data units into an already existing Database or retrieving them back. &lt;/p&gt;

&lt;p&gt;Managing the DB is in itself a vast academic field and almost always is handled by actual DB managed DUDE/Girl who has devoted his life to digital book keeping leaving those in the hands of a python coder is nothing short of insanity so it begs the question why is there so many tutorial on creating db via python and not enough simple ones about just retrieving the damn data!!! The only possible answer is deep sexual frustration and social anxieties of the IT community members who make such useless tutorials.&lt;/p&gt;

&lt;p&gt;So if you need to access a table in the database that is already in there all you have to is to have this piece of code:&lt;/p&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;`from sqlalchemy import MetaData,create_engine&lt;br&gt;
from sqlalchemy.orm import declarative_base, sessionmaker&lt;/p&gt;

&lt;p&gt;import sqlalchemy &lt;/p&gt;

&lt;p&gt;str1='mysql+pymysql://username:pass@ip_of_db:port_of_dbserver/schema_name'&lt;br&gt;
engine=create_engine(str1)&lt;br&gt;
s_factory=sessionmaker(bind=engine)&lt;br&gt;
metadata = MetaData(engine)&lt;br&gt;
metadata.reflect()&lt;br&gt;
Base=declarative_base(metadata=metadata)&lt;/p&gt;

&lt;p&gt;class Users(Base):&lt;br&gt;
    &lt;strong&gt;tablename&lt;/strong&gt;='users'&lt;br&gt;
    &lt;strong&gt;tableargs&lt;/strong&gt;={"autoload": True,"autoload_with":engine}&lt;/p&gt;

&lt;p&gt;with s_factory() as s:&lt;br&gt;
    ret=s.query(Users).filter(Users.id==3).first()&lt;br&gt;
    print(ret)`&lt;/p&gt;

&lt;p&gt;from sqlalchemy import MetaData,create_engine&lt;br&gt;
from sqlalchemy.orm import declarative_base, sessionmaker&lt;/p&gt;

&lt;p&gt;import sqlalchemy &lt;/p&gt;

&lt;p&gt;str1='mysql+pymysql://username:pass@ip_of_db:port_of_dbserver/schema_name'&lt;br&gt;
engine=create_engine(str1)&lt;br&gt;
s_factory=sessionmaker(bind=engine)&lt;br&gt;
metadata = MetaData(engine)&lt;br&gt;
metadata.reflect()&lt;br&gt;
Base=declarative_base(metadata=metadata)&lt;/p&gt;

&lt;p&gt;class Users(Base):&lt;br&gt;
    &lt;strong&gt;tablename&lt;/strong&gt;='users'&lt;br&gt;
    &lt;strong&gt;tableargs&lt;/strong&gt;={"autoload": True,"autoload_with":engine}&lt;/p&gt;

&lt;p&gt;with s_factory() as s:from sqlalchemy import MetaData,create_engine&lt;br&gt;
from sqlalchemy.orm import declarative_base, sessionmaker&lt;/p&gt;

&lt;p&gt;import sqlalchemy &lt;/p&gt;

&lt;p&gt;str1='mysql+pymysql://username:pass@ip_of_db:port_of_dbserver/schema_name'&lt;br&gt;
engine=create_engine(str1)&lt;br&gt;
s_factory=sessionmaker(bind=engine)&lt;br&gt;
metadata = MetaData(engine)&lt;br&gt;
metadata.reflect()&lt;br&gt;
Base=declarative_base(metadata=metadata)&lt;/p&gt;

&lt;p&gt;class Users(Base):&lt;br&gt;
    &lt;strong&gt;tablename&lt;/strong&gt;='users'&lt;br&gt;
    &lt;strong&gt;tableargs&lt;/strong&gt;={"autoload": True,"autoload_with":engine}&lt;/p&gt;

&lt;p&gt;with s_factory() as s:&lt;br&gt;
    ret=s.query(Users).filter(Users.id==3).first()&lt;br&gt;
    print(ret)&lt;br&gt;
    ret=s.query(Users).filter(Users.id==3).first()&lt;br&gt;
    print(ret)`&lt;br&gt;
I bet on entirety my sexual hormones that this comment-less piece of code is more useful then the entire alchemy Doc on hand!!!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Creating forms from reflected orm objects FLASK/ALCHEMY BLEH</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Tue, 06 Sep 2022 07:54:57 +0000</pubDate>
      <link>https://dev.to/tabaluga/creating-forms-from-reflected-orm-objects-flaskalchemy-bleh-l51</link>
      <guid>https://dev.to/tabaluga/creating-forms-from-reflected-orm-objects-flaskalchemy-bleh-l51</guid>
      <description>&lt;p&gt;Philosophy:&lt;br&gt;
We use computers to automate things, we use programming languages to automate the automation. When a framework makes you do stuff by hand either a) The framework is to put it academically "SHITTY" or it was not written with automation in mind.&lt;/p&gt;

&lt;p&gt;Creating forms is pain, creating Database models is a pain.&lt;/p&gt;

&lt;p&gt;We have a db objects that reflects all the tables in our DB:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from flask_sqlalchemy import  SQLAlchemy&lt;br&gt;
    db = SQLAlchemy(flask_appinstance)&lt;br&gt;
    db.init_app(flask_appinstance)&lt;br&gt;
    db.Model.metadata.reflect(db.engine)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then you could reflect a table from your database simply by:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;class Table_FROM_REAL_DB(db.Model):&lt;br&gt;
        __tablename__='Name_of_Tabble_In_Real_DB'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Nou you can easily create a form that accepts data from a webpage for this very table or loads data into an html table from this very table by simply:&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;br&gt;
    from flask_wtf import FlaskForm&lt;br&gt;
    from wtforms_sqlalchemy.orm import model_form&lt;br&gt;
 instance_of_object_corrosponding_to_a_table=Name_of_Tabble_In_Real_DB()&lt;br&gt;
    Form_of_Tabble_In_Real_DB = model_form(model=Name_of_Tabble_In_Real_DB, base_class=FlaskForm, db_session=db.session)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;populate it as per:&lt;br&gt;
form.populate_obj(instance_of_object_corrosponding_to_a_table)&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
People who make things complicated have unresolved mental issues they do not want to deal with in real life and bring into sacred grounds of coding, they must stop touching the keyboard and find a therapist/partner/book.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What does __all__ mean in Python?</title>
      <dc:creator>tp1050</dc:creator>
      <pubDate>Mon, 05 Sep 2022 08:05:27 +0000</pubDate>
      <link>https://dev.to/tabaluga/what-does-all-mean-in-python-37lh</link>
      <guid>https://dev.to/tabaluga/what-does-all-mean-in-python-37lh</guid>
      <description>&lt;p&gt;1) Stackoverflow just makes it more complicated to understand something that is complicated&lt;br&gt;
2) Python docs and people working in/on/at it love to talk as if they are wizards from the lord of rings or some other obscure place. &lt;/p&gt;

&lt;p&gt;So WTF is &lt;strong&gt;all&lt;/strong&gt; and why should/would you put it in the &lt;strong&gt;init&lt;/strong&gt; of a package/module? &lt;/p&gt;

&lt;p&gt;Most people who MADE/MAKE python come from C/C++ as all human beings must, so they need and crave a way of exerting control over how objects and data are accessed, that is more pronounced because well python has literally no controls in place everything is everywhere all the time and can be accessed by everyone. &lt;/p&gt;

&lt;p&gt;So what do they do? &lt;strong&gt;all&lt;/strong&gt; is realization of that fetish for control over data. When you put &lt;strong&gt;all&lt;/strong&gt; at the top of a file, then you are sure excuting from module import * only and only imports those things you put in the  &lt;strong&gt;all&lt;/strong&gt; array at the top of the file. So in reality &lt;strong&gt;all&lt;/strong&gt; is a shorthand for making sure with one tiny line of code you are importing only and exactly a few line of code.&lt;/p&gt;

&lt;p&gt;If you asked me I think it is useless and mostly cyber-erotic manner of coding which is contagious btw.&lt;/p&gt;

&lt;p&gt;if module: a.py --&amp;gt;&lt;/p&gt;

&lt;p&gt;`&lt;strong&gt;all&lt;/strong&gt; = ['bar', 'baz']&lt;/p&gt;

&lt;p&gt;waz = 5&lt;br&gt;
bar = 10&lt;br&gt;
def baz(): return 'baz'`&lt;/p&gt;

&lt;p&gt;then when you do&lt;br&gt;
&lt;code&gt;import from a *&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
you effectively get bar and baz but not waz.&lt;/p&gt;

&lt;p&gt;Thats all.&lt;/p&gt;

&lt;p&gt;If you got here  because in the middle of an amazing hacking session you came across this yet an other weirdness of python and went down rabbit holes to understand its value, PLEASE STOP, go get an ice creme, chat up a girl/boy, take a deep breath and just let go......&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
