Skip to content

Instantly share code, notes, and snippets.

@ChrisOwen101
ChrisOwen101 / updatecoursework.md
Last active July 29, 2021 20:57
How to Batch Update All Coursework Repos

This is a really hacky way to update all of the Coursework Repos from the Template repo. It involves:

  1. Cloning every coursework repo
  2. cd into each of them
  3. Add the template repo as a remote
  4. Fetch, pull and marge everything in a slightly unsafe way
  5. push everything
  6. cd out

This methodology follows a single core principle:

@bomberstudios
bomberstudios / convertIdToClass.js
Created October 10, 2018 10:17
SVGO plugin to convert the `id` attribute of an element to a `class` attribute with the same value.
// This SVGO plugin converts the `id` attribute on an element into a `class` attribute with the same value.
// To use it, you'll need to disable the `cleanupIDs` plugin, otherwise you won't have any `id` attribute to replace :)
'use strict';
exports.type = 'perItem';
exports.active = true;
exports.description = 'convert id attribute to class, using the same value';
@sarahdayan
sarahdayan / modifiers.scss
Last active October 31, 2023 18:28
Sass Modifiers Mixin
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Sass modifiers mixin by Sarah Dayan
// Generate All Your Utility Classes with Sass Maps: frontstuff.io/generate-all-your-utility-classes-with-sass-maps
// http://frontstuff.io
// https://github.com/sarahdayan
@kvlsrg
kvlsrg / get-parent-of-parent-in-sass.md
Last active January 4, 2023 09:57
Parent of parent in Sass

How to get parent of parent in Sass

You can just get it from cached &. Here is a simple BEM example:

HTML

<ul class="pagination">
  <li class="pagination__item">
    <a class="pagination__link" href="#">
      Page 1