Just a cat wandering about Tamriel.

  • 0 Posts
  • 53 Comments
Joined 1 year ago
cake
Cake day: May 1st, 2024

help-circle
  • nvtop : visualize nvidia GPU usage and memory

    top : monitor/manage processes although ps aux | grep appName is still my goto.

    pyenv : easily install and use any python version

    ipython : a customizable python interpreter. I have figured out many poorly documented modules using ipython and great for exploring modules.

    Import psutil as ps
    
    ps.#then hit tab
    
    

    after hitting tab will show all attributes related to your imported module, use arrow keys to select methods == profit!

    nethogs : monitor network connections by app.

    firejail : app sandboxing












  • If you have 2 separate drives each with their own boot loader and you tell your bios to boot from the grub bootloader and grub has successfully detected another OS like windows everything will be fine.

    The trouble with dual booting comes from splitting a drive into partitions with different OS’s on them sharing the same boot partition. Eventually windows will nuke grub and you will loose the ability to boot linux till you use a live USB to repair through chroot and fixing/installing grub manually or using a grub-repair live USB. Usually only gets complicated if you have luks set up.

    I don’t advise dual booting on a single drive. I intentionally buy gaming laptops with dual drive setups and keep the windows drive untouched till the warranty is out. Just in case i have to send it in for repair. Been doing this since 2004 without ever having any bootloader issues that I didn’t cause myself.


  • Maiq@lemy.loltoLinux@lemmy.mlAuto Typing Script
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    5 months ago

    You could write a simple python script using datetime and pyperclip. Datetime would supply the date format and pyperclip to copy that to your clipboard. You could setup a key binding to call the script then [Ctrl + v] to paste.

    I believe all linix distros have python installed OTB.

    There are probably a bash solution but my bash is rubbish.

    Edit:

    The bash solution that has been provided is the best option IMO. I just thought I should provide the code for my solution so you have options. This python script is easily extendable / customizable. All this depends in you installing the python module pyperclip. datetime should be part if the standard python library so you dont have to install it.

    installing pyperclip with pip.

    pip install pyperclip

    The script:

    #!/usr/bin/env python3
    """A simple script to copy a formatted datetime string to the users clipboard"""
    
    import datetime
    import pyperclip
    
    def clipboard_timestamp(initials) -> None:
        """Function to create a formatted timestamp string to users clipboard.
    
        Arguments:
           initials: Uses the provided string during formatting of the timestamp."""
    
        time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
        pyperclip.copy(f"{initials} {time}")
    
    if __name__ == "__main__":
    
        clipboard_timestamp('ABC')
    

    The above script also adds the hours minutes and seconds to the timestamp. If not needed remove the %H:%M:%S. Dont forget to edit anything that you want like the 'ABC' near the end.

    Save script somewhere. I usually save personal scripts to ~/.local/bin so they are out of the way. I used the name clipboard_timestamp.py Doesn’t really matter as long as you remember the name. Next you have 2 options. You can make the script executable using chmod a+x clipboard_timestamp.py. If you dont want to take this step you will have to tell the shortcut that python is executing the script by prefacing the script’s full path with python like so python ~/.local/bin/clipboard_timestamp.py If you made the script executable you just use ~/.local/bin/clipboard_timestamp.py.

    I use KDE but your system should be similar-ish. in your desktop’s setting’s search for keyboard and you should see something that says something like shortcuts. Add New -> Command or Script. Point this to your newly saved python script /.local/bin/clipboard_timestamp.py. Then you choose the keystroke combination.


  • Maiq@lemy.loltoAndroid@lemdro.idBootloader walk of shame
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    5 months ago

    I was loyal to samsung till I bought the S9 and couldn’t throw a custom rom on it. So I reluctantly bought a pixel and put grapheneOS on it the second i bought it. Hands down the best android experience i have ever had. I have complete control over what the apps do, what sensors and directory’s they have access to and whether they have google services or not. Sanboxing is great. Buffer overflow protection, security focused updates regularly.

    I wish fairphone’s hardware was up to the security standards of gOS. I really wanted one of those but im extremely happy with the pixel overall.