ls
– список файлов и каталоговls -al
– форматированный список со скрытыми каталогами и файламиcd dir
– сменить директорию на dircd
– сменить на домашний каталогpwd
– показать текущий каталогmkdir dir
– создать каталог dirrm file
– удалить filerm -r dir
– удалить каталог dirrm -f file
– удалить форсированно file
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
Metric | Nuxt I18n Micro | Nuxt I18n | |
---|---|---|---|
Total Bundle Size | 1.93 MB (96% smaller) | 54.7 MB | |
Max CPU Usage | 220.1% (44% lower) | 391.4% | |
Max Memory Usage | 655 MB (92% less memory) | 8305 MB | |
Build Time | 5 seconds (94% faster) | 1 minute 31 seconds | |
Requests per Second | 61.18 [#/sec] (25% more) | 49.05 [#/sec] | |
Memory Usage (Requests) | 323 MB (54% less memory) | 703.73 MB |
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
#!/bin/bash | |
# Задаем путь к папке, которую нужно архивировать | |
source_dir=${1:-"./tables"} | |
# Задаем путь к папке, в которую будут сохранены архивы | |
target_dir=${2:-"./archives"} | |
# Переходим в папку источника | |
cd "$source_dir" || exit |
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
Show hidden characters
// Файл "tsconfig.json": | |
// - устанавливает корневой каталог проекта TypeScript; | |
// - выполняет настройку параметров компиляции; | |
// - устанавливает файлы проекта. | |
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
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
image: | |
- Visual Studio 2019 | |
- Ubuntu | |
- macOS | |
environment: | |
prebuild_upload: | |
secure: a/seaM+nUnQWhWUnbyz8fl9vPwuyqDTrFviptDykYp2c46vdTvlAxU6yqD/PpDiI | |
COVERALLS_REPO_TOKEN: | |
secure: iDcAJCYgJK4tffyzEHbMVR8DatJcIN8eY0h29p9JQkl43TcEcm6Z6JLOBpGDk1MJ |
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
# Source: | |
# https://www.cloudflare.com/ips | |
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables- | |
# Backup/Restore | |
# iptables-save > savedrules.txt | |
# cat savedrules.txt | |
# iptables-restore < savedrules.txt | |
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done |
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
geo $limited { | |
default 1; | |
127.0.0.1 0; | |
} | |
map $limited $limit { | |
1 $binary_remote_addr; | |
0 ""; | |
} |
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
geo $limited { | |
default 1; | |
# Wordpress Jetpack ranges: | |
192.0.0.0/16 0; | |
66.135.0.0/16 0; | |
66.155.0.0/16 0; | |
76.74.0.0/16 0; | |
} |
Notes: All the examples below are only tested on Vue.js 1.0 (above).
Notes: The examples below use ES6 so it's recommended to use browserify or webpack to easily integrate babel.
When you need to access DOM attribute, be careful with the lifecycle. Vue.js has a few useful lifecycle hooks.
Let's say we want to scroll our component to the bottom (imagine it's a long list with overflow-y: auto
) once it's instantiate.
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
1. Install bootstrap as a dev dependency, and its dependencies (node-sass and sass-loader) | |
`npm install --save-dev [email protected] node-sass sass-loader` | |
2. Install nuxt plugin of bootstrap vue (includes bootstrap-vue as a dependency) | |
`npm install @nuxtjs/bootstrap-vue` | |
3. Register plugin as module in nuxt.config.js (see below) | |
4. Create app.scss entry point (see below) |
NewerOlder