Skip to content

Instantly share code, notes, and snippets.

View h1ldebrand's full-sized avatar
🌴
On vacation

Vadim Semenchuk h1ldebrand

🌴
On vacation
View GitHub Profile
@h1ldebrand
h1ldebrand / json
Created June 23, 2020 08:53
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
@h1ldebrand
h1ldebrand / composer install
Created January 15, 2020 12:55
composer install
composer install --ignore-platform-reqs
@h1ldebrand
h1ldebrand / gist:78babb5447dd35991f5c15690660359c
Created December 11, 2019 11:33
fix launch react-native application on linux
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@h1ldebrand
h1ldebrand / change permission via git
Created July 10, 2019 13:01
change permission via git
git config core.fileMode false
@h1ldebrand
h1ldebrand / docker command
Created July 7, 2019 10:39
docker command
docker run -it ubuntu bash создать сеанс интерактивной работы на подключаемом устройстве
docker run --name ubuntuName -it ubuntu bash запуск контернера + указываем ему имя
docker ps -a выводит список всех контейнеров включая остановленные
docker ps выводит список всех работающих контейнеров
docker start 'name' перезапустить контейнер name
docker stop 'name' остановить контейнер name
docker inspect 'name' информация о контейнере 'name'
docker logs ubuntuName список всех событий внутри контейнера ubuntuName
docker rm ubuntuName удалить контейнер ubuntuName
<svg class="pl-arrow-bottom">
<use xlink:href="#icon-arrow-bottom"></use>
</svg>
@h1ldebrand
h1ldebrand / Modules for drupal
Last active January 2, 2019 11:15
Modules for drupal
composer require drupal/admin_toolbar drupal/token drupal/pathauto drupal/twig_field_value drupal/twig_tweak drupal/paragraphs drupal/shield drupal/field_group drupal/metatag drupal/xmlsitemap drupal/current_page_crumb drupal/svg_image
@h1ldebrand
h1ldebrand / получить значение поля в блоке и передать его в js
Created June 24, 2018 12:12
получить значение поля в блоке и передать его в js
function naturetour_page_attachments_alter(array &$attachments){
$uuid = \Drupal\block\Entity\Block::load('usefull')->getPlugin()->getDerivativeId();
$block_content = \Drupal::service('entity.repository')->loadEntityByUuid('block_content', $uuid);
if ($block_content) {
$field_value = $block_content->field_something_item->value;
$attachments['#attached']['drupalSettings']['naturetour']['custom']['something_item'] = $field_value;
}
}
@h1ldebrand
h1ldebrand / Редактирование файлов в Vim
Last active June 21, 2018 11:00
Редактирование файлов в Vim
1. Откроем Vim.
2. Наберем :edit hello.txt и нажмем enter.
3. Нажмем i.
4. Введем текст Hello World.
5. Нажмем клавишу <Esc>.
@h1ldebrand
h1ldebrand / Git command
Last active June 21, 2018 13:06
Git command
git config user.name
git config user.email - Имя и email
git config alias.mycomm - алиасы для команд
git config --global core.editor - изменить редактор для редактирования файлов git
git check-ignore -v dir/file.txt - проверить игнорируется файлы по данному пути
git reset HEAD file.txt - отмена индексации файла
git add --force file.txt
git add -f file.txt - добавить в индекс файл который находится в .gitignore
git rm file.txt - удалить файл с проекта и добавить в индекс
git rm -r dir - удалить папку с проекта и добавить в индекс