Skip to content

Instantly share code, notes, and snippets.


Alexar pendashteh

View GitHub Profile
pendashteh /
Created Jun 21, 2019
Identifiying on keybase

Keybase proof

I hereby claim:

  • I am pendashteh on github.
  • I am pendashteh ( on keybase.
  • I have a public key ASCC7DsKnQpBrAh1pMzY-ZPNxq-wS65iIggz8-O5H1s1Zgo

To claim this, I am signing this object:

pendashteh /
Last active Apr 10, 2018
The realpath of the executed script

Here are different ways to obtain the realpath of the script. Each have their cons and pros and might have slight differences.

I am listing them here so overtime I can complete the list of cons and pros and what they actually do.


script_root=$(dirname $(readlink -f $0))


pendashteh / drupal8-fix-composer.patch
Created Apr 16, 2016
Fix for Composer.php in Drupal 8 core when installing cforge distrobution
View drupal8-fix-composer.patch
diff --git a/docroot/core/lib/Drupal/Core/Composer/Composer.php b/docroot/core/lib/Drupal/Core/Composer/Composer.php
index 0d5b6aa..b31741a 100644
--- a/docroot/core/lib/Drupal/Core/Composer/Composer.php
+++ b/docroot/core/lib/Drupal/Core/Composer/Composer.php
@@ -20,7 +20,7 @@
class Composer {
protected static $packageToCleanup = [
- 'behat/mink' => ['tests', 'driver-testsuite'],
+ 'behat/mink' => ['driver-testsuite'],
pendashteh /
Last active Mar 8, 2016
Lists all the environmental variables and their values with the ability to filter by name.
# Usage: [regex_filter]
[ "$1" ] && filter=$1 || filter=".*"
vars=($(compgen -A variable | grep $filter))
for var in ${vars[@]}
eval "echo $var=\$$var"
pendashteh / config.yml
Last active Jan 17, 2016 — forked from pkuczynski/
Read YAML file from Bash script
View config.yml
path: ~/www
pendashteh /
Last active Jan 10, 2016
Fixes all .htaccess files found in the given directory. Required to install drupal on Virtualmin and similar environment
pendashteh /
Created Dec 4, 2015
Create an alias to connect to SSH and set up the key pair authentication to avoid using passwords
echo "This will setup keypair-authentication so you would not need password to connect to server anymore"
# ssh_alias=""
echo "SSH alias?"; read ssh_alias
# ssh_user="root"
echo "Username?"; read ssh_user
# ssh_server=""
You can’t perform that action at this time.