Listing posts

Displaying posts 1 - 5 of 336 in total
Technical debt
mouse 9 · person cloud · link
Last update
2024-10-02
2024
10-02
« — »

From r/ProgrammerHumor:

Facts:

  1. write software
  2. finish writing software
  3. language/libraries you used get updated with new features, deprecates old/bad things

You now have a choice:

  • go to the trouble of updating your entire program to use these new features and get rid of deprecated stuff, taking a lot of time and possibly messing up a ton of dependencies, or
  • continue to use old stuff and accept the associated risks, for no effort

Most companies everywhere choose 2, incurring debt as technology marches on. It becomes a game of how long they can go until option 1 becomes absolutely necessary


~~~ * ~~~

RVM shebang in a ruby script
mouse 937 · person cloud · link
Last update
2024-09-30
2024
09-30
« — »

run script with the default ruby version

  • option A:
1
2
#!/usr/bin/env -S ${HOME}/.rvm/bin/rvm-shebang-ruby
puts RUBY_VERSION
  • option B:
1
2
#!/usr/bin/env -S ${HOME}/.rvm/bin/rvm default do ruby
puts RUBY_VERSION

run script with desired ruby version

1
2
#!/usr/bin/env -S ${HOME}/.rvm/bin/rvm ruby-3.0.0 do ruby
puts RUBY_VERSION

fix relative path script calls

1
2
3
./apps/myscript.rb   # works
~/apps/myscript.rb   # works
apps/myscript.rb     # hangs!

edit ~/.rvm/bin/rvm-shebang-ruby and modify the last case with *rvm-shebang-ruby:

1
2
3
4
5
#rvm_promptless=1 rvm rvmrc load "$(dirname "$(which "$1")")" > /dev/null 2>&1
folder="$(dirname "$(which "$1")")"
[ "$folder" = "." ] && folder=$PWD
folder="$(realpath -s "$folder")"
rvm_promptless=1 rvm rvmrc load "$folder" > /dev/null 2>&1

~~~ * ~~~

PEC aziende e professionisti
mouse 12 · person cloud · link
Last update
2024-09-29
2024
09-29
« — »

~~~ * ~~~

Enable colored emoji in linux
mouse 13 · person cloud · link
Last update
2024-09-25
2024
09-25
« — »
1
apt install fonts-noto-color-emoji

Source: fosslinux


~~~ * ~~~

fish | friendly interactive shell attachment
mouse 3077 · person cloud · link
Last update
2024-09-19
2024
09-19
« — »

Resources

Extensions

Prompt power-up

  • decompress fish_config.7z attachment in ~/.config/fish/
  • curl -L https://get.oh-my.fish | fish
  • omf install bobthefish
  • download and install Meslo font from nerd-fonts
  • set MesloLGMDZ Nerd Font Mono font for your terminal
  • put set -g theme_nerd_fonts yes in your ~/.config/fish/config.fish
  • customize fish_greeting.fish and fish_right_prompt.fish in ~/.config/fish/functions/

On cygwin under windows you can install DejaVu Sans Mono ttf powerline font, and set fish as the default shell.

In the attached file there is a simple prompt with git support.

Commands

  • fish_update_completions -- scan man pages for completion tips
  • env VAR1=xxx VAR2=yyy command arg1 arg2 ... -- run command with env vars