Skip to content

Instantly share code, notes, and snippets.

View michaelrog's full-sized avatar

Michael Rog michaelrog

View GitHub Profile
@michaelrog
michaelrog / 2019.txt
Created December 24, 2019 15:28
Michael's 2019 eggnog
4 oz blackstrap rum
4 oz milk
2-3 oz cream
1 oz simple syrup [2-to-1]
1 oz St. George Spiced Pear liqueur
.5 oz Skinos Mastiha liqueur
1 egg + 1 yolk
Pinch of cinnamon
Pinch of salt
@michaelrog
michaelrog / gw.md
Created December 24, 2019 15:13
George Washington's eggnog recipe

One quart cream, one quart milk, one dozen tablespoons sugar, one pint brandy, ½ pint rye whiskey, ½ pint Jamaica rum, ¼ pint sherry

— mix liquor first, then separate yolks and whites of 12 eggs,

@michaelrog
michaelrog / MyPlugin.php
Created March 2, 2018 06:14
Search Plus custom mapping example
class MyPlugin extends BasePlugin
{
// ...
public function searchPlus_addAlgoliaMapping()
{
return [
[
'name' => 'My Basic Mapping',
@michaelrog
michaelrog / Public Key
Created January 3, 2017 09:41
My public SSH-RSA key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDey3iJLUIRlJEJEh9o9Sxdxd1s/VhccV+70ipIBGFXjZxt/2AqjHFy1qDNje3K752m1HNJ/mxQu4CQqqd4zPKjFZuc5L3Wptkk9FOwM48n1A/ynIwV6VuZWtiPL/pnYJ0JWgWgGOEGwVH54oOhIKTsG3H/xVyV7oiBTfJ6ZhxUn3fdPS26vZQdQoDEevETwY4XG42CLNa3+ZYYRZZBYcq/zdUwizQuM9nP+AASXXIvlrCgUnfTuBArOqbH9P3p1uG77Rw5Pt1sGYNMmhCTY0zjaYo9IM5x0OnoL+sCZ7GnqVFQ72ogJkfe4bO2I/YONlkzKqDe//S2O+mJiYOVYvH9 michael@michaelrog.com
@michaelrog
michaelrog / matrixCalendar.twig
Created May 26, 2016 16:47
Implementing an event calendar using Matrix Blocks
{% set blocks = craft.lowblocks.startDate('< foo').endDate('<= bar') %}
{% set ownerIds = [] %}
{% for block in blocks %}
{% set ownerIds = ownerIds|merge(block.ownerId) %}
{% endfor %}
{% set owners = craft.entries.id(ownerIds).indexBy('id') %}
{#
@michaelrog
michaelrog / jquery.equalizer.js
Created March 31, 2013 18:37
jQuery width/height equalizer fn
/*--------------------------------------------------------------------
* jQuery equalizer
* by Michael Rog
*
* based on the JQuery Plugins "EqualHeights" & "EqualWidths"
* by Scott Jehl, Todd Parker, Maggie Costello Wachs (http://www.filamentgroup.com)
*--------------------------------------------------------------------*/
$.fn.equalizeHeights = function() {
@michaelrog
michaelrog / assets_fm_views.js
Created September 6, 2011 05:27
JS/jQuery to tweak Assets File Manager view
/*
This JS/jQuery code simulates clicks that cause the Assets File Manager to:
- switch to List view
- expand the first level of subfolders
Simply add it to your EE2 CP via your favorite method. I suggest using Brandon Kelly's CP_JS_CSS.
(The timeout is a bit of a hack: Without a slight delay, expanding the subfolders doesn't work. I think this is because the file tree are loaded via AJAX-y methods, which require a wee bit of time to complete.)