• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      7 votes
    2. Share your personal dotfile treats and Unix tool recommendations

      I am currently preparing for a new job and cleaning up my dotfile repository. During the process, I had the idea that it would be nice to create a list of amazing tools, aliases, functions, and...

      I am currently preparing for a new job and cleaning up my dotfile repository. During the process, I had the idea that it would be nice to create a list of amazing tools, aliases, functions, and recommendations together.

      I will start.

      First, here is a list of nice tools to apt-get install or brew install that I can wholeheartedly recommend:

      • nvim is just an amazing text editor.
      • fzf is a very good fuzzy finder util. For example, you can quickly find files with it.
      • eza is a good ls replacement (and the successor of exa).
      • bat is a great replacement for cat with nice integrations and many options.
      • stow is great for managing your dotfiles. Thanks to @TangibleLight for telling me about it some while ago. I really love it.
      • tmux is a terminal multiplexer, i.e. you can have many sessions in one single terminal window. It's easy to use and super helpful. (When on a mac, I prefer iTerm tabs, though.)
      • nvm is practically a must if you are working with Node.
      • glow is an excellent markdown reader.
      • tldr is a nice man replacement. (You must run tldr -u after installing it to update available texts.)
      • z, an amazing tool for switching directories quickly.

      Also, I can recommend Oh My ZSH! which I have been using for years.

      Here is a small list of aliases I enjoy (I have 100+ aliases and I tried to pick some others may enjoy as well):

      # Serve current dir
      alias serve="npx serve ."
      
      # What's my IP?
      alias ip="curl --silent --compressed --max-time 5 --url 'https://ipinfo.io/ip' && echo ''"
      
      # This should be the default
      alias mkdir="mkdir -p"
      
      # Nice git helpers
      alias amend="git add . && git commit --amend --no-edit"
      alias nuke="git clean -df && git reset --hard"
      
      # Make which more powerful
      which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
      
      # This saves so many keystrokes, honestly
      alias -- +x="chmod +x"
      
      # Turns your path into a nice list and prints it
      alias path='echo -e ${PATH//:/\\n}'
      
      # Map over arguments and run a command
      # Usage: map <command>
      # Example: ls | map cat
      alias map="xargs -n1"
      

      And, finally, here are some fun functions:

      # Get cheat sheets for almost anything!
      # https://github.com/chubin/cheat.sh
      cheat() {
          WITH_PLUS=$(echo $@ | sed 's/ /+/g')
          CAT_TOOL=$(command -v batcat || command -v bat || command -v cat)
          curl "cheat.sh/$WITH_PLUS" | $CAT_TOOL
      }
      
      # Send everything to /dev/null
      nullify() {
        "$@" >/dev/null 2>&1
      }
      
      # Create a new dir and enter it
      mk() {
        mkdir -p "$@" && cd "$_"
      }
      
      # Create a data URL from a file
      # Source: https://github.com/mathiasbynens/dotfiles/blob/master/.functions
      data-url() {
      	local mimeType=$(file -b --mime-type "$1");
      	if [[ $mimeType == text/* ]]; then
      		mimeType="${mimeType};charset=utf-8";
      	fi
      	echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')";
      }
      
      74 votes
    3. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      10 votes
    4. Reverse-Proxying services both inside and outside of Podman

      Hey all, not-a-networks-guy here. I've currently got an rpi set up running pihole natively (not in a container) for ad and website blocking reasons. (Using port 80, no TLS) I've used the pihole...

      Hey all, not-a-networks-guy here.

      I've currently got an rpi set up running pihole natively (not in a container) for ad and website blocking reasons. (Using port 80, no TLS) I've used the pihole localdns feature to set an internal hostname for that ip (me.lan).

      On the same pi, I have podman "set up" to run FreshRSS, and I'm getting more and more annoyed about using the port # to access it. (me.lan:12345) I'd like to set up a reverse proxy (probably Traefik) in a container to redirect internally, but considering that port 80 is taken (by pihole, outside of podman) I don't see a way to direct traffic from the pihole to Traefik.

      I'd really rather not reconfigure the whole setup to use containers.... I'm lazy, and also prefer my dns resolver to have the least amount of overhead possible. Is configuring the router an option here, or is the only way to achieve what I'm looking for an overhaul of the pi and containers?

      If I've missed any pertinent details, let me know and I'll update here.

      4 votes
    5. best way to go about with a script that seems to need both bash and python functionality

      Gonna try and put this into words. I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them. My issue is I often do a thing where if I want to...

      Gonna try and put this into words.

      I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them.

      My issue is I often do a thing where if I want to accomplish a task that is maybe a bit complex, I feel like I have to wind up making a script, let's call it hello_word.sh but then I also make a script called .hello_world.py

      and basically what I do is almost the first line of the bash script, I call the python script like ./hello_world.py $@ and take advtange of the argparse library in python to determine what the user wants to do amongst other tasks that are easier to do in python like for loops and etc.

      I try to do the meat of the logic in the python scripts before I write to an .env file from it and then in the bash script, I will do

      set -o allexport
      source "${DIR}"/"${ENV_FILE}"
      set +o allexport
      

      and then use the variable from that env file to do the rest of the logic in bash.

      why do I do anything in bash?

      cause I very much prefer being able to see a terminal command being executed in real-time and see what it does and be able to Ctrl+c if I see the command go awry.

      in python, you can run a command with subprocess or other similar system libraries but you can't get the output in real-time or terminate a command preemptively and I really hate that. you have to wait for the command to end to see what happened.

      But I feel like there is something obvious I am missing (like maybe bash has an argparse library I don't know about and there is some way to inject the concept of types into it) or if there is another language entirely that fits my needs?

      6 votes
    6. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      11 votes
    7. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      16 votes
    8. [Home networking] Setting my Ruckus APs to DFS channels manually, any chance of running afoul of the FCC?

      Hi everyone, I recently finally setup the Ruckus AP unleased system that came with my townhome. After spending a long night learning how to properly configure the system I finally set it up in a...

      Hi everyone, I recently finally setup the Ruckus AP unleased system that came with my townhome. After spending a long night learning how to properly configure the system I finally set it up in a way that provided me the best speeds/range without interference.

      This was achieved by setting my Ruckus APs to manually sit on the DFS channels (60-140) via the Ruckus configuration app (shown here)

      This has been working great as I'm avoiding the 10~ other wifi networks in the area that are all set to the standard 36-48 and 149-160 channels (wifi analyzer screenshot here) but I'm concerned I may be inadvertently violating FCC guidelines. Note I do not live near any military installations, but I am about 13 miles away from a major airport. Will the Ruckus APs automatically change channels if they detect radar interference or am I causing trouble for someone?

      11 votes
    9. Looking for portable keyboard recommendations: must have USB-C connectivity, not just bluetooth

      TL;DR: recommendations for a small or folding keyboard that in addition to Bluetooth, also connects directly by USB C. Hello all. I'm a contractor who does a bunch of different stuff, and one of...

      TL;DR: recommendations for a small or folding keyboard that in addition to Bluetooth, also connects directly by USB C.

      Hello all. I'm a contractor who does a bunch of different stuff, and one of the areas I occasionally do is on-site IT work.

      I'm always looking for better tools, and while I can and do keep a standard full-size USB keyboard in my van, I'd like something more space efficient that I can fit in a small toolbag. There are tons of mini and/or folding Bluetooth keyboards out there, and some of them have USB-C or mini-USB ports, but so many of them are either only for charging, or just don't tell you if you can connect to a computer by USB. Since most rack servers aren't going to have Bluetooth and I want an option that involves the least number of steps (trying to avoid a bluetooth keyboard and having to use a USB bluetooth adapter), I'd really like a mini or folding keyboard that, while it can do Bluetooth, also can connect to a computer by standard USB. I specifically want a USB C port since I'm trying to standardize my gear on that.

      Thank you everyone!

      23 votes
    10. Day 22: Sand Slabs

      Today's problem description: https://adventofcode.com/2023/day/22 Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it...

      Today's problem description: https://adventofcode.com/2023/day/22

      Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python with any of the "short names" listed in this page of supported languages):

      <details>
      <summary>Part 1</summary>
      
      ```python
      Your code here.
      ```
      
      </details>
      
      6 votes
    11. What is a software you wish existed?

      I've been feeling pretty bored for a while and my job isn't really giving something fulfilling to do, So I want to make something. However, I don't want to make something useless. unfortunately, I...

      I've been feeling pretty bored for a while and my job isn't really giving something fulfilling to do, So I want to make something.

      However, I don't want to make something useless. unfortunately, I can't think of any software I'm in a particular need for. I would love to make something that solves a real problem for a real human.

      So, please tell me, what's something that you wish existed because it would reduce suffering in your life that little (or big) bit?


      Edit: Wow wow and wow, I didn't expect this thread that I made on a whim to blow up so much. So many idead!

      69 votes
    12. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      13 votes
    13. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      6 votes