Skip to content

Instantly share code, notes, and snippets.

View zooks's full-sized avatar

zooks zooks

View GitHub Profile
@zooks
zooks / .gitignore
Created December 14, 2017 23:00
gitignore for October CMS
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@zooks
zooks / touchegg.conf
Last active June 16, 2023 11:05
Touchegg config for XFCE ~/.config/touchegg/touchegg.conf
<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>
@zooks
zooks / october-set-page-title.php
Created August 24, 2017 15:29
October CMS redefine Page Title
function onEnd()
{
$this->page->title = 'A different page title';
}
@zooks
zooks / october-get-param.php
Created August 24, 2017 14:38
October CMS get param
function onStart()
{
$this['search_query'] = get('q', $default = null);
}
@zooks
zooks / october-redirect.php
Created August 24, 2017 14:21
October CMS Redirect
public function onStart()
{
return Redirect::to('http://google.com');
}
@zooks
zooks / nginx.conf
Created August 17, 2017 08:51
nginx trailing slash
location / {
rewrite ^(/(?!backend).*[^/])$ $1/ permanent;
try_files $uri /index.php$is_args$args;
}
@zooks
zooks / layout.html
Created July 21, 2017 10:18
October CMS Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>October CMS - {{ this.page.title }}</title>
<meta name="description" content="{{ this.page.meta_description }}">
<meta name="title" content="{{ this.page.meta_title }}">
<meta name="author" content="OctoberCMS">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="OctoberCMS">
@zooks
zooks / robots.txt
Created July 17, 2017 09:54
robots-closed.txt
# Closed for crawlers
User-agent: *
Disallow: /
@zooks
zooks / nginx.conf
Created July 9, 2017 21:27
nginx folder 301 redirect
location ~ ^/articles/(.*) {
return 301 /blog/$1;
}
@zooks
zooks / search.html
Last active June 11, 2017 20:12
MODX search
# Solve Russian code page problem:
# http://www.yotadom.com/revo-poisk-po-sajtu-simplesearch-modx.html
[[!SimpleSearchForm? &searchIndex=`s`]]
[[!SimpleSearch? &searchIndex=`s`]]