Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
class privateConfiguration extends sfApplicationConfiguration | |
{ | |
public function configure() | |
{ | |
$this->dispatcher->connect('form.post_configure', array($this, 'listenToFormPostConfigure')); | |
} | |
/** |
#!/usr/bin/env bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |
<?php | |
include 'config.core.php'; | |
include MODX_CORE_PATH . 'model/modx/modx.class.php'; | |
$modx = new modX(); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
$modx->initialize('mgr'); | |
$modx->setLogLevel(modX::LOG_LEVEL_INFO); |
// Call the form with the unique xtype | |
items: [{ | |
xtype: 'campermgmt-newcamper-form-brandscombo', | |
fieldLabel: 'Merknaam', | |
name: 'brand', | |
id: 'brand', | |
allowBlank: false, | |
vtype: 'alphanum' | |
} | |
<...> |
# Change ACL on the app/logs and app/cache directories | |
after 'deploy', 'deploy:update_acl' | |
# This is a custom task to set the ACL on the app/logs and app/cache directories | |
namespace :deploy do | |
task :update_acl, :roles => :app do | |
shared_dirs = [ | |
app_path + "/logs", |
# ## Backbone model caching | |
# This is a simple solution to the problem "how do I make less requests to | |
# my server?". | |
# | |
# Whenever you need a model instance, this will check first if the same thing | |
# has been fetched before, and gives you the same instance instead of fetching | |
# the same data from the server again. | |
# | |
# Reusing the same instance also has the great side-effect of making your | |
# model changeable from one part of your code, with your changes being available |
Examples of above script: | |
# into a standard directory, where config.xml resides in the current working directory | |
sh install.sh /home/modx/public_html/ | |
# with a custom config.xml file | |
sh install.sh /home/modx/public_html/ /opt/local/modx/config.xml |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# 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] |
CCA2 | Name | CCA3 | Nationality | |
---|---|---|---|---|
AD | Andorra | AND | Andorran | |
AE | United Arab Emirates | ARE | Emirati | |
AF | Afghanistan | AFG | Afghan | |
AG | Antigua and Barbuda | ATG | Antiguan, Barbudan | |
AI | Anguilla | AIA | Anguillian | |
AL | Albania | ALB | Albanian | |
AM | Armenia | ARM | Armenian | |
AN | Netherlands Antilles | ANT | Dutch | |
AO | Angola | AGO | Angolan |