This file contains 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 | |
# This script will whitelist the IP address of the server in Sucuri's firewall. | |
# Variables | |
# The API key for the Sucuri API | |
API_KEY="" | |
# The API secret for the Sucuri API | |
API_SECRET="" |
This file contains 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
mxmkjvgsdzfhseightonetwoeight7 | |
3five4s84four9rtbzllggz | |
75sevenzdrpkv1onetwo | |
3q7ctkghhqkpb5four | |
ccxpblrgrjxcgrhjxfmtwonine8eightzzrdn4 | |
6lqjrhbnxxcqlpnmjsthreesixxsxcgqsxmdx7 | |
35llbrhh | |
fivethreejcqpfqmcmvjlmhlbzpxlsmktzkmtmv8p | |
3369eightnine89 | |
onesix4qqnlzdsevennmmrcgkndlsgm3 |
This file contains 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 | |
// run plugin OnFileManagerUpload | |
switch ($modx->event->name) { | |
case "OnFileManagerUpload": | |
if(!empty($files)){ | |
foreach($files as $file){ | |
if ($file['type'] != "image/jpeg" && $file['type'] != "image/png") | |
return; | |
// max number of pixels wide or high | |
$max_image_dimension = $modx->getOption('max_image_dimension',$scriptProperties,0); |
This file contains 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
SELECT a.id, a.templatename, COUNT(b.id) as resources FROM modx_site_templates AS a | |
LEFT JOIN modx_site_content AS b ON a.id = b.template AND b.published = 1 AND b.deleted = 0 | |
WHERE b.id IS NOT NULL | |
GROUP BY a.id; |
This file contains 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
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") |
This file contains 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
# 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 |
This file contains 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
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, |
This file contains 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
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(); | |
} | |
}); |
This file contains 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
[ | |
{"caption":"Image", "fields":[ | |
{"field":"image","caption":"Image","inputTVtype":"image"} | |
]}, | |
{"caption":"Info", "fields": [ | |
{"field":"title","caption":"Title"}, | |
{"field":"description","caption":"Description","inputTVtype":"richtext"} | |
]} | |
] |
This file contains 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
SELECT id, type, pagetitle, longtitle, description, alias, alias_visible, link_attributes, published, pub_date, unpub_date, parent, isfolder, introtext, content, richtext, template, menuindex, searchable, cacheable, createdby, createdon, editedby, editedon, deleted, deletedon, deletedby, publishedon, publishedby, menutitle, donthit, privateweb, privatemgr, content_dispo, hidemenu, 'MODX\\Revolution\\modDocument' AS class_key, 'web' AS context_key, 1 AS content_type, null AS uri, 0 AS uri_override, 0 AS hide_children_in_tree, 1 AS show_in_tree, null AS properties FROM `modx_site_content` |
NewerOlder