Skip to content

Instantly share code, notes, and snippets.

View dmolsen's full-sized avatar

Dave Olsen dmolsen

View GitHub Profile
This is how I make my Cajun wings.
## Kit
- Gallon sized plastic bag (used to coat wings and marinate)
- Baking sheet
- Extra baking rack
- Aluminum foil
- Tongs
@dmolsen
dmolsen / FAFSAREMINDER.json
Created November 15, 2018 14:43
This file describes our FAFSA Reminder email sent to: prospects/inquiries (.* or 100|200), applicants (300), admits (400) and parents of admits. Segmentation is done by providing key for segment with its associated content. Most of the JSON describes what content to add to a pattern and how to modify it.
{
"layout": {
"FR_300_1908~": "morgantown/admissions-gold-zeroed",
"FR_400_1908~": "morgantown/admissions-gold-zeroed-with-actions-admitted",
"FR_(.*)_1908~": "morgantown/admissions-gold-zeroed-with-actions",
"XP_FR_~": "morgantown/admissions-gold-zeroed"
},
"client": "morgantown/admissions",
"emailName": "[SEGMENT]_FAFSAREMINDER_SEP18",
"content": {
@dmolsen
dmolsen / modifyPanels.js
Created July 7, 2016 01:16
This should be added to the end of `index.html` below the `Dispatcher` set-up.
<script>
function modifyPanels() {
var panelsNew;
panelsNew = Panels.panels.splice(1,1);
panelsNew[0].default = true;
Panels.panels = panelsNew;
}
Dispatcher.addListener("setupPanels", modifyPanels);
</script>
@dmolsen
dmolsen / pattern-lab-bower-components.md
Created July 14, 2014 20:41
creating bower packages with pattern lab

Earlier today @_beneverard tweeted about a common problem with managing style guides. He said:

For those who have created extensive pattern libraries, how do you go about using that CSS in a project? Manually copy it across?

I started thinking about how we could encourage this in Pattern Lab. A lot of my recent work on PL has revolved around creating packages for Composer and it seemed like this was a similar problem. After playing around I'm curious if folks would think the following process was an onerous workflow. Let's say we're going to track our styles and grunt/gulp uses public/styles/ as a target directory:

  1. Delete all files under public/styles
  2. Commit the deletion
  3. Add public/styles to .gitignore
  4. Create a new repo just for your production styles
@dmolsen
dmolsen / pattern-lab-export.md
Created May 31, 2014 19:59
Exporting Patterns from Pattern Lab

Exporting Patterns from Pattern Lab for Drupal 8 Themes

I'm going to use Drupal as my guinea pig when thinking about this because Marc has shown the most interest in trying to make this happen. The holy grail does seem to be creating a way to have PL live with a remote project. Right now it's very good for the development but falls short or probably requires a lot of work if used as part of maintenance.

In order to work well for Drupal I would assume we'd have to tackle the following three problems:

  1. Develop patterns in the native format (Twig)
  2. Store or export patterns so they match the destination format (theme structure)
  3. Sync the exported patterns with a remote system
@dmolsen
dmolsen / header.mustache
Created February 18, 2014 16:02
An example header pattern from Pattern Lab
<!-- Begin .header -->
<header class="header cf" role="banner">
{{> atoms-logo }}
<a href="#search-form" class="nav-toggle nav-toggle-search icon-search"><span class="is-vishidden">Search</span></a>
<a href="#nav" class="nav-toggle nav-toggle-menu icon-menu"><span class="is-vishidden">Menu</span></a>
{{> molecules-primary-nav }}
{{> molecules-search }}
</header>
<!-- End .header -->
@dmolsen
dmolsen / PL v0.7.0 patternPaths
Created January 9, 2014 15:41
The patternPaths array from v0.7.0 of Pattern Lab
Array
(
[atoms] => Array
(
[head] => Array
(
[patternSrcPath] => 00-atoms/00-meta/_00-head
[patternDestPath] => 00-atoms-00-meta-_00-head
[patternPartial] => atoms-head
[render] =>
@dmolsen
dmolsen / PL v0.7.0 navItems
Created January 9, 2014 15:32
This is the organization and naming scheme for $this->navItems in v0.7.0 of Pattern Lab
Array
(
[patternTypes] => Array
(
[0] => Array
(
[patternTypeLC] => atoms
[patternTypeUC] => Atoms
[patternType] => 00-atoms
[patternTypeDash] => atoms
@dmolsen
dmolsen / gist:7489066
Created November 15, 2013 18:16
Loading jQuery
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="styleguide/js/jquery.js"><\/script>')</script>
@dmolsen
dmolsen / cli.php
Created April 6, 2013 15:45
A very simple example of setting up a command line tool using PHP
<?php
/*
* A ridiculously simple example of using PHP as a command line tool
*
* The following usage is supported by this script:
*
* php cli.php -a [-c]
* Do something based on the -a flag. Use the optional -c flag to modify what happens when using the -a flag.
*