Skip to content

Instantly share code, notes, and snippets.

View amphibian's full-sized avatar

Derek Hogue amphibian

View GitHub Profile
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@frontendbeast
frontendbeast / gist:7188558
Last active March 5, 2016 13:53
Craft CMS future events listings, sorted by date and grouped by month and year. Requires Danny Nimmo's SortByField plugin. https://github.com/dannynimmo/craftcms-sortbyfield
{% set allEvents = craft.entries.section('events').find() %}
{% set futureEvents = [] %}
{% for event in allEvents %}
{% if event.startDate | date('U') >= 'now' | date('U') %}
{% set futureEvents = futureEvents | merge([event]) %}
{% endif %}
{% endfor %}
{% for date, events in futureEvents | sortByField('startDate') | group('startDate|date("F Y")') %}
@amphibian
amphibian / devot-ee-statusboard.php
Last active December 16, 2015 07:58
devot:ee developer sales widget for Panic's StatusBoard iPad app
<?php
/*
devot:ee developer sales widget for Panic's StatusBoard iPad app
http://panic.com/statusboard
Author: Derek Hogue (http://amphibian.info)
Usage: Fill-in your devot:ee API credentials, then upload to your server.
You can use this script to feed either the Graph widget or Table widget.
@1stevengrant
1stevengrant / config.php
Created October 28, 2012 17:21
Fixes the daylight savings issue with EE
var $dateTime = new DateTime();
$dateTime->setTimezone(new DateTimeZone('America/New_york'));
$dateTime->setTimestamp(time());
$isDst = (bool)$dateTime->format('I') ? "y" : "n";
$conf['daylight_savings'] = $isDst;
@soffes
soffes / perferences.json
Created August 22, 2012 05:35
My Sublime Text 2 config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
".gitkeep",
"dump.rdb"
],
@mynameispj
mynameispj / Props
Created July 24, 2012 14:55
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
@amacneil
amacneil / mod.ee_addon.php
Created March 22, 2012 01:02
Supporting URL_THIRD_THEMES in ExpressionEngine < 2.4 add-ons
<?php
// backwards compabitility for EE < 2.4
defined('URL_THIRD_THEMES') OR define('URL_THIRD_THEMES', $this->EE->config->item('theme_folder_url').'third_party/');