# Clear cache
$ drush cc # Drupal 6 & 7
$ drush cr # Drupal 8
# Export Database
$ drush sql-dump > ~/database.sql
Useful for altering one or multiple commits. Squashing them into a single commit etc.
This Gist contains handy snippets for extracting just the version number from various application version strings.
At the time of writing, the majority of these snippets were created for applications installed on a MAC via Homebrew. Please feel free to provide snippets for unsupported setups if required.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# For current version see: | |
# https://github.com/JParkinson1991/bin/blob/master/google-chrome | |
# Wraps cli usage of google chrome on MacOS | |
# | |
# Requirments: Google Chrome | |
# | |
# Run in default mode, open/visible browser, environment defined address/port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the top-most .editorconfig file; do not search in parent directories. | |
root = true | |
# Default configuration | |
[*] | |
end_of_line = LF | |
indent_style = space | |
indent_size = 4 | |
charset = utf-8 | |
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================== | |
# Project Ignores | |
# | |
# - Place project specific ignore statements in this section. | |
# ============================================================================== | |
# ============================================================================== | |
# Dreamweaver Ignores | |
# | |
# - Notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Extracts a json value from a json containing string | |
# | |
# Usage: | |
# get_json_value <key> [occurrence] | |
# | |
# Examples: | |
# echo $string | get_json_value theKey 1 | |
# cat file.json | get_json_value theKey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Usage envsubst-recursive.sh [source root] | |
# Options: | |
# -a|--append - Set string to append to processed source file names | |
# -f|--filter - Set the filename filter (only process files matching this filter) | |
# -o|--output - Set the output directory for substituted file | |
# -q|--quiet - Enable quiet mode, no script output | |
# -v|--variables - Set the variable names to replace only. IMPORTANT: Single quote this argument | |
# Script variable defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Taken from answer: https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself/246128#246128 | |
# Option 1: One Liner | |
# | |
# "It will work as long as the last component of the path used to find the script is not a symlink (directory links are OK)" | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
# Option 2: Bulletproof | |
# |
OlderNewer