Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
core = "7.x" | |
name = "My Module" | |
description = "Example on how to add a filter handler with DATETIME" | |
package = "My modules" | |
php = "5.2.4" | |
project = "my_module" | |
version = "7.x-0.1" | |
files[] = "my_module_handler_filter_datetime.inc" |
// Tell Drupal to cancel this user. | |
// The third argument can be one of the following: | |
// - user_cancel_block: disable user, leave content | |
// - user_cancel_block_unpublish: disable user, unpublish content | |
// - user_cancel_reassign: delete user, reassign content to uid=0 | |
// - user_cancel_delete: delete user, delete content | |
user_cancel(array(), $uid, 'user_cancel_reassign'); | |
// user_cancel() initiates a batch process. Run it manually. | |
$batch =& batch_get(); |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
<?php | |
/** | |
* Implements hook_theme_suggestions_HOOK_alter() for node.html.twig. | |
*/ | |
function MYTHEME_theme_suggestions_node_alter(array &$suggestions, array $variables) { | |
// Add template suggestions based on the current view mode. | |
$node = $variables['elements']['#node']; | |
$suggestions[] = 'node__' . $variables['elements']['#view_mode']; | |
$suggestions[] = 'node__' . $node->bundle() . '__' . $variables['elements']['#view_mode']; | |
} |
# Taxonomy terms: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php | |
# Menu links: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php | |
# File items: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php | |
# Nodes: |
<?php | |
// Delete all nodes. | |
entity_delete_multiple('node', \Drupal::entityQuery('node')->execute()); | |
// Delete all files. | |
entity_delete_multiple('file', \Drupal::entityQuery('file')->execute()); | |
// Delete all taxonomy terms. | |
entity_delete_multiple('taxonomy_term', \Drupal::entityQuery('taxonomy_term')->execute()); |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
Source: https://gist.github.com/g0tmi1k/7476eec3f32278adc07039c3e5473708
Improved (Ruby) exploit ~ http://github.com/dreadlocked/Drupalgeddon2/ // https://www.exploit-db.com/exploits/44449/