SSH into the primary clouds as the cXXXX user, then run the following commands:
> cd www
> sh -c "$(curl https://modx.co/scripts/install.sh)"
> source ~/.profile
| import requests | |
| import json | |
| import os | |
| from pipedream.script_helpers import (steps, export) | |
| from datetime import timedelta, datetime | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| # Zendesk API credentials | |
| ZENDESK_SUBDOMAIN = os.getenv("ZENDESK_SUBDOMAIN") |
| # Script rewritten for PipeDream.com | |
| import requests | |
| import datetime | |
| import base64 | |
| import os | |
| # Wakatime API endpoint for getting time entries | |
| WAKATIME_API_ENDPOINT = "https://wakatime.com/api/v1/users/current/summaries" | |
| # Your Wakatime API Key |
| SELECT | |
| ID id, | |
| 'document' type, | |
| post_title pagetitle, | |
| post_excerpt description, | |
| post_name alias, | |
| 1 published, | |
| 0 isfolder, | |
| REGEXP_REPLACE(post_content, '<!-- (.*) -->', '') content, | |
| 1 richtext, |
| devices: ( | |
| { | |
| name: "Wireless Mouse MX Master 2S"; | |
| smartshift: | |
| { | |
| # Do not enable free scroll | |
| on: true; | |
| threshold: 15; # 7 is ideal for work | |
| }; | |
| hiresscroll: |
| <?php | |
| //** On WebPage Pre-Render **// | |
| $corePath = $modx->getOption('preview.core_path', null, $modx->getOption('core_path') . 'components/preview/'); | |
| require_once $corePath . '/model/preview/preview.class.php'; | |
| $preview = new Preview($modx); | |
| if(!$modx->user->hasSessionContext('mgr')) return; // currently forcing manager context | |
| if(!$modx->getOption('preview.frontendEnabled')) return; // currently forcing manager context | |
| $qsItem = $modx->getOption('preview.previewKey'); | |
| $compareItem = $modx->getOption('preview.compareKey'); |
| <?php | |
| $base_path = dirname(__FILE__) . '/content/'; | |
| if($_GET['q']) { | |
| $q = explode('?', $_GET['q']); | |
| $file_check = $base_path.preg_replace('"\.html$"', '.php', $q[0]); | |
| if (substr($file_check, -1) == "/") { | |
| $file_check .= "index.php"; | |
| } |
| const showrandom = document.querySelectorAll("[showrandom]"); | |
| showrandom.forEach(el=>{ | |
| const count = el.getAttribute('showrandom') ? el.getAttribute('showrandom') : 1; | |
| const children = el.children; | |
| while(children.length > count){ | |
| const random = Math.floor(Math.random() * children.length); | |
| children[random].remove(); | |
| } | |
| }); |
| <?php | |
| if(empty($input)) return; | |
| $url = rtrim($modx->getOption('site_url'), '/').'/'.ltrim($input,'/'); | |
| echo "<meta name=\"image\" property=\"og:image\" content=\"$url\" />"; | |
| $path = rtrim($modx->getOption('base_path'), '/').'/'.ltrim($input,'/'); | |
| $size = @getimagesize($path); | |
| if ($size) { | |
| $width = $size[0]; |