October 10, 2016
October 8, 2016
install Cinnamon 3.0 on Ubuntu 16.04 LTS via PPA
sudo add-apt-repository ppa:embrosyn/cinnamon
sudo apt update
sudo apt install cinnamon blueberry
sudo apt update
sudo apt install cinnamon blueberry
February 14, 2016
edit mkv title from command line in macOS
mkvpropedit /Volumes/Movies/2015/chappie.mkv --edit info --set "title=chappie"
to install mkvproperedit on macOS do 'brew install mkvtoolnix'
February 9, 2016
February 4, 2016
January 29, 2016
copy folders over ftp recursively
1) use ncftp
ncftp -u username -p userpassword domain_or_ip
2) mput -R *
January 28, 2016
clear 'downloaded from internet' warning for application or file in mas os
xattr -d -r com.apple.quarantine
January 26, 2016
January 24, 2016
compare 2 folders
comm <(ls /folder_name/) <(ls folder_name)
comm -23 <(ls /Volumes/Transcend_Blue/Pictures/) <(ls /Volumes/Multimedia/Pictures/Sorting/) >> missing.txt
show only missing files from 1 folder and save to list
comm -23 <(ls /Volumes/Transcend_Blue/Pictures/) <(ls /Volumes/Multimedia/Pictures/Sorting/) >> missing.txt
show only missing files from 1 folder and save to list
Add files to archieve without compressin and split zip volumes
7z a -bt -m0=copy -v2g file_name.7z *
m0=copy - store files only
v2g - split into 2gb volumes
m0=copy - store files only
v2g - split into 2gb volumes
January 23, 2016
zip file without compression via command line
zip -r -0 zip_filename.zip folder_1_to_zip folder_2_to_zip
SSH server on MacOS
Enable ssh login
From command-line
Restrict access to ssh only to admin
# Create the com.apple.access_ssh group
dseditgroup -o create -q com.apple.access_ssh
# Add the admin group to com.apple.access_ssh
dseditgroup -o edit -a admin -t group com.apple.access_ssh
From command-line
systemsetup -setremotelogin on
Restrict access to ssh only to admin
# Create the com.apple.access_ssh group
dseditgroup -o create -q com.apple.access_ssh
# Add the admin group to com.apple.access_ssh
dseditgroup -o edit -a admin -t group com.apple.access_ssh
ssh login without password via id_rsa
machine A - client
machine B - server
on A run
Result:
ls ~/.ssh
you should see the id_rsa & id_rsa.pub files
login via ssh to B
ssh username@machine_ip
promt for password - type in your password
ls ~/.ssh
if directory does not exist - create it
mkdir ~/.ssh
if directory exists - log out
on A
let's copy the id_rsa.pub key to remote server B
cat .ssh/id_rsa.pub | ssh username@machine_b_ip 'cat >> .ssh/authorized_keys'
promt for password - type in your password
we are almost done. From now you can login to remote machine without password promt. But we need to take some security providing steps.
from A let's login to B
ssh username@machine_b_ip
No password promt. You have been loged in to remote server 2.
Please apply
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
machine B - server
on A run
ssh-keygen -t rsaif asked to provide password just press ENTER
Result:
ls ~/.ssh
you should see the id_rsa & id_rsa.pub files
login via ssh to B
ssh username@machine_ip
promt for password - type in your password
ls ~/.ssh
if directory does not exist - create it
mkdir ~/.ssh
if directory exists - log out
on A
let's copy the id_rsa.pub key to remote server B
cat .ssh/id_rsa.pub | ssh username@machine_b_ip 'cat >> .ssh/authorized_keys'
promt for password - type in your password
we are almost done. From now you can login to remote machine without password promt. But we need to take some security providing steps.
from A let's login to B
ssh username@machine_b_ip
No password promt. You have been loged in to remote server 2.
Please apply
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Authentication refused: bad ownership or modes for directory
login to remote ssh machine you are not being able to connect via key authorisation
and apply
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
restart remote ssh server
you are done
and apply
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
restart remote ssh server
you are done
MacOS terminal keyboard text shortcuts
On Mac OS X - the following keyboard shortcuts work by default. Note that you have to make Option key act like Meta in Terminal preferences (under keyboard tab)
alt ⌥+F to jump Forward by a word
alt ⌥+B to jump Backward by a word
I have observed that default emacs key-bindings for simple text navigation seem to work on bash shells. You can use
Meta-d to delete a word starting from the current cursor position
ctrl+A to jump to start of the line
ctrl+E to jump to end of the line
ctrl+K to kill the line starting from the cursor position
ctrl+Y to paste text from the kill buffer
ctrl+R to reverse search for commands you typed in the past from your history
ctrl+S to forward search (works in zsh for me but not bash)
ctrl+F to move forward by a char
ctrl+B to move backward by a char
alt ⌥+F to jump Forward by a word
alt ⌥+B to jump Backward by a word
I have observed that default emacs key-bindings for simple text navigation seem to work on bash shells. You can use
Meta-d to delete a word starting from the current cursor position
ctrl+A to jump to start of the line
ctrl+E to jump to end of the line
ctrl+K to kill the line starting from the cursor position
ctrl+Y to paste text from the kill buffer
ctrl+R to reverse search for commands you typed in the past from your history
ctrl+S to forward search (works in zsh for me but not bash)
ctrl+F to move forward by a char
ctrl+B to move backward by a char
January 22, 2016
delete all directories except with name contaning "Deez*"
find . -maxdepth 1 -type d -not -name "Deez*" -not -name "." -not -name ".." -exec rm -r {} \;
Subscribe to:
Comments (Atom)
How to type letters with accent
Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/
- 
Для того чтобы изменить сервер обновлений или подключить локальную папку зеркала необходимо - открыть реестр и в соответствующих ветках пр...
 - 
replaced ukrainian "І" with ukrainian "И" https://drive.google.com/drive/folders/1G034a_BPxs0YVFWivjGZjeAyj-jefYNJ if yo...
 - 
plugins are for eap are missing: apt-get install strongswan-plugin-eap-mschapv2