Skip to content

Instantly share code, notes, and snippets.

View jankal's full-sized avatar
🏡
Working from home.

Alexander Jank jankal

🏡
Working from home.
View GitHub Profile
{ extend: [Function: extend],
insertBefore: [Function: insertBefore],
DFS: [Function: DFS],
markup:
{ comment: /<!--[\s\S]*?-->/,
prolog: /<\?[\s\S]+?\?>/,
doctype: /<!DOCTYPE[\s\S]+?>/i,
cdata: /<!\[CDATA\[[\s\S]*?]]>/i,
style:
{ pattern: /(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,
@jankal
jankal / _font-map.scss
Created September 9, 2020 13:10
SCSS Font-Map Mixin
@mixin fontMap($fontPath, $font, $fontData) {
@each $name, $attributes in $fontData {
$src: null;
$exts: ("woff2": "woff2", "woff": "woff", "ttf": "truetype");
@if map-get($attributes, "hasOtf") {
$exts: map-merge($exts, ("otf": "opentype"));
}
@each $ext, $mime in $exts {
$src: append($src, url("#{$fontPath}/#{$name}/#{$font}-#{$name}.#{$ext}") format($mime), comma);
}
@jankal
jankal / bulkRename.js
Created November 26, 2020 19:05
Need to rename a lot of markdown files to slugs? - Worry no more.
const fs = require('fs');
const path = require('path');
const slugify = require('slugify');
const directory = './content/articles';
const files = fs.readdirSync(path.resolve(__dirname, directory));
for (const file of files) {
if (file.endsWith('.md')) {
@jankal
jankal / composer.lock
Created April 9, 2024 15:51
composer.lock - Renovate Showpare 6
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a9042fc58dcef97b8fbdb057bc7c4cb8",
"packages": [
{
"name": "async-aws/core",