One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...
import { dirname } from 'node:path'; | |
import { fileURLToPath } from 'node:url'; | |
export const getFilename = (meta) => fileURLToPath(meta.url); | |
export const getDirname = (meta) => dirname(getFilename(meta)); | |
const __filename = getFilename(import.meta); | |
const __dirname = getDirname(import.meta); |
##### Перемещение курсора: | |
Ctrl + a — переход в начало строки | |
Ctrl + b — переход на 1 символ назад | |
Ctrl + c — посылает программе SIGINT. Обычно, прерывает текущее задание | |
Ctrl + d — удаляет символ под курсором (аналог delete) | |
Ctrl + e — переход к концу строки | |
Ctrl + f — переход на 1 символ вперёд | |
Ctrl + xx — переходит от текущей позиции курса в начало строки и обратно. | |
Ctrl + p — Предыдущая команда (Стрелка вверх) |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
# opening and closing windows and popovers | |
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false | |
# smooth scrolling | |
defaults write -g NSScrollAnimationEnabled -bool false | |
# showing and hiding sheets, resizing preference windows, zooming windows | |
# float 0 doesn't work | |
defaults write -g NSWindowResizeTime -float 0.001 |
Тут перечислены не законы, последние слово всегда за здравым смыслом. Тут перечислены лишь направление, куда надо стремиться. Принципы, которые должны помочь, когда не знаешь, что выбрать.