- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| # Split MYSQL dump file | |
| zcat dump.sql.gz | awk '/DROP TABLE IF EXISTS/{n++}{print >"out" n ".sql" }' | |
| # Parallel import using GNU Parallel http://www.gnu.org/software/parallel/ | |
| ls -rS *.sql | parallel --joblog joblog.txt mysql -uXXX -pYYY db_name "<" | |
| <?php | |
| use Drupal\Core\Render\BubbleableMetadata; | |
| /** | |
| * @implements hook_token_info(). | |
| */ | |
| function my_module_token_info() { | |
| $type = [ | |
| 'name' => t('Custom tokens'), |
This documentation is destined for drupal.org. Created first as a gist to make initial comments easier. Rewrites and clarifications welcome. Code samples are simplified for clarity. Perhaps a bit too much?
When talking about extensibility, there are several distinct use cases:
The reaction can be anything; outputting a message, sending an email, modifying a related object, etc. Examples:
| # each mapRoles entry maps an IAM role to a username and set of groups | |
| # Each username and group can optionally contain template parameters: | |
| # 1) "{{AccountID}}" is the 12 digit AWS ID. | |
| # 2) "{{SessionName}}" is the role session name, with `@` characters | |
| # transliterated to `-` characters. | |
| # 3) "{{SessionNameRaw}}" is the role session name, without character | |
| # transliteration (available in version >= 0.5). | |
| mapRoles: | |
| # statically map arn:aws:iam::000000000000:role/KubernetesAdmin to cluster admin | |
| - roleARN: arn:aws:iam::000000000000:role/KubernetesAdmin |
| /* | |
| https://dba.stackexchange.com/questions/96534/postgres-check-disk-space-taken-by-materialized-view?newreg=6b1d58604fce4a1fbe3033ddbb52d7ca | |
| relkind: | |
| r = ordinary table, | |
| i = index, | |
| S = sequence, | |
| v = view, | |
| m = materialized view, | |
| c = composite type, |