Skip to content

Instantly share code, notes, and snippets.

/* Android stock browser won't let you set font-size smaller than 8px unless you apply this. */
:root {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
-o-text-size-adjust: none;
text-size-adjust: none;
}
<?php
require_once (dirname(dirname(__FILE__)).'/create.class.php');
/**
* Creates a chunk.
*
* @param string $name The name of the chunk.
* @param string $description (optional) The description of the chunk.
* @param integer $category The category the chunk is assigned to.
* @param string $snippet The code of the chunk.
* @param boolean $locked Whether or not the chunk can only be accessed by
<?php
require_once (dirname(dirname(__FILE__)).'/create.class.php');
/**
* Create a snippet.
*
* @param string $name The name of the element
* @param string $snippet The code of the snippet.
* @param string $description (optional) A brief description.
* @param integer $category (optional) The category to assign to. Defaults to no
* category.
<?php
set_time_limit(0);
class Timer {
public $timer = 0;
public function start() {
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$this->timer = $mtime;
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
# httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
@exside
exside / rbak.php
Created March 3, 2013 02:56 — forked from hansek/rbak.php
<?php
/**
* MODX Revolution Backup script
*
* Useful for fast moving MODX Revolution from FTP (w/o SSH access) to local computer
*/
$starttime = microtime(true);
// ini_set('max_execution_time', 300);
<?php
/**
* emailObfuscate output modifier for MODx
* Version: 1.0.0
*
* based on ObfuscateEmail plugin 0.9.1 (Apr 15, 2007) by Aloysius Lim.
* released under Public Domain.
* http://modxcms.com/extras/package/?package=322
*
* This modifier searches for all email addresses and "mailto:" strings in the
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Updated for MODx Revo by: Hansek http://www.modxcms.cz/ hansek@coex.cz
Created for MODx Evo by : Coroico (http://modx.wangba.fr)
Short Description: Language files checking tool for MODx Revolution
Version: 1.2
Created by: Coroico (http://modx.wangba.fr)
<link rel="canonical" href="[[~[[*id]]? &scheme=`full`]]" />
<meta property="og:image" content="[[++site_url]]pt/phpThumb.php?src=/[[*siteThumb]]&amp;w=90&amp;h=90&amp;q=80&amp;zc=T"/>
<meta property="og:site_name" content="[[++site_name:htmlent]]"/>
<meta property="og:title" content="[[*pagetitle]]"/>
<meta property="og:url" content="[[++site_url]][[~[[*id]]]]"/>
<meta property="og:type" content="article"/>
<meta itemprop="name" content="[[*pagetitle]]">
<meta itemprop="description" content="[[*siteDescription:word_limit=`70`]]">
<meta itemprop="image" content="[[++site_url]]pt/phpThumb.php?src=/[[*siteThumb]]&amp;w=90&amp;h=90&amp;q=80&amp;zc=T">
<?php
// First we require the xml2json file of course.
require_once($modx->getOption('core_path').'components/simplx/common/xml2json.php');
// xml2json simply takes a String containing XML contents as input.
// Remember that the preprocessor always get a parameter called $dataSet
// containing the complete dataSet recieved from the dataSourceUrl or the
// dataSet Snippet parameter.