This documentation was merged into Experience Builder Drupal Canvas! It now lives at https://git.drupalcode.org/project/canvas/-/blob/1.x/docs/intro.md?ref_type=heads
This file contains hidden or 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 php-eval "\Drupal::service('config.installer')->installDefaultConfig('module', 'module_name');" |
This file contains hidden or 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 | |
| // Import arbitrary config from a variable. | |
| // Assumes $data has the data you want to import for this config. | |
| $config = \Drupal::service('config.factory')->getEditable('filter.format.basic_html'); | |
| $config->setData($data)->save(); | |
| // Or, re-import the default config for a module or profile, etc. | |
| \Drupal::service('config.installer')->installDefaultConfig('module', 'my_custom_module'); |
This file contains hidden or 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
| # Schema for the views plugins. | |
| views.filter.project_size_range_select: | |
| type: views_filter | |
| label: 'Foobar numeric' | |
| views.filter_value.project_size_range_select: | |
| type: views.filter_value.numeric | |
| label: 'Foobar Numeric' |
This file contains hidden or 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/bash | |
| # Check arguments and requirements. | |
| if [ ${#@} -lt 1 ]; then | |
| echo "This script expects one argument (site machine name)." | |
| exit 1 | |
| fi | |
| if [ -x ${HOME}/.my.cnf ]; then | |
| echo "This script requires ${HOME}/.my.cnf." |
This file contains hidden or 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
| # alias to edit commit messages without using rebase interactive | |
| # example: git reword commithash message | |
| reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
| # delete all repos in an org | |
| gh repo list YOUR_ORG_NAME --limit 4000 --json nameWithOwner --jq '.[].nameWithOwner' | xargs -I {} gh repo delete {} --yes | |
| # delete all forks in an org | |
| gh repo list YOUR_ORG_NAME --limit 4000 --json nameWithOwner,isFork --jq '.[] | select(.isFork) | .nameWithOwner' | xargs -I {} gh repo delete {} --yes |
This file contains hidden or 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/bash | |
| while : | |
| do | |
| clear | |
| git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $* | |
| sleep 1 | |
| done |