Skip to content

Instantly share code, notes, and snippets.

Mark Llobrera dirtystylus

  • bluecadet
Block or report user

Report or block dirtystylus

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
dirtystylus /
Last active Jan 21, 2020
Eleventy Figure Shortcode
module.exports = (image, caption, className) => {
  const classMarkup = className ? ` class="${className}"` : '';
  const captionMarkup = caption ? `<figcaption>${caption}</figcaption>` : '';
  return `<figure${classMarkup}><img src="/img/${image}" />${captionMarkup}</figure>`;
  // the line below does all this in one line, but is more confusing:
  // return `<figure${className ? ` class="${className}"` : ''}><img src="/img/${image}" />${caption ? `<figcaption>${caption}</figcaption>` : ''}</figure>`;

China Rich Girlfriend

  • by Kevin Kwan
  • Started 2019/01/02
  • Finished 2019/01/08

Good and Mad

  • by Rebecca Traister
  • Started 2019/01/02
View Reading Log
  • The Underground Railroad, Colson Whitehead
  • Moonglow, Michael Chabon
  • Gnomon, Nick Harkaway
  • Death of a King, Tavis Smiley
  • The Obelisk Gate, N. K. Jemisin
  • New York 2140, Kim Stanley Robinson
  • My Brilliant Friend, Elena Ferrante
  • The Woman Who Smashed Codes, Jason Fagone
  • So You Want to Talk About Race, Ijeoma Oluo
  • Her Body and Other Parties, Carmen Maria Machado
View hook-presave-delete.module
* @file
* Field DOS Feed Status Module file
* This module allows site administrators to send a stock warning
* email to a specified user or users through the admin interface.
* Administrators can configure the default email including token replacement.
View vs-code-key-bindings.json
// Place your key bindings in this file to overwrite the defaults
{ "key": "shift+alt+down", "command": "cursorColumnSelectDown", "when": "editorTextFocus" },
{ "key": "shift+alt+up", "command": "cursorColumnSelectUp", "when": "editorTextFocus" },
{ "key": "cmd+l", "command": "workbench.action.gotoLine" },
{ "key": "shift+ctrl+d", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+cmd+down", "command": "editor.action.moveLinesDownAction", "when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+cmd+up", "command": "editor.action.moveLinesUpAction", "when": "editorTextFocus && !editorReadonly" },
{ "key": "shift+cmd+[", "command": "workbench.action.previousEditor" },
{ "key": "shift+cmd+]", "command": "workbench.action.nextEditor" },
View Modular Scale With Negative Value
/* Modular Scale */
$ms-base: 1.125em;
$ms-ratio: $golden;
1.05 20em,
1.33 81.25em;
.entry-meta {
@include ms-respond(font-size, -1);
View Git Multiple Remotes
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "github"]
fetch = +refs/heads/*:refs/remotes/github/*
dirtystylus / css-reset-box-sizing
Created Nov 12, 2014
CSS Reset with Box Sizing
View css-reset-box-sizing
/* CSS reset with box-sizing fix */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
dirtystylus / wp-remove-text-tab-buttons
Created Sep 16, 2014
WordPress Remove Text Tab Buttons
View wp-remove-text-tab-buttons
function _remove_quicktags( $qtInit )
// Remove only the 'italic', 'bold', and 'block-quote' buttons
$remove_these = array('strong', 'em', 'block', 'link', 'del', 'ins', 'img', 'ul', 'ol', 'li', 'code', 'more', 'close');
// Convert string to array
$buttons = explode(',', $qtInit['buttons']);
// Loop over items to remove and unset them from the buttons
for( $i=0; $i < count($remove_these); $i++ )
if( ($key = array_search($remove_these[$i], $buttons)) !== false)
dirtystylus / gist:34a65ab232ac21222380
Created Sep 11, 2014
Drupal 7: Remove Image Width and Height
View gist:34a65ab232ac21222380
function mytheme_preprocess_image(&$variables) {
foreach (array('width', 'height') as $key) {
You can’t perform that action at this time.