Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Mousdale Chrisedmo

View GitHub Profile
@Chrisedmo
Chrisedmo / debug.css
Created Apr 17, 2018 — forked from zaydek-old/bookmark.min.js
A simple CSS debugger
View debug.css
*:not(path) {
color: hsla(210, 100%, 100%, 0.9) !important;
background: hsla(210, 100%, 50%, 0.5) !important;
outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important;
box-shadow: none !important;
}
@Chrisedmo
Chrisedmo / debug.css
Created Apr 17, 2018 — forked from zaydek-old/bookmark.min.js
A simple CSS debugger
View debug.css
*:not(path) {
color: hsla(210, 100%, 100%, 0.9) !important;
background: hsla(210, 100%, 50%, 0.5) !important;
outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important;
box-shadow: none !important;
}
@Chrisedmo
Chrisedmo / _lazyFocusImager.twig
Created Mar 4, 2018 — forked from sjelfull/_lazyFocusImager.twig
Twig/Craft macro for lazy responsive images/bgimages with Imager and Focuspoint
View _lazyFocusImager.twig
{#
// lazyLoaded Image/bgImages, optimized with Imager and Focuspoint
---------------------------------------------------------------------------
https://nystudio107.com/blog/creating-optimized-images-in-craft-cms
https://github.com/aelvan/Imager-Craft
https://github.com/smcyr/Craft-FocusPoint
for the bgImage intrinsic ratio classname creation check:
https://github.com/inuitcss/inuitcss/blob/develop/objects/_objects.ratio.scss
@Chrisedmo
Chrisedmo / styles.less
Created Dec 29, 2017 — forked from brandondurham/styles.less
Using Operator Mono in Atom
View styles.less
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
@Chrisedmo
Chrisedmo / craftblockwrap.twig
Created Nov 16, 2017 — forked from croxton/craftblockwrap.twig
Craft CMS matrix blocks intelligent wrapping
View craftblockwrap.twig
{# _partials/blocks/blocks.html #}
{#
Blocks component
Outputs a matrix field blocks, intelligently wrapping blocks that need to be inset from the edges
@param {object} contentBlocks (MatrixBlockModel)
#}
{# Parameters #}
@Chrisedmo
Chrisedmo / osx_bootstrap.sh
Last active Nov 14, 2017 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
View osx_bootstrap.sh
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Notes:
#
# - If installing full Xcode, it's better to install that first from the app
# store before running the bootstrap script. Otherwise, Homebrew can't access
@Chrisedmo
Chrisedmo / caskconfig.sh
Last active Jun 7, 2017
My Cask Config
View caskconfig.sh
#!/bin/sh
#
# Some cask packages that I like.
#
brew cask install sketch
brew cask install atom
brew cask install alfred
brew cask install slack
brew cask install paparazzi
brew cask install transmit
@Chrisedmo
Chrisedmo / Craft3ValetDriver.php
Created Feb 1, 2017
Craft 3 Composer Install Valet Driver
View Craft3ValetDriver.php
<?php
class Craft3ValetDriver extends ValetDriver
/* https://github.com/laravel/valet/blob/master/cli/drivers/CraftValetDriver.php */
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
@Chrisedmo
Chrisedmo / eager-loading.twig
Created Dec 11, 2016
#CraftCMS: Eager-Load Nested Sets of Elements
View eager-loading.twig
{#
According to docs (https://craftcms.com/docs/templating/eager-loading-elements),
this is how you Eager-Load Nested Sets of Elements
#}
{% set entries = craft.entries({
section: 'news',
with: [
'entriesField.assetsField'
]