Listing posts
Displaying posts 1 - 5 of 336 in total
Technical debt
Last update
2024-10-02
2024-10-02
« — »
From r/ProgrammerHumor:
Facts:
- write software
- finish writing software
- 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
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
Last update
2024-09-29
2024-09-29
« — »
- http://www.registroimprese.it (ricerca per anagrafica)
- http://www.inipec.gov.it/cerca-pec (ricerca per anagrafica e anche per CF)
~~~ * ~~~
~~~ * ~~~
fish | friendly interactive shell attachment
Last update
2024-09-19
2024-09-19
« — »
Resources
Extensions
-
- anicode find arbitrary unicode characters matching a search pattern
autoenvstack folder custom env set/restore- cprintf printf with colors
g2 friendly git command line client- getopts command line options parser
- gitignore create .gitignore files from https://www.gitignore.io templates
- paths create or append to environment variables
rvm rvm support- shark sparkline generator (cli histograms)
- spin background job spinner
termcolours list available terminal colour names- upto change to the closest parent folder by name
oh-my-fish plugin manager (list)
prompt themes (see powerline and nerd fonts):
- oh-my-fish bobthefish: powerline-style, git-aware theme
- fisher metro powerline prompt optimized for speed and space
- fisher nitro color-smart powerline prompt based in Metro
- fisher segment powerline prompt builder
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
andfish_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 tipsenv VAR1=xxx VAR2=yyy command arg1 arg2 ...
-- run command with env vars