See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| # Export site database using wp db export | |
| wp db export /wp-content/wordpress-dump.sql --all-tablespaces --single-transaction --quick --lock-tables=false | |
| # Gzip compress the recent database export | |
| gzip wordpress-dump.sql | |
| # Export sites database using wp db export and gzip compress | |
| wp db export --all-tablespaces --single-transaction --quick --lock-tables=false - | gzip -9 - > wordpress-dump.sql.gz |
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
| javascript:(function () { | |
| if (!document.getElementById('sun-maxplayer')) { | |
| var style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| style.id = 'sun-maxplayer'; | |
| style.appendChild(document.createTextNode(' | |
| /* ZDF */ | |
| html .page #skip-main .b-playerbox { width: 100vw; z-index: 999999999; transform: translate3d(-341.9px, 0px, 0px); } | |
| html .page .scroll-arrow { display: none; } | |
| html .b-header { position: static; } |
| #!/bin/bash -eux | |
| CURRENT_DIR=${PWD} | |
| NAME="$(basename $CURRENT_DIR)" | |
| DOCROOT=$(drush dd) | |
| FILEPATH=$(realpath --relative-to="$DOCROOT" "$CURRENT_DIR") | |
| drush potx --api=8 --folder=$FILEPATH/* | |
| mkdir -p ./translations | |
| mv $DOCROOT/general.pot ./translations/$NAME.pot |
| # Replace `define('...', '...');` with `const ... = ...;` | |
| :%s/define( *'\(\w*\)',\( *\)'\([^']*\)' *);/const \1 =\2'\3';/ | |
| # Replace `isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] :` with `$_SERVER['SERVER_NAME'] ??` | |
| # Using different delimiters to match an underscore literally. | |
| :%s!isset.*SERVER_NAME.*:!$_SERVER['SERVER_NAME'] ??! | |
| # Convert line endings to Linux/Unix | |
| :set ff=unix |
| wp post list --field=ID --post_type=product | xargs wp post delete --force |
| diff --git a/sites/default/settings.php b/sites/default/settings.php | |
| index b2ce930..9d0514e 100644 | |
| --- a/sites/default/settings.php | |
| +++ b/sites/default/settings.php | |
| @@ -611,7 +611,8 @@ | |
| * The 'bootstrap_config_storage' setting needs to be a callable that returns | |
| * core.services.yml. | |
| */ | |
| - # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage'); | |
| +$settings['bootstrap_config_storage'] = 'Drupal\Core\Config\BootstrapConfigStorageFactory::getFileStorage'; |
| alias.ssave=stash save | |
| alias.sshow=!f() { git stash show stash^{/$*} -p; }; f | |
| alias.sapply=!f() { git stash apply stash^{/$*}; }; f | |
| alias.assume=update-index --assume-unchanged | |
| alias.unassume=update-index --no-assume-unchanged | |
| alias.assumed=!git ls-files -v | grep ^h | cut -c 3- | |
| alias.masterdiff=log --oneline --no-merges --reverse master ^HEAD | |
| alias.staged=diff --staged | |
| alias.amend=commit --amend | |
| alias.graph=log --oneline --graph --color=auto |
| <?php | |
| require './core/vendor/autoload.php'; | |
| use Symfony\Component\Yaml\Parser; | |
| function quantile($values, $p) { | |
| sort($values); | |
| $H = (count($values) - 1) * $p + 1; | |
| $h = floor($H); | |
| $v = $values[$h - 1]; |