Skip to content

Instantly share code, notes, and snippets.

💭
:)

Alexar pendashteh

💭
:)
Block or report user

Report or block pendashteh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pendashteh
pendashteh / keybase.md
Created Jun 21, 2019
Identifiying on keybase
View keybase.md

Keybase proof

I hereby claim:

  • I am pendashteh on github.
  • I am pendashteh (https://keybase.io/pendashteh) on keybase.
  • I have a public key ASCC7DsKnQpBrAh1pMzY-ZPNxq-wS65iIggz8-O5H1s1Zgo

To claim this, I am signing this object:

@pendashteh
pendashteh / script_realpath.sh.md
Last active Apr 10, 2018
The realpath of the executed script
View script_realpath.sh.md

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.

1.

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

2.

@pendashteh
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
pendashteh / list-vars.sh
Last active Mar 8, 2016
Lists all the environmental variables and their values with the ability to filter by name.
View list-vars.sh
#!/bin/sh
# Usage: list-vars.sh [regex_filter]
[ "$1" ] && filter=$1 || filter=".*"
vars=($(compgen -A variable | grep $filter))
for var in ${vars[@]}
do
eval "echo $var=\$$var"
done
@pendashteh
pendashteh / config.yml
Last active Jan 17, 2016 — forked from pkuczynski/parse_yaml.sh
Read YAML file from Bash script
View config.yml
development:
path: ~/www
@pendashteh
pendashteh / htaccess-symlink-fix.sh
Last active Jan 10, 2016
Fixes all .htaccess files found in the given directory. Required to install drupal on Virtualmin and similar environment
View htaccess-symlink-fix.sh
@pendashteh
pendashteh / ssh-alias.sh
Created Dec 4, 2015
Create an alias to connect to SSH and set up the key pair authentication to avoid using passwords
View ssh-alias.sh
#!/bin/sh
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.