Skip to content

Instantly share code, notes, and snippets.

View pendashteh's full-sized avatar

Alexar pendashteh

  • Melbourne / Sydney
View GitHub Profile
pendashteh /
Created June 21, 2019 22:31
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 April 10, 2018 02:08
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 April 16, 2016 07:20
Fix for Composer.php in Drupal 8 core when installing cforge distrobution
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 March 8, 2016 12:26
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 January 17, 2016 01:31 — forked from pkuczynski/
Read YAML file from Bash script
path: ~/www
pendashteh /
Last active January 10, 2016 07:38
Fixes all .htaccess files found in the given directory. Required to install drupal on Virtualmin and similar environment
pendashteh /
Created December 4, 2015 23:23
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=""