Skip to content

Instantly share code, notes, and snippets.

View eydolan's full-sized avatar

phantom eydolan

View GitHub Profile
@bwente
bwente / svgLoader.php
Last active August 19, 2022 17:11
svgLoader -- MODX snippet to load an SVG file and modify the style.
<?php
$svg_file = $modx->getOption('file',$scriptProperties, '');
$svg_id = $modx->getOption('id',$scriptProperties,'mySVGId');
$svg_class = $modx->getOption('class',$scriptProperties,'mySVGClass');
$svg_name = $modx->getOption('name',$scriptProperties,'SVG');
$svg_height = $modx->getOption('height',$scriptProperties,'440px');
$svg_width = $modx->getOption('width',$scriptProperties,'440px');
$svg_background_color = $modx->getOption('background_color',$scriptProperties,'transparent');
$svg_svgstyle = $modx->getOption('svgstyle',$scriptProperties,'top:2px;position:inherit;');
@amdbuilder
amdbuilder / gist:522c3c79a54cd1c90f7c
Created June 21, 2014 04:41
MODX Performance .htaccess
A few blocks of .htaccess code to help improve your websites performance and/or functionality. I would recommend reading about each section and applying if required instead of applying everything.
The more code in your .htaccess the more your server needs to process BEFORE the HTML starts being served.
______________________ .htaccess starts after this line _________________________________
## Optional - Allow cross-origin requests. ##
# http://enable-cors.org/ - http://www.w3.org/TR/cors/
# https://code.google.com/p/html5security/wiki/CrossOriginRequestSecurity