Revised date: 13/03/2013
Between us: Crunch Design
and you: [customer name]
My Big List of Links | |
================================ | |
**Q. Does this link belong in this list?** | |
1. Yes, if it is a regular source of reference | |
2. Yes, if it contains important knowledge I want to learn | |
3. Yes, if it sets the standards I aspire to work by | |
4. Yes, if its content will push my boundaries | |
5. Yes, if it provides inspiration |
If you are using git, so you can take advantage of static elements within MODX, you will need to be aware that simply updating your files does not mean MODX will pick that up. It will pick up changes in a file IF you the element is being called uncached.
http://forums.modx.com/forums/thread/73346/static-resources-don-t-update-without-cache-clear http://forums.modx.com/thread/73002/static-sources-caching-and-setup
This is not a big deal while working on a development site, performance is not your initial priority at that point. But when you get to deploying, you'll need to know that updating a file will not necessarily update how your site runs, and you don't want to be clearing your entire site cache. A big site would be taking a heavy server hit as its visitors trigger all pages regenerating their cache...
For an overview of MODX caching strategy, start at the documentation (of course) if you havn't already:
<?php | |
$docs = $modx->getCollection('modDocument'); | |
$pattern = '/www.xxx.com/(\d+)/'; | |
$replacement = '[[~$1]]'; | |
$count = 0; | |
foreach ($docs as $doc) { | |
$content = $doc->getContent(); | |
$hash1 = sha1($content); |
#!/bin/bash | |
# modx-upgrade.sh | |
# --------------- | |
# A shell script to help automate the upgrade of a MODX Revolution installation | |
# This script is for traditional installations only - not advanced | |
# | |
# Instructions: | |
# 1. Update the config section with your own site specific details | |
# 2. Upload this file to your server, preferably outside of web root |
// jQuery plugin to create equal height elements | |
// Will make all elements that match the seletor the same height - matching the tallest of all of the elements. | |
// | |
// usage: | |
// $('.selector').equalHeights(); | |
(function ( $ ) { | |
$.fn.equalHeights = function(els) { | |
var maxHeight = 0; | |
this.each(function(){ |
angular.module('ng').run(['$rootScope', function($rootScope) { | |
$rootScope.safeApply = function(fn) { | |
var phase = this.$root.$$phase; | |
if(phase == '$apply' || phase == '$digest') { | |
if(fn && (typeof(fn) === 'function')) { | |
fn(); | |
} | |
} else { | |
this.$apply(fn); | |
} |
window.app = angular.module('mainApp', []); | |
app.controller('mainCtrl', function ($scope) { | |
$scope.include = 'yes'; | |
}); | |
app.directive('radioSwitch', ['analyticsSettings', function (analyticsSettings) { | |
return { | |
restrict: 'A', | |
scope: { |
angular | |
.module('utilities') | |
.directive('preventAnimations', ['$animate', function ($animate) { | |
return { | |
restrict: 'A', | |
link: function (scope, element, attrs) { | |
$animate.enabled(element, false); | |
} | |
}; | |
}]); |