Skip to content

Instantly share code, notes, and snippets.

View lrobeson's full-sized avatar

Laura Robeson lrobeson

View GitHub Profile
@lrobeson
lrobeson / Grunt task config: browsersync.js
Created April 12, 2017 00:10
Vagrant + Pattern Lab + BrowserSync + Grunt happiness
module.exports = function (grunt) {
grunt.config.merge({
browserSync: {
dev: {
bsFiles: {
src : ['<%= pkg.themePath %>/css/pattern-lab.css',
'<%= pkg.themePath %>/pattern-lab/public/latest-change.txt'
]
},
options: {
@lrobeson
lrobeson / gesso_theme.theme
Created January 17, 2017 15:24
By Chaz Chumley: Add more theme template suggestions
/**
To use (WIP):
- Create a Taoxnomy term called Suggestions
- Populate with terms for what you may want to use in the template
- Add the field to whatever content types (i.e. Listing or Landing content type)
- Create a .theme function to look for the field and content type
Example:
https://github.com/forumone/CBCNY/blob/6d3f9c2c808f5fbc5eee1c08fa4bcd5545298101/web/themes/cbcny_theme/cbcny_theme.theme
**/
@lrobeson
lrobeson / d8_gesso.md
Last active February 20, 2017 19:40
Quick and painless Drupal 8 + Gesso site setup (no VM or MAMP needed)

Initial install

drush core-quick-drupal --core=drupal d8 gesso

Post-install: use PHP's built-in HTTP server

drush runserver

@lrobeson
lrobeson / d7_gesso.md
Last active January 12, 2017 00:20
Quick and painless Drupal 7 + Gesso site setup (no VM or MAMP needed)

Initial install

drush core-quick-drupal --core=drupal-7.53 d7 gesso html5_tools elements magic clean_markup blockify modernizr; drush en magic_dev -y

Post-install: use PHP's built-in HTTP server

drush runserver

@lrobeson
lrobeson / .gitconfig
Created December 29, 2016 20:23
Git alias to more easily search log
[alias]
# Usage: 'git find helloWorld'
# Source: http://stackoverflow.com/a/7125014/4114265
find = log --all --pretty=\"format:%Cgreen%H %C(bold blue)%s\n%b%Creset\" --name-status --grep
@lrobeson
lrobeson / user-agent.js
Created December 29, 2016 19:59
Add User-Agent info to HTML tag
// Add User-Agent info to HTML tag, example:
// <html data-useragent="Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)">
function addUserAgent() {
var doc = document.documentElement;
doc.setAttribute('data-useragent', navigator.userAgent);
}
@lrobeson
lrobeson / connect.js
Created December 20, 2016 21:18
WIP: Grunt Connect config for standalone Gesso Pattern Lab instance
// Connect:
// Run http server to serve files
// https://github.com/gruntjs/grunt-contrib-connect
module.exports = function (grunt) {
grunt.config.merge({
connect: {
server: {
options: {
base:
@lrobeson
lrobeson / new_gist_file_0
Created March 28, 2016 18:56
JavaScript: Make 2 items the same height, based on media query.
http://codepen.io/ldavisrobeson/pen/WwjwOP
@lrobeson
lrobeson / SassMeister-input-HTML.html
Created February 18, 2016 01:51
Generated by SassMeister.com.
<h1>Panels Layout: Sidebar Right</h1>
<!-- Using the .no-flexbox class added by Modernizr. -->
<!--<div class="no-flexbox">-->
<!-- <div class="layout-panels-sidebar-left">-->
<!-- <div class="layout-preface">-->
<!-- <h1>Preface Region</h1>-->
<!-- <p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.</p>-->
<!-- <p>Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.</p>-->
<!-- </div>-->
@lrobeson
lrobeson / SassMeister-input-HTML.html
Created February 16, 2016 22:05
Generated by SassMeister.com.
<h1>Panels Layout: Sidebar Right</h1>
<!-- Using the .no-flexbox class added by Modernizr. -->
<!--<div class="no-flexbox">-->
<!-- <div class="layout-panels-sidebar-left">-->
<!-- <div class="layout-preface">-->
<!-- <h1>Preface Region</h1>-->
<!-- <p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.</p>-->
<!-- <p>Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.</p>-->
<!-- </div>-->