This file contains 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
location / { | |
rewrite ^(/(?!backend).*[^/])$ $1/ permanent; | |
try_files $uri /index.php$is_args$args; | |
} |
This file contains 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
public function onStart() | |
{ | |
return Redirect::to('http://google.com'); | |
} |
This file contains 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
function onStart() | |
{ | |
$this['search_query'] = get('q', $default = null); | |
} |
This file contains 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
function onEnd() | |
{ | |
$this->page->title = 'A different page title'; | |
} |
This file contains 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
<touchégg> | |
<settings> | |
<property name="composed_gestures_time">111</property> | |
</settings> | |
<application name="All"> | |
<gesture type="DRAG" fingers="1" direction="ALL"> | |
<action type="DRAG_AND_DROP">BUTTON=1</action> | |
</gesture> | |
<gesture type="DRAG" fingers="3" direction="RIGHT"> | |
<action type="SEND_KEYS">Control+Alt+Right</action> |
This file contains 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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains 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 | |
echo Please specify MODX version: | |
read version | |
echo Downloading MODX $version... | |
wget https://modx.com/download/direct?id=modx-$version-pl.zip | |
unzip direct\?id\=modx-$version-pl.zip && rm direct\?id\=modx-$version-pl.zip |
This file contains 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
<a href="{{ ''| page }}">Current page with current filter slugs</a> | |
<a href="{{ ''| page(false) }}">Current page without any filter slugs (except default value)</a> | |
<a href="{{ ''| page({ filter_slug:slug_var, filter_id:id_var }) }}">Current page with needle filter slugs</a> |
This file contains 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
{set $index = 0} | |
{set $slider = json_decode($_modx->resource.slider, true)} | |
{foreach $slider as $row} | |
<div> | |
<img src="{$row.image | phpthumbon : 'w=1920&zc=0'}" title="{$row.heading}" alt="{$row.heading}"> | |
<a href="{$row.link}"> | |
{$row.content} | |
</a> | |
</div> |
This file contains 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 namespace Qwer\Asdf; | |
use System\Classes\PluginBase; | |
class Plugin extends PluginBase | |
{ | |
public function boot() | |
{ | |
//dump(\App::getFacadeApplication()['db.connection']->getPDO()); | |
// dump(base_path(), themes_path()); |