This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-s | |
RewriteRule ^(.*)$ rest/index.php?_rest=$1 [QSA,NC,L] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^(.*)$ rest/index.php [QSA,NC,L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modx -2by2host -from:modx -from:modx_feeds -to:modx -from:wehatejbieber -modx_ch -mr_modx -/logs/modx -noon_modx lang:en |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* convertMarkdown - a custom output filter | |
* by Christian Hanvey | |
* WTFPL License | |
* | |
* ORIGINAL PHP MARKDOWN CLASS by Michel Fortin | |
* http://michelf.com/projects/php-markdown/ | |
* | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* plugin fragment for setting width of MODX Manager left panel | |
*/ | |
if($modx->event->name == 'OnBeforeManagerPageInit') { | |
// update layout manager state | |
$state = $modx->controller->getDefaultState(); | |
$state['modx-leftbar-tabs']['width'] = 525; | |
$response = $modx->runProcessor('system/registry/register/send',array( | |
'register' => 'state', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$translitClassPath = $this->xpdo->getOption( | |
'friendly_alias_translit_class_path', | |
$options, | |
$this->xpdo->getOption('core_path', $options, MODX_CORE_PATH) . 'components/' | |
); | |
if ($this->xpdo->getService('translit', $translitClass, $translitClassPath, $options)) { | |
$alias = $this->xpdo->translit->translate($stringToApplyTransliterationTo, $translitTableName); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* LangRouter | |
* ========== | |
* | |
* This plugin is meant to be used with Babel extra for MODX Revolution. It | |
* takes care of switching contexts, which hold translations, depending on URL | |
* requested by client. LangRouter works with so called subfolder based setup, | |
* in which many languages are served under a single domain but are | |
* differentiated by a virtual subfolder indicating the language, eg. | |
* mydomain.com/pl/. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* runFn Snippet | |
* by [email protected] | |
* | |
* Pass the snippet a php function name and pipe delimited list of parameters. | |
* | |
* Example: Format a large number with number_format() | |
* See: www.php.net/manual/en/function.number-format.php | |
* | |
* [[!runFn? &fn=`number_format` &args=`123456789||2||,||.`]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 02/06/12 - Gildas - [email protected] | |
// - assets/components/batcher/js/widgets/resource.grid.js patch to Add "Refresh Cache" Option | |
// 05/11/12 - Gildas - [email protected] | |
// - Add custom log | |
// - Force timeout to 30s for each request | |
Batcher.grid.Resources = function(config) { | |
config = config || {}; | |
this.sm = new Ext.grid.CheckboxSelectionModel(); | |
Ext.applyIf(config,{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Steam installer for Debian wheezy (32- and 64-bit) | |
# | |
# Place into empty directory and run. | |
# | |
download() { | |
local url="$1" | |
local filename="$(basename "$url")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Place this file in /etc/logrotate.d/gitlab | |
/home/gitlab/gitlab/log/*.log { | |
daily | |
rotate 52 | |
missingok | |
delaycompress | |
compress | |
copytruncate | |
} |