Skip to content

Instantly share code, notes, and snippets.

View DimDev's full-sized avatar

Dzmitry Kazbiarovich DimDev

  • EPAM Systems
  • Wrocław, Poland
View GitHub Profile
# git up
git config --global alias.up '!(git add . && git stash && git pull --rebase >&2) | grep -v "No local changes to save" && git stash pop'
# git in / git out — смотреть какие коммиты придут/уйдут перед выполнением pull/push
git config --global alias.in '!git remote update -p; git log ..@{u}'
git config --global alias.out 'log @{u}..'
# git addremove - добавить в индекс новые файлы/изменения и удалить всё что удалилось
git config --global alias.addremove \!"git add . && git ls-files --deleted | xargs --no-run-if-empty git rm"
@DimDev
DimDev / fix-drupal8-permissions.sh
Created September 19, 2018 11:43 — forked from GreenSkunk/fix-drupal8-permissions.sh
Drupal - Bash shell script to fix Drupal 8 permissions where the PHP Handler is FastCGI.
#!/bin/bash
path=${1%/}
user=${2}
group=${2}
help="\nHelp: This script is used to fix permissions of a Drupal 8 installation in which the PHP Handler is FastCGI\nYou need to provide the following arguments:\n\t 1) Path to your drupal installation\n\t 2) Username of the user that you want to give files/directories ownership\n\nNote: This script assumes that the group is the same as the username if your PHP is compiled to run as FastCGI. If this is different you need to modify it manually by editing this script or checking out forks on GitHub.\nUsage: bash ${0##*/} drupal_path user_name\n"
echo "Refer to https://www.Drupal.org/node/244924"