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
# Make git branch tab completion possible | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
# Resets a Drupal installation (destroying all data) without reinstalling. | |
# Run this command directly to clean up the old installation before | |
# reinstalling manually. | |
function drupal-reset() { | |
# Remove existing database. |
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
const data = require('../Downloads/Slack/diversity-inclusion/2019-03-07.json'); | |
const usersExport = require('../Downloads/Slack/users.json'); | |
// Load all users into memory. | |
const users = {}; | |
const contributors = {}; | |
usersExport.forEach(user => { | |
users[user.id] = user.profile.display_name_normalized ? user.profile.display_name_normalized : user.profile.real_name_normalized; | |
}); |
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
Hi Keith! A couple corrections on your post: | |
<blockquote> | |
While developing a migration module, you will often need to make changes to your migration definitions. Because these are configuration entities, you will need to reinstall your module for any changes to take effect. | |
Additionally, since Drupal 8 beta 2, Drupal modules no longer delete their configuration when they are uninstalled. Therefore, you will need to write a quick uninstall hook to handle this. | |
</blockquote> | |
This isn't exactly true. If your configuration actually <em>depends</em> on your module, it will be automatically deleted. In the case of the module you've described here, the configuration is actually owned by (and depends on) Migrate. So if you were to uninstall <em>Migrate</em>, then it would be deleted. For the most part, configuration dependencies are calculated automatically, and if there is a hard dependency, either the config will be automatically deleted, or you won't be able to uninstall the module until content that depends on |
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
# Obviously, replace the site location and DB credentials with yours. | |
# Resets a Drupal installation (destroying all data) without reinstalling. | |
# Run this command directly to clean up the old installation before | |
# reinstalling manually. | |
function drupal-reset() { | |
# Remove existing database. | |
drush sql-drop -y; | |
# Remove existing installation. | |
sudo rm -rf sites/default; |
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 | |
* flag/flag.views.inc | |
* / | |
/** | |
* Implements hook_views_data(). | |
* / |
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
core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php | |
core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php | |
core/modules/views/lib/Drupal/views/Annotation/ViewsRelationship.php | |
core/modules/views/lib/Drupal/views/Plugin/views/join/JoinPluginBase.php | |
core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php | |
core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php | |
core/modules/views/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php | |
core/modules/views/lib/Drupal/views/Plugin/views/relationship/Standard.php |
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
mysql> select count(pic.nid) as issues, pic.component | |
-> from project_issue_comments pic | |
-> inner join project_issues pi on pic.comment_number = pi.last_comment_id and pi.nid = pic.nid | |
-> where pic.pid=3060 -- core | |
-> and pic.sid in(1, 4, 8, 13, 14) -- active, postponed, NR, NW, RTBC | |
-> and pic.priority in(1, 4) -- critical, major | |
-> and pic.category in ('bug', 'task') | |
-> and pic.rid=572834 -- 8.x | |
-> group by pic.component | |
-> order by issues desc |
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 ruby | |
require 'pp' | |
contributors = Hash.new(0) | |
%x[git log 8.x --since=2011-03-09 -s --format=%s].split("\n").each do |m| | |
m.scan(/\s(?:by\s?)([\w\s,.]+)[( | ):]/i).each do |people| | |
people[0].split(',').each do |p| | |
p = p.gsub(/et all?/, '') | |
p.strip! | |
contributors[p] += 1 unless p.nil? |