// написать функцию, которая считает факториал числа (необходиом использовать рекурсию)
const factorial = (n) => {
// код
};
console.log(factorial(0)); // 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias go='git checkout' | |
alias gs='git status' | |
alias sync='git add .;git commit --amend --no-edit;git push -f origin' | |
pull() { | |
git fetch --all;git checkout "$1";git reset --hard origin/"$1" | |
} |
- libreoffice
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt install libreoffice
sudo apt install libreoffice-kde5
- openvpn
-
git
- setup
git config --global user.email [email protected] git config --global user.name "Oleg Grishechkin" git config --global core.editor "webstorm -w"
-
nvidia (manually)
enable repo in software center
sudo dnf update --refresh sudo dnf install gcc kernel-headers kernel-devel akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686
wait 5-10 minutes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// it's color parser snippet for https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/color/ | |
// temp0 - tbody with colors | |
// returns tuple with [light css variables string, dark css variables string] - values can be copied to your css | |
Array.from(temp0) | |
.filter((node) => node.nodeName === 'TR') | |
.map((node) => { | |
const [lightNode, darkNode, nameNode] = Array.from(node.childNodes) | |
.filter((node) => node.nodeName === 'TD') | |
.slice(0, 3); |
This function sum all numbers in string with this format:
2000 - apples
4000 - oranges
1000 - potatos
let sumNumbers = (value) => value.split('\n').map((el) => el.split(' ')).flat().reduce((res, el) => !isNaN(+el) ? res + +el : res, 0);
~/Downloads/ffmpeg -i ~/Downloads/input.mp4 -an -crf 28 -movflags faststart ~/Downloads/output.mp4