Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Rog michaelrog

View GitHub Profile
@michaelrog
michaelrog / 2019.txt
Created Dec 24, 2019
Michael's 2019 eggnog
View 2019.txt
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 Dec 24, 2019
George Washington's eggnog recipe
View gw.md

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 Mar 2, 2018
Search Plus custom mapping example
View MyPlugin.php
class MyPlugin extends BasePlugin
{
// ...
public function searchPlus_addAlgoliaMapping()
{
return [
[
'name' => 'My Basic Mapping',
@michaelrog
michaelrog / Public Key
Created Jan 3, 2017
My public SSH-RSA key
View Public 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
Implementing an event calendar using Matrix Blocks
View matrixCalendar.twig
{% 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 Mar 31, 2013
jQuery width/height equalizer fn
View jquery.equalizer.js
/*--------------------------------------------------------------------
* 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 Sep 6, 2011
JS/jQuery to tweak Assets File Manager view
View assets_fm_views.js
/*
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.)