| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
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
| /* | |
| * class Timer | |
| */ | |
| class Timer { | |
| static $start; | |
| static $end; | |
| static $marks = []; | |
| static $formats = [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
| <?php | |
| $startTime = time() - 7389; | |
| $diff = microtime(true) - $startTime; | |
| $format = sprintf('%02d:%02d:%02d', ($diff / 3600), ($diff / 60 % 60), $diff % 60); | |
| echo $format; |
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
| // Export database in gzip form | |
| mysqldump -u user -p database | gzip > database.sql.gz | |
| // Import database from gzip form | |
| gunzip < database.sql.gz | mysql -u user -p database |
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
| Cmd + / - Однострочный комментарий | |
| Cmd + F/R - Поиск и замена | |
| Cmd + W - Расширить выделение | |
| Cmd + E - список останніх файлів | |
| Cmd + P - Параметри функції | |
| Cmd + D - Дублювання поточної строки або блока | |
| Cmd + Y - Видалення поточної строки або блока | |
| Cmd + Option + S - Налаштування | |
| Cmd + Option + L - Форматування коду | |
| Cmd + Shift + W - Зменшити виділення |
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
| <div class="content"> | |
| <div class="default">Див, прописанный в разметке</div> | |
| <div class="custom">Див, добавленный скриптом</div> | |
| </div> | |
| <script> | |
| window.addEventListener('load', function() { | |
| let custom = document.querySelector('.custom'); | |
| console.log(custom); |
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
| ----------------------------------------------------------------------------------------------------- | |
| Установка brew: | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| Экспорт пути для доступа к пакетам из любого места в консоли | |
| echo "export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew/Cellar:~/bin:$PATH" >> ~/.zshrc | |
| Список команд для управления службами brew | |
| brew services list - вывести список с информацией доступных служб | |
| brew services start <Название> - запуск службы |
In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.
| TEST NAME | SECONDS | OP/SEC |
|---|---|---|
| Rosetta2 | 191.654 sec | 1.96 MOp/s |
| Intel i7-4790K (imac 2014) | 156.791 sec | 2.39 MOp/s |
| Intel i5-8500B (mini 2018) | 141.381 sec | 2.65 MOp/s |
| ARM m1 | 43.745 sec | 8.58 MOp/s |
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
NewerOlder