- create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf- edit /etc/redis-xxx.conf, illustrated as below
...| <?php | |
| // (string) $message - message to be passed to Slack | |
| // (string) $room - room in which to write the message, too | |
| // (string) $icon - You can set up custom emoji icons to use with each message | |
| public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
| $room = ($room) ? $room : "engineering"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, |
$ cp /etc/redis.conf /etc/redis-xxx.conf...| { | |
| "presets": ["@babel/preset-env"] | |
| } |
| <?php | |
| if (empty($parent)) {$parent = $modx->resource->id;} | |
| $pids = array_merge(array($parent), $modx->getChildIds($parent)); | |
| $ids = array(); | |
| $q = $modx->newQuery('msProduct'); | |
| $q->where(array('class_key' => 'msProduct','parent:IN' => $pids,'published' => 1,'deleted' => 0)); | |
| $q->select('`msProduct`.`id`'); | |
| if ($q->prepare() && $q->stmt->execute()) { | |
| $ids = $q->stmt->fetchAll(PDO::FETCH_COLUMN); |
| Snippet: [[SnippetName]] | |
| Chunk: [[$ChunkName]] | |
| System Setting: [[++SettingName]] | |
| TV: [[*fieldName/TvName]] | |
| Link tag: [[~PageId? ¶mName=`value`]] | |
| Placeholder: [[+PlaceholderName]] | |
| <?php |
| from dataclasses import dataclass, field | |
| from itertools import count | |
| from datetime import datetime | |
| counter = count() | |
| @dataclass | |
| class Event: | |
| message: str |