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
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))" |
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
git fetch --prune && git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d |
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
<?php | |
/** | |
* @file | |
* Migrate D6 node body into D8 Paragraphs field. | |
* | |
* @see http://www.amitgoyal.in/2016/03/d6-d8-migration-d6-body-d8-paragraph-type-text.html | |
*/ | |
namespace Drupal\ixis_migrate_from_d6\Plugin\migrate\process; |
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
<?php | |
use \AcceptanceTester\AuthenticatedSteps; | |
use \Codeception\Module\Drupal\ContentTypeRegistry\ContentType; | |
use \Codeception\Module\Drupal\Pages\AdminContentTypesPage; | |
use \Codeception\Module\Drupal\Pages\AdminManageFieldsPage; | |
/** | |
* Test defined content types and fields. | |
* | |
* @guy AcceptanceTester\AuthenticatedSteps |
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 | |
mysqldump -u username -p --no-data dbname | grep ^DROP > drop.sql | |
mysql -u username -p dbname < drop.sql | |
rm drop.sql |
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
<?php | |
use Drupal\filter\Plugin\Filter\FilterNull; | |
/** | |
* Run on migrated text formats which have "missing" or null filters. | |
* | |
* @see \Drupal\filter\FilterFormatFormBase::form() | |
*/ | |
function _update_text_formats() { |
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
#XDEBUG_CONFIG="profiler_enable=1" | |
XDEBUG_CONFIG="idekey=phpstorm" | |
export XDEBUG_CONFIG |
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
// "Main" | |
<?php | |
/** | |
* PHP for Developers - Exercises | |
* | |
* main/testing | |
*/ | |
spl_autoload_register(function ($class_name) { |
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
<?php | |
/** | |
* @file | |
* An example of how to create a new Drush command which wraps an existing command, allowing some customisation. | |
* | |
* Note any file containing this snippet should be suffixed '.drush.inc', not '.drush.inc.php'. | |
*/ | |
/* Implements COMMANDFILE_drush_command(). */ | |
function sql_sync_wrapper_drush_command() { |
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/sh | |
FILE_FORMAT="JPG" | |
# Show dates of all JPG files in current directory, in human readable format. | |
exiftool -d '%r %a, %B %e, %Y' -DateTimeOriginal -S -s -ext $FILE_FORMAT . | |
# Fiddle the dates - some date fields forward. | |
# Format is Y:M:D h:m:s | |
exiftool -F -AllDates+="2:6:0 0" *$FILE_FORMAT |
NewerOlder