Skip to content

Instantly share code, notes, and snippets.

wesruv wesruv

  • Lullabot
  • Columbus, OH
Block or report user

Report or block wesruv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _grid-width.scss
// Defined globally in my project
$gutter: 18px;
/// Returns a CSS value to imitate a grid item when column widths are fluid with gutters are static
/// Is written to optimize CSS output, so Scss has to be a bit verbose
/// @require $gutter
///
/// @param {number} $column-span How many columns wide element should be
/// @param {number} $total-columns How many total columns are available
/// @param {number} $total What is the total width, will typically be 100%, but could be grid's max-width
View Sample-SCSS-README.md

Sass Style Guide

This is a loose guide for formatting Sass stylesheets to encourage consistency between developers in this repository. As with most things, there will be exceptions to the rules set forth here. When you come across those exceptions, please note them via comments.

Helper docs

View components_collapsible-box.njk
---
layout: _includes/layout-basic.njk
title: Collapsible Box
tags:
- component
- component_medium
contentTitle: Collapsible Box
content: <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate veli esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
---
@wesruv
wesruv / .lando.yml
Last active Jun 14, 2019
Lando config for a Drupal 7 site with Compass Sass
View .lando.yml
name: mydrupalprojectwithcompass
recipe: drupal7
config:
webroot: docroot
php: '5.6'
database: mysql:5.7
xdebug: true
events:
post-db-import:
- appserver: cd $LANDO_WEBROOT/sites/default && drush rr
View gruntfile.js
/* eslint-env node, es6 */
/* global require */
'use strict';
/**
* Configuration
*/
// Load dependencies
const {parallel, series, src, dest, task, watch,} = require('gulp'),
View shelloutput
/home/wesruv/backdrop/core
$ lando rebuild -y -- -vvv
info: Bootstraping...
verbose: Emitting event pre-bootstrap
debug: Event pre-bootstrap has 0 listeners
debug: Config set: {"configFilename":"config.yml","configSources":["/snapshot/lando/build/cli/config.yml","/home/wesruv/.lando/config.yml"],"env":{"HOME":"/home/wesruv","LANG":"en_US.UTF-8","LOGNAME":"wesruv","MAIL":"/var/mail/wesruv","NVM_BIN":"/home/wesruv/.nvm/versions/node/v8.10.0/bin","NVM_CD_FLAGS":"","NVM_DIR":"/home/wesruv/.nvm","PATH":"/home/wesruv/.nvm/versions/node/v8.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games","PWD":"/home/wesruv/backdrop/core","SHELL":"/usr/bin/fish","SHLVL":"1","SSH_AGENT_PID":"4986","SSH_AUTH_SOCK":"/tmp/ssh-64FaUZiaHrYH/agent.4984","SSH_CLIENT":"192.168.1.241 5733 22","SSH_CONNECTION":"192.168.1.241 5733 192.168.1.243 22","SSH_ENV":"/home/wesruv/.ssh/environment","SSH_TTY":"/dev/pts/1","TERM":"xterm","USER":"wesruv","XDG_RUNTIME_DIR":"/run/user/1000","XDG_SESSION_ID":"
View docroot|sites|all|modules|scs_restful_events|src|Plugin|resource|Events__1_0.php
<?php
/**
* @file
* Contains \Drupal\scs_restful_events\Plugin\resource\events\Events__1_0.
*/
namespace Drupal\scs_restful_events\Plugin\resource\events;
/**
* Class Events__1_0
View gist:20a62ec7fb7d6165aa93ea3463724507
Warning: Failed prop type: The prop `body` is marked as required in `ArticlesLanding`, but its value is `undefined`.
in ArticlesLanding
in Connect(ArticlesLanding)
in div (at Default.js:33)
in div (at Default.js:31)
in Default
in Connect(Default) (at RouteResolver.js:45)
in RouteResolver
in Route
in withRouter(RouteResolver)
@wesruv
wesruv / script.js
Created May 13, 2017
Drupal 7 JS File Starter
View script.js
/**
* @file
* A JavaScript file that does stuff.
*/
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it with an "anonymous closure". See:
// - https://drupal.org/node/1446420
// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
(function ($) {
@wesruv
wesruv / window-resize.js
Created May 13, 2017
Dupal 7 Resource friendly window resize listener
View window-resize.js
// Make sure we have the Drupal object, or make one
var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} };
/**
* Resource conscious resize handler
*
* This was grabbed from: https://developer.mozilla.org/en-US/docs/Web/Events/resize
* @param {function} Function that should be run on resize
*
* Example:
You can’t perform that action at this time.