Skip to content

Instantly share code, notes, and snippets.

View jayperryworks's full-sized avatar

Jay Perry jayperryworks

View GitHub Profile
@jayperryworks
jayperryworks / .eslintrc
Created March 2, 2021 19:14
ESLint config with standard syntax, tabs, & my preferences
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"standard"
],
"globals": {
@jayperryworks
jayperryworks / .stylelintrc.json
Created March 2, 2021 19:13
StyleLint config for SCSS files (using my naming conventions)
{
"extends": "stylelint-config-sass-guidelines",
"plugins": [
"stylelint-scss",
"stylelint-order"
],
"rules": {
"indentation": "tab",
"selector-no-qualifying-type": [
true,
@jayperryworks
jayperryworks / .nvmrc
Created January 26, 2021 17:53
Fetch API data with node.js
14.15.3
@jayperryworks
jayperryworks / component-defaults.scss
Last active May 1, 2019 03:36
Exploring web components: a 'gallery' custom element that uses Shadow DOM to display a grid of list elements.
// Default styles for components
// -> so they're still usable if JS fails or they're not supported
jpw-gallery:not(:defined) {
display: block;
list-style: none;
}
@jayperryworks
jayperryworks / gulpfile.js.metalsmith
Created July 7, 2014 13:17
Gulpfile for metalsmith/gulp-based prototyping workflow
"use strict";
// based on generator-gulp-webapp 0.1.0
// manually require modules that won"t get picked up by gulp-load-plugins
var gulp = require("gulp");
// load plugins
var $ = require("gulp-load-plugins")();
// local server port
@jayperryworks
jayperryworks / middleman.config.rb
Last active November 20, 2016 20:34
Middleman config file (basic setup including Bower)
# https://github.com/middleman/middleman/issues/841
# https://github.com/middleman/middleman-minify-html
###
# Compass
###
# Change Compass configuration
# compass_config do |config|
# config.output_style = :compact
@jayperryworks
jayperryworks / aspect.scss
Created June 14, 2016 01:24
Sass mixin to force a fluid container to preserve a certain aspect ratio
// padding to force an aspect ratio
// -> apply mixin to a container element, and the child element will be constrained
// -> mostly used for images, but should work on basically anything
@mixin media-aspect($w, $h, $child_el: ".media-aspect-content") {
position: relative;
overflow: hidden;
&::before, &:before {
display: block;
content: " ";
@jayperryworks
jayperryworks / aspect_ratio.scss
Created March 30, 2016 19:45
Create a thumbnail image (or whatever) that is constrained to a particular aspect ratio.
// padding to force an aspect ratio
// -> apply mixin to a container element, and the child element will be constrained
// -> mostly used for images, but should work on basically anything
@mixin media-aspect($w, $h, $child_el: ".media-aspect-content") {
position: relative;
overflow: hidden;
&::before, &:before {
display: block;
content: " ";
# output files
*.jpg filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
# raw files
*.CR2 filter=lfs diff=lfs merge=lfs -text
# work files
*.sketch filter=lfs diff=lfs merge=lfs -text
@jayperryworks
jayperryworks / .gitattributes
Created January 20, 2016 00:06
Git LFS setup for design files
# output files
*.jpg filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
# raw files
*.CR2 filter=lfs diff=lfs merge=lfs -text
# work files
*.sketch filter=lfs diff=lfs merge=lfs -text