<?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>Forem: Jan Silva</title>
    <description>The latest articles on Forem by Jan Silva (@janjitsu).</description>
    <link>https://forem.com/janjitsu</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%2F410548%2Fa748efa4-a0d9-4458-b4ca-55c5e09d13b4.jpg</url>
      <title>Forem: Jan Silva</title>
      <link>https://forem.com/janjitsu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/janjitsu"/>
    <language>en</language>
    <item>
      <title>Remove ugly blue on focus ring border from NextUI Input Component</title>
      <dc:creator>Jan Silva</dc:creator>
      <pubDate>Fri, 12 Jul 2024 16:08:37 +0000</pubDate>
      <link>https://forem.com/janjitsu/remove-ring-border-from-nextui-input-component-11h1</link>
      <guid>https://forem.com/janjitsu/remove-ring-border-from-nextui-input-component-11h1</guid>
      <description>&lt;p&gt;I looked everywhere for this. I hope you save some time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt; 
    &lt;span class="na"&gt;classNames&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;inputWrapper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;group-data-[focus-visible=true]:ring-0 group-data-[focus-visible=true]:ring-offset-0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"write something..."&lt;/span&gt;
&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;source: some guy on github&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>tailwindcss</category>
      <category>nextui</category>
    </item>
    <item>
      <title>how to fix cryptographed ubuntu gdm3</title>
      <dc:creator>Jan Silva</dc:creator>
      <pubDate>Fri, 04 Aug 2023 18:39:40 +0000</pubDate>
      <link>https://forem.com/janjitsu/how-to-fix-cryptographed-ubuntu-gdm3-41k7</link>
      <guid>https://forem.com/janjitsu/how-to-fix-cryptographed-ubuntu-gdm3-41k7</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# tentou montar normalmente e não conseguiu por que era crytografado
     sudo mount /dev/sda1 sda1 -o uid=1000,gid=1000
     sudo umount sda1

# instalou o cryptsetup
   1  sudo apt-get install cryptsetup 

# encontrar sua partição crytografada
   2  blkid | grep "crypto_LUKS"

# abrir partição cryptografada, vai pedir senha
   3  sudo cryptsetup luksOpen /dev/nvme0n1p3 mypartition


# descobrir o nome da partição vg
   4  sudo vgscan 
   5  sudo lvdisplay 

# montar partição vg
   6  sudo mount /dev/vgubuntu/root sda1


# processo de chroot
   7  sudo mount --bind /proc/ /mnt/sda1/proc/
   8  sudo mount --bind /dev/ /mnt/sda1/dev/
   9  sudo mount --bind /sys/ /mnt/sda1/sys/
  10  sudo mount --bind /dev/pts/ /mnt/sda1/dev/pts
  11  sudo cp -L /etc/resolv.conf /mnt/sda1/etc/resolv.conf 
  12  sudo chroot /mnt/sda1 /bin/bash

# agora dentro da máquina, reinstalar o gdm
  13  sudo apt-get reinstall gdm3

# volte pra a máquina do pendrive
  14  exit

# desfaça as montagens e feche o hd novamente com a crpytografia
  15  sudo umount /mnt/sda1/proc 
  16  sudo umount /mnt/sda1/sys
  18  sudo umount /mnt/sda1/dev/pts 
  19  sudo umount /mnt/sda1/dev

# listar as partições vg
  20  sudo dmsetup info -C

# mudar para a vgroot do pendrive
  21  sudo vgchange -a n vgubuntu

# fechar partição novamente
  22  sudo cryptsetup close mypartition

# reiniciar e ser feliz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ubuntu</category>
      <category>bash</category>
      <category>fix</category>
      <category>luks</category>
    </item>
    <item>
      <title>My htop Setup + Tips on making your own!</title>
      <dc:creator>Jan Silva</dc:creator>
      <pubDate>Thu, 27 Jul 2023 18:08:29 +0000</pubDate>
      <link>https://forem.com/janjitsu/my-htop-setup-3fng</link>
      <guid>https://forem.com/janjitsu/my-htop-setup-3fng</guid>
      <description>&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%2Frcgspxu5ia50x9ttp5id.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%2Frcgspxu5ia50x9ttp5id.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  This is my current setup for htop!
&lt;/h1&gt;

