Skip to content

Instantly share code, notes, and snippets.

View denysbutenko's full-sized avatar

Denys Butenko denysbutenko

View GitHub Profile
@Mark-H
Mark-H / benchmark.php
Created December 7, 2012 17:41
MODX Performance Benchmark Snippet
<?php
// Use this line to prevent people from hammering your server.
if (!isset($_GET['super_secret']) || ($_GET['super_secret'] != 'secretpassword')) return 'Not authorized';
// Call this snippet uncached in a resource with template "empty":
// content: "[[!benchmark]]"
// Make sure to tag the resource as uncachable
// The intro
echo '<body style="font-family: sans-serif;">';
@agnoster
agnoster / README.md
Last active May 6, 2025 18:36
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@christianhanvey
christianhanvey / modx-snippets.php
Last active December 8, 2024 18:46
Useful snippets for MODX Revo
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
@ovomatik
ovomatik / modxTiming.html
Created May 25, 2012 14:05
Modx Timing
[^qt^] - Query Time - Shows how long MODx took talking to the database <br>
[^q^] - Query Count -Shows how many database queries MODx made <br>
[^p^] - Parse Time - Shows how long MODx took to parse the page <br>
[^t^] - Total Time - Shows the total time taken to parse/ render the page <br>
[^s^] - Source - Shows the source of page, whether is database or cache.