Skip to content

Instantly share code, notes, and snippets.

View chrisdempsey's full-sized avatar

Chris Dempsey chrisdempsey

View GitHub Profile
@chrisdempsey
chrisdempsey / Bookmarks
Last active March 23, 2020 06:05
Useful bookmarks.
- MODX Addons/Extras
- PHP Libraries + Classes
- jQuery Plugins
- Web Services
- Bootstrap Resources
- Web Tools - Online
- Web Resources
- Javascript Resources, Plugins + Libraries
- Graphic Resources
- Fonts
@chrisdempsey
chrisdempsey / 00 MODX Trustpilot RSS Reade - readme.txt
Last active August 29, 2015 14:05
Trustpilot RSS Reader for MODX
Collection of code blocks for the Trustpilot RSS Reader example.
@chrisdempsey
chrisdempsey / 00 Sweet Captcha FormIt Hook for MODX - readme.txt
Last active August 29, 2015 14:06
Sweet Captcha FormIt Hook for MODX
Collection of code blocks to create a FormIt Hook for Sweet Captcha.
Sweet Captcha - Fun and Human Friendly Captcha: http://sweetcaptcha.com/ (requires no cost account to be set up).
01 SwtCaptchaFormItHook.php - Hook to validate Sweet Captcha
02 SwtCaptchaHTML.php - Output Sweet Captcha HTML
03 sweetcaptcha.php - 01 SwtCaptchaFormItHook.php assumes sweetcaptcha.php is in your web root directory.
Note: 03 sweetcaptcha.php requires your account credentials to be defined by updating the placeholders at the
@chrisdempsey
chrisdempsey / .htaccess
Last active August 29, 2015 14:06 — forked from opengeek/.htaccess
# Add this before your MODX Friendly URLs RewriteCond's and RewriteRule...
RewriteCond /abs/path/to/docroot/statcache%{REQUEST_URI} -f
RewriteRule ^(.*)$ /statcache/$1 [L,QSA]
@chrisdempsey
chrisdempsey / 00 MODX Plugins Collection
Last active November 23, 2020 14:07
Collection of MODX Plugins.
01-autoResizeOnUpload.php - Plugin to automatically resize images uploaded via MODX that are larger than the dimensions specified
in the config within the plugin code. This should be considered experimental but has been tested
successfully on MODX Revolution 2.3.2-pl (traditional) running on Windows Server 2008.
02-set-expires-headers.php - Sets expires headers to value defined in plugin
@chrisdempsey
chrisdempsey / wordpress.web.config.xml
Last active June 4, 2019 22:56
web.config for Wordpress by SAOTN
<!-- source: https://www.saotn.org/my-wordpress-web-config/ -->
<?xmlversion="1.0"encoding="UTF-8"?>
<configuration>
<configSections>
<!--
Load HttpBL assembly to keep suspicious and malicious web robots
out. Get your Access Key @ https://www.projecthoneypot.org/create_account.php
-->
<section name="HttpBL" type="HttpBL.Settings" />
<?php
/**
*
* Plugin fires OnWebPagePrerender system event, loads Minify HTML by Mr Clay and minifies the requested Resource HTML inc. inline css and js.
*
* If used in conjunction with StatCache the minified HTML is cached and served as a flat file via IIS Rewrite.
*
* CREDITS
*
* http://rtfm.modx.com/revolution/2.x/developing-in-modx/basic-development/plugins
@chrisdempsey
chrisdempsey / Contract Killer 3.md
Created May 25, 2016 18:25 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

<?php
/**
* registerAssets
*
* DESCRIPTION
*
* Registers assets to MODX Placeholder.
*
* Requires call to [[activateAssets]] before closing body tag in template. This grabs files list from the Placeholder and outputs a javascript block
* of assets to be injected after page load.
<?php
/**
* activateAssets
*
* DESCRIPTION
*
* Activates assets registered in placeholder.
*
* PROPERTIES:
*