&lt;p&gt;Some different settings that I've put are described below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tree view for processes&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;With this config, its possible to visually see the  tree of what process spawned that child process. And it's a lot easier to manage it, if you need to kill the app, you can see the head process easier :)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Graph Option to see Memory and CPU&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;With this visualization, is possible to get some history of the average use of it and it's very cool!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Disk usage and Network Throughput&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;More Information about data transfers happening in your machine&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Here's the config file I'm using
&lt;/h1&gt;

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

# Copy or symlink this file to ~/.config/htop/htoprc
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=111
sort_direction=1
tree_sort_key=1
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=1
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=1
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=1
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=5
enable_mouse=1
delay=15
left_meters=Hostname Uptime Battery Blank Blank AllCPUs2 Blank CPU CPU
left_meter_modes=2 2 2 2 2 1 2 3 2
right_meters=Systemd LoadAverage Tasks Blank Blank DiskIO NetworkIO Swap Memory Blank Memory Memory
right_meter_modes=2 2 2 2 2 1 1 1 1 2 3 2
hide_function_bar=0


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

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/janjitsu/8757fa457da826a752c305a436de853d" rel="noopener noreferrer"&gt;🔗 View it on gist&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you wanna use my config, just copy or symlink this file to your home directory local htop config in &lt;code&gt;~/.local/htop/htoprc&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Or to start using it, you can just run this oneliner!
&lt;/h2&gt;

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

mv ~/.config/htop/htoprc ~/.config/htop/htoprc.bkp &amp;amp;&amp;amp; \
wget https://gist.githubusercontent.com/janjitsu/8757fa457da826a752c305a436de853d/raw/b9ef168ad405cf2fa8dd13708eeff2371e046392/htoprc \
-P ~/.config/htop &amp;amp;&amp;amp; htop


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

&lt;/div&gt;

&lt;p&gt;If anything goes wrong and you decide to go back to your previous config, previous oneliner is first moving your current htoprc to htoprc.bkp, so you can just move it back like that&lt;/p&gt;

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

mv ~/.config/htop/htoprc.bkp ~/.config/htop/htoprc


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

&lt;/div&gt;




&lt;h1&gt;
  
  
  Making your own htop setup
&lt;/h1&gt;

&lt;p&gt;If you are adventurous enough, you can setup your own meters and configs inside htop itself&lt;/p&gt;

&lt;p&gt;just open htop and press F2 for going to the setup system.&lt;/p&gt;

&lt;p&gt;Follow along while we add another meter to our setup&lt;/p&gt;

&lt;h3&gt;
  
  
  Example - Adding a clock to our panel
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;open htop and press F2&lt;/strong&gt;, you will see the setup menu&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%2Fqvl864enmzsdx554051w.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%2Fqvl864enmzsdx554051w.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Press right right right and enter&lt;/strong&gt; to select clock meter it will be put in the right column. &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%2Fyxltq4elb5wqvxuq49g9.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%2Fyxltq4elb5wqvxuq49g9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Press Space&lt;/strong&gt; to change the style of the meter, lets change it to LED, then &lt;strong&gt;press Enter&lt;/strong&gt; to confirm.&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%2Fdk40jo9l45bdfj5jsh3e.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%2Fdk40jo9l45bdfj5jsh3e.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Press Esc&lt;/strong&gt; To see our final htop&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%2Fay1sbpa3mxqv9qo2v1m2.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%2Fay1sbpa3mxqv9qo2v1m2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you close htop, &lt;strong&gt;pressing F10&lt;/strong&gt; or clicking on the menu to quit if you got mouse enabled, this config will be saved to the same &lt;code&gt;htoprc&lt;/code&gt; file we were fiddling with it &lt;/p&gt;




&lt;h2&gt;
  
  
  More Tips
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;In the availabe meters column you can use the up and down arrows to chose other meters.&lt;/p&gt;

&lt;p&gt;You can also use Blank as a separator, in my setup, you can see I'm using some blanks there too.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;I hope you liked my tutorial and If you create some cool setup, make sure you publish it using the tag &lt;code&gt;#htop&lt;/code&gt; and drop it in the comments. :)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;htop é top!&lt;/em&gt; 🔝&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;br&gt;
This post was inspired by &lt;a href="https://haydenjames.io/htop-quick-guide-customization/" rel="noopener noreferrer"&gt;htop: Quick Guide &amp;amp; Customization&lt;/a&gt;&lt;br&gt;
&lt;/small&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>htop</category>
      <category>monitoring</category>
      <category>terminal</category>
    </item>
  </channel>
</rss>
