Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:36:51 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command
Bash script:
ssh_on_same_network_preferably()
{
    ...
    alias sshCommand='ssh $reachableAddress "${@:2}"'
    ...
    sshCommand
    ...
}

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:24:46 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command
Bash script:
my_test()
{
    if [ -t 0 ]
    then
        echo 'Without stdin'
    else
        echo 'With stdin'
    fi
}

echo test 
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:19:45 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command

If do not pipe to the function, then it waits forever...

DuckDuckGo search Bash test if stdin.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:13:56 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command

I corrected accordingly #issuecomment-3000 but I can't explain why it seemed to have worked sometimes despite using this Bash function and not ssh.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:09:14 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command
Bash script:
my_test()
{
    myStdin=`cat`
    echo "
Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:05:27 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command

DuckDuckGo search Bash function delay stdin usage.

Benjamin_Loison commented on issue Benjamin_Loison/linux#32 2025-03-31 00:05:05 +02:00
Make my SSH aliases prefer LAN over Internet but with a single command
Bash script:
my_test()
{
    cat
    cat
}

echo test
``` test ```

while for testing SSH connection passing stdin does not…

Benjamin_Loison commented on issue Benjamin_Loison/linux#35 2025-03-28 19:43:11 +01:00
Limit rights of programs
The person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAiLznqw6nY2r8aPkAEOnzWgC/lDTqc6sZhSdMStOZHA4w
8ibuzUS1nzBeDLbU5vaLcfXfCKx+GT7iOGf2qYeo6NvNsVRuqH…
Benjamin_Loison commented on issue Benjamin_Loison/overleaf#38 2025-03-28 13:28:21 +01:00
Does not leverage previous compilations?

Can probably leverage this JPG trick with beamer.

Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-28 12:33:49 +01:00
~/db/sessions/[0-9a-f]{32} purpose?

As there has been no changes for hours, maybe just setting such a monitoring at computer start seems appropriate.

Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-27 23:53:32 +01:00
~/db/sessions/[0-9a-f]{32} purpose?
FILE=~/db/sessions/2029240f6d1128be89ddc32729463129
inotifywait $FILE
send_tchap_message "Interacted with $FILE!"
Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-27 23:52:13 +01:00
~/db/sessions/[0-9a-f]{32} purpose?
sudo journalctl 
Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-27 23:48:58 +01:00
~/db/sessions/[0-9a-f]{32} purpose?
last 
Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-27 23:45:59 +01:00
~/db/sessions/[0-9a-f]{32} purpose?

Could inotifywait to be notified when it is read or written to try to figure out what special just happened.

Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-27 23:45:26 +01:00
~/db/sessions/[0-9a-f]{32} purpose?
stat ~/db/sessions/2029240f6d1128be89ddc32729463129
Output:
  File: /home/benjamin_loison/db/sessions/2029240f6d1128be89ddc32729463129
  Size:…
Benjamin_Loison commented on issue Benjamin_Loison/linux#72 2025-03-27 23:45:00 +01:00
~/db/sessions/[0-9a-f]{32} purpose?
file ~/db/sessions/2029240f6d1128be89ddc32729463129
/home/benjamin_loison/db/sessions/2029240f6d1128be89ddc32729463129: data
xxd ~/db/sessions/2029240f6d1128be8…