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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| ############################################ | |
| # Nightscout -> Nightscout full migrator | |
| # - Paginated per endpoint | |
| # - Stateful (resume-safe) | |
| # - URL-encoded find[date][$gte] (curl-safe) | |
| # - Endpoint-specific batch sizes to avoid 413 | |
| ############################################ |
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
| function generatePDF() { | |
| var canvas = document.querySelector("#PDF"); | |
| screenWidth = parseFloat(window.getComputedStyle(canvas).width); | |
| var charts = document.querySelectorAll('.filament-widgets-container'); | |
| var images = []; | |
| charts.forEach(function (el) { | |
| html2canvas(el, { | |
| scale: 2480 / screenWidth // 2480px - size for A4 paper, 300 dpi |
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 | |
| /** | |
| * This script is to be placed in the root of Joomla! and run via the browser, | |
| * it will empty DJ Classifieds tables so can only be used on w J4 sites | |
| * you MUST have already copied the Joomla! Users over too as we just set the user_ids. | |
| **/ | |
| define('_JEXEC', 0); | |
| $mediaFolderReplacement = 'com_jomclassifieds'; // replace com_jomclassifieds with this value; i.e. /media/classifieds_archive instead of the original /media/jom_classifieds |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- Usage - run phing -f linker.xml -Dp=/var/www/je --> | |
| <project name="linker" default="link" basedir="."> | |
| <property name="URI.base" value="./"/> | |
| <resolvepath propertyName="URI.base" file="${URI.base}"/> | |
| <property name="p" value="" /> | |
| <property name="component" value="com_rsvppro"/> | |
| <property name="rootPath" value="${URI.base}"/> |
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 | |
| // Simple script to insert lots of sessions to Joomla _session table. | |
| $limit = 20000; | |
| // Database connection using mysqli | |
| $dbname = 'j33jq'; | |
| $dbuser = 'root'; | |
| $dbpass = 'root'; |
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 | |
| // Make sure the WP File is called wpxmlfile.xml | |
| $xmlfile = file_get_contents('wpxmlfile.xml'); | |
| $wpfile = simplexml_load_string($xmlfile)->channel; | |
| // Set the parent menu item alias for the posts to be accessed under | |
| // Assumed at present it is 'News with the alias news' | |
| $newParentAlias = '/news/'; |
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 | |
| /** In this scenario I have a custom field, type list with the name 'company-name' for my users **/ | |
| $user = JFactory::getUser(); | |
| JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); // Load the custom fields helper | |
| $ProfileFields = FieldsHelper::getFields('com_users.user', $user, true); | |
| foreach ($ProfileFields as $field) { |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <metadata> | |
| <layout title="COM_CONTENT_ARTICLES_VIEW_DEFAULT_TITLE"> | |
| <message> | |
| <![CDATA[COM_CONTENT_ARTICLES_VIEW_DEFAULT_DESC]]> | |
| </message> | |
| </layout> | |
| <fields name="request"> | |
| <fieldset name="request" | |
| > |
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
| {"field20":"40","field120":"60","field27":["1"],"field1":["VSimexRPuXNuFEng"],"field22":["1"],"field2":["wEmlaFFzH"],"field3":["QRaAfuSoQJn"],"field4":["oLqqdvAB"],"field5":"vIMJuU ofwnvszwaqik, [url=http:\/\/aqdrbzyjcyiy.com\/]aqdrbzyjcyiy[\/url], [link=http:\/\/oxuzfknyjbin.com\/]oxuzfknyjbin[\/link], http:\/\/cntzorajsini.com\/","field6":"KuRVPJLkaUYUGHs","field7":"eLzwiuKcnW","field9":["1"],"field10":["1"],"field11":["0"],"field13":["0"],"field14":["1"],"field15":["vIMJuU <a href="http://ofwnvszwaqik.com/" />ofwnvszwaqik, [url=http:\/\/aqdrbzyjcyiy.com\/]aqdrbzyjcyiy[\/url], [link=http:\/\/oxuzfknyjbin.com\/]oxuzfknyjbin[\/link], http:\/\/cntzorajsini.com\/"],"field16":["1"],"field18":["vIMJuU <a href="http://ofwnvszwaqik.com/" />ofwnvszwaqik, [url=http:\/\/aqdrbzyjcyiy.com\/]aqdrbzyjcyiy[\/url], [link=http:\/\/oxuzfknyjbin.com\/]oxuzfknyjbin[\/link], http:\/\/cntzorajsini.com\/"],"field19":["vIMJuU <a href="http://ofwnvszwaqik.com/" />ofwnvszwaqik, [url=http:\/\/aqdrbzyjcyiy.com\/]aqdrbzyjcyiy[\/url] |
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
| <p><?php echo JText::_("JEV_CPANEL_LATEST_EVENTS_ADDED_DESC"); ?> </p> | |
| <?php | |
| // Get a db connection. | |
| $db = JFactory::getDbo(); | |
| // Create a new query object. | |
| $query = $db->getQuery(true); | |
| // Select all records from the user profile table where key begins with "custom.". | |
| // Order it by the ordering field. |
NewerOlder