• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 8th, 2023

help-circle


  • ripreddittoeeroPihole and DNS requests
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    11 months ago

    Not sure if your eero can do this easily but you probably want to use DHCP option 6 so your router will forward the DNS server you select to all clients. That’s how I do it on openwrt.


  • ripreddittoLinuxYour best terminal aliases
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    functions not aliases but super helpful for moving around and searching files in the terminal

    searches for files with fzf and edits them in neovim

    se(){
    	if [[ $1 ]]; then
    		local dir=${@}
    	else
    		local dir=(./)
    	fi
    	local sel=($(fd . $dir[*] -t f -a -H --no-ignore-vcs | fzf --preview 'bat --color=always {1} '))
    	echo "${sel[@]}"
      (( ${#sel[@]} != 0 )) && nvim "${sel[@]}"
    }
    

    searches for a specific term in all files in directory with preview and jumps to that line in editor

    sf(){
    if [[ $1 ]]; then
    	search="$*"
    else
    	read -p "Enter term to search files for: " -r search
    fi
    
    IFS=: read -ra selected < <(
      rg --hidden --color=always --line-number --no-heading --smart-case "${search}" |
        fzf --ansi \
    		--height 80% \
    		--color dark \
            --color "hl:-1:underline,hl+:-1:underline:reverse" \
            --delimiter : \
            --preview 'bat --color=always {1} --line-range=:800 --highlight-line {2}' \
            --preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
    )
    [ -n "${selected[0]}" ] && nvim "${selected[0]}" "+${selected[1]}"
    }