The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
selector { | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; | |
filter: alpha(opacity=30); | |
-moz-opacity: 0.3; | |
-khtml-opacity: 0.3; | |
opacity: 0.3; | |
} |
.fa-bounce { | |
display: inline-block; | |
position: relative; | |
-moz-animation: bounce 1s infinite linear; | |
-o-animation: bounce 1s infinite linear; | |
-webkit-animation: bounce 1s infinite linear; | |
animation: bounce 1s infinite linear; | |
} | |
@-webkit-keyframes bounce { |
127.0.0.1 api.ak.facebook.com | |
127.0.0.1 api.connect.facebook.com | |
127.0.0.1 api.facebook.com | |
127.0.0.1 app.facebook.com | |
127.0.0.1 apps.facebook.com | |
127.0.0.1 ar-ar.facebook.com | |
127.0.0.1 badge.facebook.com | |
127.0.0.1 blog.facebook.com | |
127.0.0.1 connect.facebook.com | |
127.0.0.1 connect.facebook.net |
<?php | |
/** | |
* Plugin Name: WP Basic HTTP Authentication | |
* Plugin URI: | |
* Description: Adds HTTP Authentication to a WordPress site | |
* Author: James Morrison | |
* Version: 1.0.2 | |
* Author URI: https://www.jamesmorrison.me | |
**/ |
<?php | |
function send_http_auth_headers(){ | |
header('WWW-Authenticate: Basic realm="Your Website Name Restricted"'); | |
header('HTTP/1.0 401 Unauthorized'); | |
echo 'Please speak to an administrator for access to the this feature.'; | |
exit; | |
} | |
add_action('template_redirect', 'maybe_add_http_auth_basic', 0); | |
function maybe_add_http_auth_basic(){ | |
# Add your specific URI segment (i.e. http://example.com/segment-string/) |
<?php | |
/** | |
* SessionManager | |
* A script that can be used for easy control over your session variables. | |
* Put this script in your core/components/ folder, inside a sessionman/ subdirectory. | |
* | |
* Load this one in your snippets/plugins like; | |
* | |
* $sessman = $modx->getService('session','SessionManager', $modx->getOption('sessman.core_path',null,$modx->getOption('core_path').'components/sessionman/'), $scriptProperties); | |
* if(!($sessman instanceof SessionManager)) { $modx->log(modX::LOG_LEVEL_ERROR, 'Session manager could not be loaded..'); return ''; } |
<?php | |
/** | |
* Case-insensitive in_array() wrapper. | |
* | |
* @param mixed $needle Value to seek. | |
* @param array $haystack Array to seek in. | |
* | |
* @return bool | |
*/ |
# 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] |