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 | |
$url = 'https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700&display=swap'; | |
$opts = [ | |
'http' => [ | |
'method' => 'GET', | |
'header' => 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36' | |
] | |
]; |
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
# Logs and databases # | |
###################### | |
*.log | |
*.logs | |
*.sql | |
*.sqlite | |
server-logs | |
# OS generated files # | |
###################### |
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
server { | |
listen 80; | |
server_name localhost; | |
root /var/doodle/www; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
index index.php index.html index.htm; |
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
FROM php:7.4-fpm | |
RUN apt-get update -y | |
RUN apt-get install -y \ | |
libbz2-dev \ | |
libxml2-dev \ | |
git \ | |
libzip-dev \ | |
libc-client-dev \ | |
libkrb5-dev \ |
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
#!/bin/bash | |
echo "Select theme version:"; | |
echo "1. Basic"; | |
echo "2. Advanced"; | |
echo "3. Webshop"; | |
while [ "$version" = "" ] | |
do | |
read -p "Enter selected number: " version; |
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 | |
$modx->addPackage('site', MODX_CORE_PATH . 'components/site/model/'); | |
$manager = $modx->getManager(); | |
$objects = []; | |
$schemaFile = MODX_CORE_PATH . 'components/site/model/schema/site.mysql.schema.xml'; | |
if (is_file($schemaFile)) { | |
$schema = new SimpleXMLElement($schemaFile, 0, true); | |
if (isset($schema->object)) { | |
foreach ($schema->object as $obj) { |
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
<!doctype html> | |
<html {if $_config.manager_direction EQ 'rtl'}dir="rtl"{/if} lang="{$_config.cultureKey}" xml:lang="{$_config.cultureKey}"> | |
<head> | |
<meta charset="{$_config.modx_charset}"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>{$_lang.login_title} | {$_config.site_name|strip_tags|escape}</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="robots" content="noindex, nofollow"> | |
{if $_config.manager_favicon_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
<?php | |
class SixtyCoder { | |
public $table = '0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'; | |
public function to60($number = 0) { | |
$number = (int) $number; | |
$output = ''; | |
return $this->divide($number); | |
} | |
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 | |
require_once 'postcalc_light_config.php'; | |
global $modx; | |
function postcalc_request($From, $To, $Weight, $Valuation = 0, $Country = 'RU') | |
{ | |
$key = ''; //Ваш ключ | |
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 | |
if ($modx->event->name != "OnHandleRequest" || $modx->context->key == 'mgr') { | |
return; | |
} | |
$tmp = explode('?', $_SERVER['REQUEST_URI']); | |
$link = trim($tmp[0], '/'); | |
if (isset($tmp[1]) && $tmp[1]) { | |
$params = '?' . $tmp[1]; | |
} else { | |
$params = ''; |