Skip to content

Instantly share code, notes, and snippets.

@adrienne
adrienne / gist:2888431
Created June 7, 2012 12:01
stash events filtered by day of the week
{!-- Controller --}
{exp:channel:entries channel="events" dynamic="off" show_future_entries="yes" order_by="entry_date" sort="asc" }
{!-- group into lists by day of the week --}
{exp:stash:append_list name="events_list" context="{entry_date format='%D'}" }
{stash:entry}
<li><a href="{page_url}">{title}</a> {entry_date format="%d/%m/%y"}</li>
{/stash:entry}
{/exp:stash:append_list}
{/exp:channel:entries}
@adrienne
adrienne / gist:3180040
Created July 26, 2012 03:17
Stash template (complicated)
{exp:stash:set name='ids'}0
{exp:playa:children entry_id="{structure:page:entry_id}" field="page_featured_employee"}
|{entry_id}
{exp:stash:append_list name='featured-list'}
{stash:team_member_urltitle}{url_title}{/stash:team_member_urltitle}
{stash:team_member_name}{person_firstname} {person_lastname}{/stash:team_member_name}
{stash:team_member_title}{person_title}{/stash:team_member_title}
{stash:team_member_bio}{person_bio}{/stash:team_member_bio}
{stash:team_member_email}{person_email}{/stash:team_member_email}
@adrienne
adrienne / gist:3312817
Created August 10, 2012 09:17 — forked from ckimrie/gist:3312619
Example extension that allows you to modify the final ExpressionEngine CP output
<?php
/**
* Modifying the final CP Output
*
* This extension demonstrates how you can access and modify the final ExpressionEngine
* CP output. It is not a hack, but it is a new technique that to my knowledge has not
* been used before in an EE addon.
*
* This has not been road tested and its side effects are unknown, so use this at your own risk.
@adrienne
adrienne / string_manipulation_AND_json_output.sql
Created August 29, 2012 16:50
Things NOT to do with MySQL, generally speaking
SELECT
ia.descriptor_id, descriptor_name,
MAX(pkg_override_id) AS pkg_id, MAX(version_type_id) AS version,
CASE WHEN MAX(version_type_id) > 1 THEN 1 ELSE 0 END AS overridden,
CONCAT('[',
SUBSTRING_INDEX(
GROUP_CONCAT(
CASE
WHEN cat_override_id IS NOT NULL AND cat_override_id > 0
THEN CONCAT('{"',ia.item_id,'" : [ {"iname" : "',item_name,'"} , {"icat" : "',
@adrienne
adrienne / gist:3950202
Created October 25, 2012 03:02
Quick Stash thing
{!-- putting the items in lists --}
{exp:channel:entries channel="clinical_trials" orderby="ct_last_updated" sort="desc" status="not Closed"}
{exp:stash:append_list name='ct_recruitment_list'}
{stash:listitem}
{ct_recruitment}
{/stash:listitem}
{/exp:stash:append_list}
{exp:stash:append_list name='ct_agegroups_list'}
{stash:listitem}
{ct_age_groups:ct_age_group}
@adrienne
adrienne / perftips.js
Last active December 15, 2015 23:39
some quick Javascript/jQuery performance tips
// Some references here: http://bitly.com/bundles/adrienne/15
// Using native getElementByID to create a jQuery collection is faster than jQuery's ID selector!
// -------------------------------------------------------------------------------------------------------------
// prefer:
$(document.getElementById("testid"));
// to:
$("#testid");
<select name="playa_field[selections][]">
{exp:channel:entries dynamic="no" channel="my_channel"}
<option name="{entry_id}">{title}</option>
{/exp:channel:entries}
</select>
@adrienne
adrienne / Preferences.sublime-settings
Created April 25, 2013 05:16
SublimeText Prefs Files
{
"": "",
"auto_complete_commit_on_tab": true,
"auto_indent": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_face": "Consolas",
"font_options":
@adrienne
adrienne / -- Useful EE-Related SQL Snippets
Last active January 4, 2016 20:29
Useful EE-Related SQL Snippets
@adrienne
adrienne / speakers.md
Last active June 10, 2017 12:21
Speaker Information, LambdaConf 2017

All LambdaConf 2017 speakers listed as Invited (rather than double-blinded committee selection):

Keynotes:

  • Edward Latimore
  • Paul Phillips

Leap Workshops:

  • Dana Scott