Про путешествия

https://alekcei.livejournal.com/39492.html

Мне кажется, что путешествовать надо только на мотоцикле.
Ты хочешь куда-то попасть, садишься в самолет, потом из него выходишь, видишь место куда хотел.

Но это ошибка.
Надо видеть всю дорогу от и до.
Как, то, где ты живешь, постепенно превращается в то, куда ты хотел приехать.
Километр за километром изменяется земля, сменяются леса, горы, равнины и дорога незаметно приводит тебя в конечную точку.
Ты видишь всё своими глазами и как бы проживаешь эти перемены земли.

Но даже автомобиль не может дать тебе таких ощущений.
Только на мотоцикле, когда ты проедешь через тысячи километров упругого воздуха, разрежешь его своим телом, ты ощущаешь, что это твоя дорога и ты её прошел.
Жара, дождь, холод, снег, именно на мотоцикле воспринимаются такими, как они есть на самом деле.
Кондиционированный салон автомобиля даёт комфорт и безопасность, но отнимает часть твоей жизни, ту часть, в которой ты должен был прожить вместе с Землёй её перемены.

https://alekcei.livejournal.com/46150.html

Путешествовать на мотоцикле очень интересно.
Когда ты едешь сам, ты не просто видишь всё вокруг.
Самое главное – это отношение к тебе людей.
Если ты в автомобиле – ты один из тысяч.
Проехал и никто тебе слова не скажет.
Если ты на мотоцикле – ты исключительный.
Путешественник на японском мотоцикле в степях Забайкалья воспринимается не иначе как марсианский десант.
Пользуясь этим ты можешь познакомиться с любым человеком.
С любым заговорить. Попросить помощи, поговорить на любую тему. И человек обязательно тебе всё расскажет.
Расскажет честно, откроет душу, выложит всё, ничего не утаивая.

Это момент очень важный.
Я поездку на мотоцикле называю “путешествие с полным погружением в реальность”.
Никаким другим способом достичь такого невозможно.

IT related Quotes

В этом плане на IBMах ситуации «дятел залетел в OpenStack облако,
ухуярил весь кластер, наша смузи-облачная компания через 2 недели обанкротилась
и теперь инвесторы бегают за мной с паяльником» исключена.

(c) LOR

NTFS write on MacOS

This answer is for latest compatibility for OS X 10.11 El Capitan, macOS 10.12 Sierra and macOS 10.13 High Sierra.

Install latest osxfuse (3.x.x) from https://github.com/osxfuse/osxfuse/releases. Or install it from Homebrew with:

brew cask install osxfuse

