This is a collection of files, scripts and tips to get local development up and running.
Import a database via drush.
drush sql-drop
drush sql-cli < /mnt/db/backup.sql
Export a database via drush
#Fixes issues with Bluetooth audio stuttering/quality. | |
sudo defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 53 |
#!/bin/bash | |
# PHP CodeSniffer CI Task | |
# | |
# Based off of git pre-commit hook | |
# https://github.com/s0enke/git-hooks/tree/master/phpcs-pre-commit | |
# | |
# Export Variables to be set by CI Agent / Bot | |
# PHPCS_BIN=/usr/bin/phpcs | |
# PHPCS_CODING_STANDARD=PEAR | |
# PHPCS_IGNORE= |
This is a collection of files, scripts and tips to get local development up and running.
Import a database via drush.
drush sql-drop
drush sql-cli < /mnt/db/backup.sql
Export a database via drush
git checkout master | |
if ! git diff-files --quiet --ignore-submodules | |
then | |
echo "there are changes in the working tree exiting..." | |
exit 1 | |
fi | |
git pull origin | |
git pull origin --tags | |
git tag -a "$tag" -m "deploy tag $tag" |
#!/usr/bin/env bash | |
remote_alias=origin | |
while read b; do | |
echo $b | |
#commented for dry run | |
#git branch -d $b | |
#git push origin | |
done <git_remote_branches.txt |
dinghy create --provider virtualbox --virtualbox-memory 4096 --virtualbox-cpu-count 4 --virtualbox-disk-size 40000 |
<?php | |
function delete_node_revisions_before_timestamp($nid, $timestamp) { | |
$node = node_load($nid); | |
$revisions = node_revision_list($node); | |
dpm($revisions); | |
foreach($revisions as $revision) { | |
if($revision->timestamp < $timestamp) { | |
dpm($revision->vid); | |
node_revision_delete($revision->vid); |
drush @site.env ac-task-info $(drush @site.env ac-task-list | awk '{x=$1}END{print x}') |
"/Users" 192.168.99.100 -alldirs -mapall=502:20 |
export CONTAINER=drupal | |
export DRUSHROOT=/var/www/docroot | |
export SITEHOST=drupal.loc | |
alias drush="docker exec -it $CONTAINER drush --root=$DRUSHROOT -l $SITEHOST" |