October 24, 2022

How to type letters with accent

Very useful article


https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/


September 8, 2022

Accent menu gone


open Terminal app and type
defaults write -g ApplePressAndHoldEnabled -bool true
and then restart.

January 20, 2022

exiftool

 #replace File modify date with File create date

exiftool '-filemodifydate<createdate' -ee -ext .mov -r .

#check all time stamps available in file

exiftool -s -time:all

#convert mp4 to mov

& "PATH\ffmpeg.exe" -i "PATH\Skydive_OpenShot_ExifTool_Test.mp4" -acodec copy -vcodec copy -f mov "PATH\Skydive_OpenShot_ExifTool_Test.mov"

#add metadata

& "PATH\exiftool.exe" ` "-QuickTime:CreationDate=2019:10:16 12:00:00-07:00" ` "-QuickTime:GPSCoordinates=35 56 57.2 N, 114 51 28.3 W" ` "PATH\Skydive_OpenShot_ExifTool_Test.mov"

rename in command line (maos)

 #for mac 

brew install rename

rename JPG jpg *.JPG 

#if you use barewords(protected) 

rename 's/\.JPG$/.jpg/' *.JPG 

 #mac os is case sensitive, that is why we need to do 2 renames 

rename 's/\.MOV$/.mov_/' *.MOV
rename 's/\.mov_$/.mov/' *.mov_

Count all file types in folder

 

find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u

October 7, 2020

$path

 # $PATH


check which directories are on the path


```bash

echo $PATH

```


add directory to path


```bash

export PATH='path_to_directory:$PATH'

#load new path

source ~/.bashrc 

```

October 4, 2020

rename all jpg with random names

#!/bin/bash    
for img in *.jpg; do
newname=$(head /dev/urandom | tr -dc a-z0-9 | head -c 8)
mv "$img" "$newname".jpg
done

ukrainian mac keyboard layout for windows 10

replaced ukrainian "І" with ukrainian "И"

https://drive.google.com/drive/folders/1G034a_BPxs0YVFWivjGZjeAyj-jefYNJ

if you are using Windows, you can use microsoft keyboard layout creator v1.4 for remapping the keys.

https://drive.google.com/file/d/1CKSM-j1ftOTqmNnJcy8PDZi7C2BiEYe7/view


it will probably ask for net framework 2.0

https://drive.google.com/file/d/1K89NDk6qvqQ7s_rKi4kELcWZzzYK81tB/view


April 17, 2020

limit results of select



SELECT * FROM Customers
WHERE Country='Germany'
LIMIT 3;

file/folder access rights



u+x - разрешить выполнение для владельца;
ugo+x - разрешить выполнение для всех;
ug+w - разрешить запись для владельца и группы;
o-x - запретить выполнение для остальных пользователей;
ugo+rwx - разрешить все для всех;






0 - никаких прав;
1 - только выполнение;
2 - только запись;
3 - выполнение и запись;
4 - только чтение;
5 - чтение и выполнение;
6 - чтение и запись;
7 - чтение запись и выполнение.





744 - разрешить все для владельца, а остальным только чтение;
755 - все для владельца, остальным только чтение и выполнение;
764 - все для владельца, чтение и запись для группы, и только чтение для остальных;
777 - всем разрешено все.

print where system is looking for executables - $PATH

echo $PATH

extract tr.gz file

tar -zxvf file_name.tar.gz

install rpm file on linux

sudo rpm –i sample_file.rpm

check which window manager is running

printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION"

fatal error: Python.h

sudo yum install python3-devel

How to type letters with accent

Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/