Install latest NTFS-3G (2016.2.22) from Homebrew (http://brew.sh/), as follow:

brew install ntfs-3g

Link NTFS-3G to boot after temporary disabling System Integrity Protection, as follow:

[reboot by holding CMD+R to get in recovery mode]

csrutil disable

[reboot normally]

sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs

[reboot by holding CMD+R to get in recovery mode]

csrutil enable

[reboot normally]

You will need to re-link manually (step 3) each year when you upgrade macOS (10.11 → 10.12 → 10.13 → …)

Copy and paste between terminal and GUI in MacOS

Copy files to clipboard using command line on OSX

Use “pbcopy” to copy content of file to your clipboard.

For example:

$ pbcopy < file.txt

the command will copy all content from "file.txt" directly on your clipboard.

You can check if the content is there by using the "pbpaste" command:

$ pbpaste

The content of “file.txt” will appear on your terminal window.

If you use other *nix distribution please take a look over xclip or xsel. Take look over this website:

http://jetpackweb.com/blog/2009/09/23/pbcopy-in-ubuntu-command-line-clipboard/

pwd|pbcopy

In Terminal, select something and then within the same Terminal window do one of the following:

click and drag the selection (a bit; the mouse pointer will change), and release to paste (hit Esc while dragging to cancel)

or: paste using Shift-Command-V
or: paste using the middle mouse button

And so can Terminal. Edit > Paste Selection or Middle-Click if you have a three (or more) button mouse. Or drag the text a few pixels and release

my workflow

for copy: cmd-shift-click – it copies full unix paths like putty

for paste: triple click trackpad which works like middle button of mouse on xwindow or right button in putty (requires: http://clement.beffa.org/labs/projects/middleclick/ )

pbcopy and pbpaste replace non-ASCII characters with question marks in some environments. It can be avoided by setting LC_CTYPE to UTF-8.
Continue reading Copy and paste between terminal and GUI in MacOS

script checking no new files in directory for last x minutes and mail.

 

#!/bin/bash

cd /PD_nfs/MEOS

echo $(date)

##define variables
address="email@email.com"

 

#ls -ltr | tail -n1 | awk '{print $8}'
#find /data -type f -mmin 20 -exec stat -c '%Y %n %y' {} + | sort -k1nr | head -1

while true; do
COUNT=$(find . -mmin -10 -type f | wc -l)
echo $(pwd);
echo $(date);
echo "last file date: " $(ls -ltr | tail -n1 | awk '{print $8}');
find . -mmin -10 -type f | wc -l ;
timestamp=$(date +%Y%m%d_%H%M%S)
path="/Second"
filename=log_check_flow_$timestamp.txt
log=/Second/$filename
START_TIME=$(date +%s)
END_TIME=$(date +%s)
ELAPSED_TIME=$(expr $END_TIME - $START_TIME)

find . -mmin -10 -type f | wc -l >> $log;
find . -mmin -10 -type f | head -n15 |tee -a $log

echo "find output for 20 minutes : " >> $log
find . -type f -mmin 20 -exec stat -c '%Y %n %y' {} + | sort -k1nr | head -1 >> $log

echo " " >> $log
echo " ls -ltr output: " >> $log
ls -ltr | tail -n1 | awk '{print $8}' >> $log

#remove old logfiles:
pwd
date >>$path/log_rm.txt;
ls -t -r $path/log_check*.txt |head -n -70
ls -t -r $path/log_check*.txt |head -n -70 |xargs rm -rfv >>$path/log_rm.txt;
#ls -t -r $path/log_check*.txt |tail -n +18 |xargs rm -rfv >$path/log_rm.txt;

echo "remove_old_logfiles pass"

#echo "Backup :: Script End -- $(date +%Y%m%d_%H%M)" >> $log
echo "Checking :: Script End -- $(date +%Y%m%d_%H%M)" >> $log
echo "Elapsed Time :: $(date -d 00:00:$ELAPSED_TIME +%Hh:%Mm:%Ss) " >> $log

# check for rm logfile size:

echo "rm_log size now is: "
du $path/log_rm.txt | cut -f1

if [[ $(du $path/log_rm.txt | cut -f1) -gt 100 ]];
then echo 're-arm log_rm';
cp $path/log_rm.txt $path/log_rm.old;
:>$path/log_rm.txt
fi

 

if [ $COUNT = 0 ]; then
#ACHTUNG!!!
last=$(ls -ltr | tail -n1 | awk '{print $8}');
body=" Admin, we have problems on SER2! last incoming files was: $last" ;
echo -e $body | mail -S smtp=214.50.70.11 -S from=outgoing@email.com -s "Warning on SER2" -c email2@email.com $address;

fi
sleep 360
done;

password storing in heterogenous environment

Some time ago i start to think, where and what i best can store passwords and another sensitive information.
for it was easy to read and work with my information almost everywhere, and with minimal time to set up environment and so on.
here i come a some variants:

Keepassx / Keeweb type password solutions. https://keepassxc.org/

not like in it, it was narrow specialized solution, yet it was available on MacOs, Linux, win, android, and also on IOS.

next :
https://www.passwordstore.org/
that, really, is a script who manage simple txt files encrypted with GPG.
clients on Linux, Macos, IOS ( https://appsto.re/us/DY13hb.i ) available.
not “in the box” solution, but maybe anyway, good one.
https://qtpass.org/

next:
native emacs.
it has work out of the box transparent with GPG encrypted files, who have .gpg extension.
it was in default in linux and macos. that was good, but you have to set up GPG.
anyway – good variant, i think.

and finally:

vim !
from version about 7.4.399, when blowfish 2 algoritm was introduced in vim.

vim comes out of the box with most Linux distro, it was also included in macos.
no need any side solution, vim is self sufficient, and looks pretty secure with blowfish2 encryption!

http://blog.learningtree.com/encrypting-with-vim/

The safest way to do this is to add the following to your ~/.vimrc file:

set cm=blowfish2
set viminfo=
set nobackup
set nowritebackup

http://vim.wikia.com/wiki/Encryption
https://dgl.cx/2014/10/vim-blowfish

https://www.howtogeek.com/299546/how-to-password-protect-text-files-using-vim-on-linux-or-macos/

Encrypt Any Text File Using Vim

copy / paste on linux is via mark text with left mouse / paste with shift and middle mouse and so on.
looks support UTF in default, as so languages looks no problem.

there is also option work with GPG encryption in vim via additional plugin:

https://pig-monkey.com/2013/04/password-management-vim-gnupg/

https://vim.sourceforge.io/scripts/script.php?script_id=3645

and last thing, who i found:
use openoffice /libreoffice encryption = when “save as” dialog, do “save with password” option. it looks like blowfish / AES encryption, pretty strong and good to use.

based on :

https://www.linux.org.ru/forum/general/13712697/page1#comments