Skip to content

Instantly share code, notes, and snippets.

View anavarre's full-sized avatar
🏠
Working from home

Aurelien Navarre anavarre

🏠
Working from home
View GitHub Profile
@anavarre
anavarre / acli_fedauth.sh
Last active September 21, 2023 14:09
Acquia CLI / Federated Authentication Troubleshooting
#!/usr/bin/env bash
ACLI_LOG_FILE="/tmp/acli_fedauth.log"
info() {
echo "---------------------------------------------------------------------------------"
echo "Read this known issue first: https://docs.acquia.com/acquia-cli/known-issues/#id1"
echo "---------------------------------------------------------------------------------"
echo ""
}
@anavarre
anavarre / copyright.sh
Created February 22, 2020 12:38
ImageMagick: resize and watermark
@anavarre
anavarre / .quick-drupal.sh
Last active October 18, 2019 06:16
Quickest way to install, test and contribute to Drupal. Moved to an actual repo at https://github.com/anavarre/quick-drupal
#!/usr/bin/env bash
###################################################################
# INSTALL: #
# #
# 1. Place the file under your $HOME directory. #
# 2. Create the following Bash aliases to invoke the #
# script from anywhere. #
# #
# alias quick-start='$HOME/.quick-drupal.sh quick-start' #
@anavarre
anavarre / keybase.md
Created July 6, 2017 11:53
keybase.md

Keybase proof

I hereby claim:

  • I am anavarre on github.
  • I am anavarre (https://keybase.io/anavarre) on keybase.
  • I have a public key ASBk7ngM55Ox-bKJ_FLJeMUz_rGmTlxUyVwlAgW6wzIXtQo

To claim this, I am signing this object:

@anavarre
anavarre / apply-patch.sh
Last active September 9, 2015 08:40
Prototype - Rerolling Drupal patches
#!/usr/bin/env bash
# Invoke the script from anywhere (e.g .bashrc alias)
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ${DIR}/common
source ${DIR}/functions.sh
PATCH=$1
@anavarre
anavarre / merge_git_repos.sh
Last active July 5, 2017 22:05
Merge 2 Git repositories
#!/usr/bin/env bash
SOURCE_REPO="/local/path/to/source/repo"
REMOTE_NAME="github"
REMOTE_PATH="https://github.com/username/repo.git"
REMOTE_BRANCH="master"
# Prepare source repo.
cd ${SOURCE_REPO}
find . -not \( -name .git -prune \) -exec git rm -r {} \;
@anavarre
anavarre / automatic-git-pull
Last active October 28, 2018 13:24
Update all your GitHub repos automatically. Could work for anything you wish (Bitbucket repos, Drupal repos...)
#!/bin/bash
REPO_PATH="/path/to/github/repos"
GITHUB="repo1 repo2 repo3"
echo "Updating GitHub repos..."
for REPO in ${GITHUB} ; do
cd ${REPO_PATH}/${REPO}/
echo -e "\tPulling ${REPO} repo..."
@anavarre
anavarre / parser.php
Created June 27, 2013 13:17
Dummy PHP parser to output SQL queries showing which files aren't managed by Drupal
<?php
/**********************************************************************************/
/* Generate a list of filenames to parse in filenames.txt (1 per line) */
/* => running "$ ls -1 > filenames.txt" will output just what you need */
/* */
/* Run the parser.php script from the same directory or change the TXT file path */
/* => Ideally, you just need to run it from the command line: "$ php parser.php" */
/* */
/* Copy/paste the queries that are returned in the MySQL prompt */
/* => MySQL will then return files that are managed by Drupal */