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
ag -l -G 'context.inc$' blocks |xargs grep -h -B1 delta |awk 'BEGIN { RS = "--"; FS="\n" } /=>/ { print $2 $3 }' |sort|uniq >block_list.txt |
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
function git() { | |
# Path to the `git` binary | |
GIT="/usr/bin/git" | |
# Sanity check | |
if [ ! -f ${GIT} ] | |
then | |
echo "Error: git binary not found" >&2 | |
return 255 | |
fi |
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
### Keybase proof | |
I hereby claim: | |
* I am chx on github. | |
* I am chx (https://keybase.io/chx) on keybase. | |
* I have a public key whose fingerprint is E8E8 29B3 83DB 433C 7C54 E763 B80D EEC8 A487 BE88 | |
To claim this, I am signing this object: |
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
public function next() { | |
$this->currentIds = NULL; | |
$this->currentRow = NULL; | |
$source_configuration = $this->migration->get('source'); | |
while ($this->getIterator()->valid()) { | |
$row_data = $this->getIterator()->current() + $source_configuration; | |
$this->getIterator()->next(); | |
$row = new Row($row_data, $this->migration->getSourcePlugin()->getIds(), $this->migration->get('destinationIds')); |
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
SELECT path | |
FROM menu_router | |
WHERE load_functions IN | |
(SELECT DISTINCT concat('a:1:{i:1;s:', length(concat(entity_type, '_load')), ':"', entity_type, '_load";}') | |
FROM field_config fc | |
INNER JOIN field_config_instance fci ON fci.field_id=fc.id | |
WHERE fc.active=1 AND fc.translatable=1) | |
AND path NOT LIKE '%/%/%'; |
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
> db.test.drop(); | |
true | |
> db.test.insert({f1:[1],f2:[1]}); | |
WriteResult({ "nInserted" : 1 }) | |
> db.test.find().sort({'f1':1,'f2':1}); | |
error: { | |
"$err" : "Runner error: BadValue cannot sort with keys that are parallel arrays", | |
"code" : 17144 | |
} |
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 | |
* Contains \Drupal\migrate_plus\Plugin\migrate\process\TermReference. | |
*/ | |
namespace Drupal\migrate_plus\Plugin\migrate\process; | |
use Drupal\taxonomy\TermStorageInterface; |
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 | |
* Contains \Drupal\Core\StreamWrapper\FileDatabaseStream. | |
*/ | |
namespace Drupal\Core\StreamWrapper; | |
use Drupal\Core\KeyValueStore\KeyValueStoreInterface; |
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 | |
define('DRUPAL_ROOT', getcwd()); | |
require_once DRUPAL_ROOT . '/Twig/lib/Twig/Autoloader.php'; | |
Twig_Autoloader::register(); | |
// Almost empty class, just swaps Twig_Node_Print objects to Drupal_Twig_Node_Print objects. | |
class Drupal_Twig_NodeVisitor implements Twig_NodeVisitorInterface { | |
function enterNode(Twig_NodeInterface $node, Twig_Environment $env) { |
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
function presave() { | |
module_invoke_all('config_presave', $this); | |
$hook = 'config_presave'; | |
$part = strtok($this->name, '.'); | |
do { | |
$hook .= '_' . $part; | |
module_invoke_all($hook, $this); | |
} while ($part = strtok('.')); | |
} |
OlderNewer