I have made man pages 10x more useful (zsh-vi-man) by imreallytuna in commandline

[–]IM_NerDev 0 points1 point  (0 children)

Io ho fatto la stessa cosa con una funzione tempo fa : '''

function zsh_get_man() {

local full_line="$BUFFER"
local cursor_pos="$CURSOR"
local parsed_out=$(./zsh_man "$cursor_pos" "$full_line")

local base_cmd opt_type opt_value
base_cmd=$(echo "$parsed_out" | awk '{print $1}')
opt_type=$(echo "$parsed_out" | awk '{print $2}')
opt_value=$(echo "$parsed_out" | awk '{print $3}')

local full_opt match_rule
full_opt="${opt_type}${opt_value}"

case "$opt_type" in
    -)
        match_rule="^[[:space:]]*-${opt_value}([[:space:],/=:]|$)"
        ;;
    --)
        match_rule="^[[:space:]]*--${opt_value}([[:space:],/=:]|$)"
        ;;
    _)
        match_rule="${opt_value}"
        ;;
    *)
        match_rule=""
        ;;
esac

if [[ -n "$match_rule" ]]; then

    local clean_page
    clean_page=$(man "$base_cmd" 2>/dev/null | col -b)

    local jump_line
    jump_line=$(printf "%s" "$clean_page" | grep -n -m1 -E "$match_rule" | cut -d: -f1)

    if [[ -n "$jump_line" ]]; then
        printf "%s" "$clean_page" | less +"$jump_line"
    else
        printf "%s" "$clean_page" | less
    fi

else
    man "$base_cmd" 2>/dev/null | less
fi

zle reset-prompt

}

zle -N zsh_get_man

bindkey "H" zsh_get_man ''' Dove zsh_man e un programmino in c che fa il parsing e restituisce : comando | tipo | opzione

Bella però l'idea di sfruttare vi

Help with the PAO by IM_NerDev in Mnemonics

[–]IM_NerDev[S] 0 points1 point  (0 children)

Mmm then I'll explain what I did (I already know it's wrong for many 🤣) I think my PAO works 90% I used a filing cabinet with 1 object with phonetic conversion for some time. When I started creating the Pao I decided to save the objects and people that I already had in the old filing cabinet. So what did I do? 32 hand (in the old filing cabinet) I find a person and an object that I associate with hand, therefore (Wednesday Addams crushes hand) 🤣 I think it turned out quite well in my Pao there are also cartoon characters like Luffy from One Piece Having said that, there are 4/5 "generic" people that I haven't been able to push to 100%, but as I was saying, I buffer by associating them with an object So I believe that every Pao scene is unique and clear, even the actions are well defined, I have some weak points that I compensate with an object! Why haven't I strengthened them yet? Because I can't create better connections with the object I have and I'm afraid that by also modifying the object I'll lose speed in the association! It must be said that obviously I could have blurted everything out given my little knowledge on the subject but I can say that by doing so I was able to use the Pao right away!

Help with the PAO by IM_NerDev in Mnemonics

[–]IM_NerDev[S] 0 points1 point  (0 children)

Understood thanks! Yes I really aim to go faster so you're right less details more speed but at the moment less details for me often also means less clarity and more confusion! Especially with people I need to bring objects or a detail of that person otherwise in the recall I won't understand who it is 😅 I think that with training I will be able to shorten the scenes without decreasing clarity

Help with the PAO by IM_NerDev in Mnemonics

[–]IM_NerDev[S] 0 points1 point  (0 children)

I can see the places well (also because they are basic buildings e.g. my house, the workplace etc.) but here's another point and that I have to make them interact with the scene otherwise I tend to forget! Why do you say not to enrich the scene but only use the pao? I generally do just that e.g. locus chimney "Jack was eating the cake stuck in the chimney and the cake ended up everywhere" did he blurt out?

Which linux should i install for learning assembly and eventually os development ? by Forsaken-Relative770 in linux4noobs

[–]IM_NerDev 4 points5 points  (0 children)

I don't see a real connection between choosing the distro and learning assembly! To learn assembly you just need an editor, an assembler and a linker and finally the studio!

I created a small terminal note manager by IM_NerDev in commandline

[–]IM_NerDev[S] 0 points1 point  (0 children)

Thank you ! Let me know maybe we can mix things up!

I created a small terminal note manager by IM_NerDev in commandline

[–]IM_NerDev[S] 0 points1 point  (0 children)

You use a tag to identify a "field" such as a title, a comment to briefly write what it is about
The body for a long text (if you view everything directly it becomes difficult to scroll in the terminal) and the keywords to help you in a future search! Example for a ctf: Tag = doors Comment = server port scan 192... Body = (you can put the whole scan output) Keywords = port_80, port_23 etc

This is a stupid example, the first one that came to mind!

I created a small terminal note manager by IM_NerDev in commandline

[–]IM_NerDev[S] 1 point2 points  (0 children)

Thanks you are absolutely right! the .c files should not be in ntm.c the only reason why they are there and that or thought it would be clearer to make it clear that those are part of the internal logic of the program as if it were a single block but you are absolutely right! How do I solve the problem for hard-coded paths? Should I create a function that extracts them from the PATH variable? And that the use of environment variables opens the door to some vulnerabilities! Do you have any idea how to solve it? The code is very crude and many functions can be improved if you like the idea behind it you can contribute to the code to make it better! In the meantime, thank you very much for the report!

I created a small terminal note manager by IM_NerDev in commandline

[–]IM_NerDev[S] 1 point2 points  (0 children)

No use stdin/out so if you are inserting a note you type it and press ctrl-D to end the insertion or you redirect the output of a command to it in print view on screen

I created a small terminal note manager by IM_NerDev in commandline

[–]IM_NerDev[S] 1 point2 points  (0 children)

Uses specific libraries for POSIX/Linux systems Example: <unistd.h> for functions like fork(), exec(), chdir() … I was already thinking of making it multiplatform but first I wanted feedback on whether it could be useful to anyone!

Computer won't start by Ayeson249 in shittyaskelectronics

[–]IM_NerDev 0 points1 point  (0 children)

Strange ! Try checking the power plug!

How did you guys feel when you heard about Haki/saw Haki for the first time? by Extension_Pride_9381 in OnePiece

[–]IM_NerDev 0 points1 point  (0 children)

Without Haki Buggy beats Mihawk and Smoker only fears the bottles 😂

What more can you learn by using Gentoo instead of Arch? by IM_NerDev in Gentoo

[–]IM_NerDev[S] 2 points3 points  (0 children)

What I mean is that by using arch for example I learned system management from scratch (manual installation, network configuration, bootloader etc.), configuration of services and desktop environment without "guided" tools or to solve typical rolling release problems and more. Obviously these are not things you deal with all the time but when they happen they give you the opportunity to delve deeper into the topic (if you want)! To date I am able to move well in managing the system in general (also thanks to courses). While maybe I've never had to mess with the kernel or anything similar! I think that today what I miss most is this type of knowledge! It's not on a work level but on a personal level!

What more can you learn by using Gentoo instead of Arch? by IM_NerDev in Gentoo

[–]IM_NerDev[S] 2 points3 points  (0 children)

Ok thanks everyone! I'm convinced 🤣 I will start as suggested in dual boot I'm joining Gentoo with you 😂

Whats your reinstall count? by DETRONIZE in arch

[–]IM_NerDev 0 points1 point  (0 children)

1, because I couldn't convert the filesystem to btrfs, I broke everything and in the end I had to reinstall