Skip to content

Instantly share code, notes, and snippets.

View estruyf's full-sized avatar
:octocat:
Front Matter CMS

Elio Struyf estruyf

:octocat:
Front Matter CMS
View GitHub Profile
@estruyf
estruyf / extension.ts
Created December 22, 2023 08:20
Comment style sample from Wes Bos
import * as vscode from "vscode";
export function activate(context: vscode.ExtensionContext) {
commentDecoration();
vscode.window.onDidChangeActiveTextEditor(() => {
commentDecoration();
});
vscode.workspace.onDidChangeTextDocument(
@estruyf
estruyf / frontmatter.json
Created December 8, 2023 08:18
Front Matter CMS configuration for Bubblegum Theme
{
"$schema": "https://beta.frontmatter.codes/frontmatter.schema.json",
"frontMatter.taxonomy.contentTypes": [
{
"name": "project",
"pageBundle": false,
"filePrefix": null,
"fields": [
{
"title": "title",
@estruyf
estruyf / 1-frontmatter-contenttype.json
Last active March 2, 2023 21:14
Front Matter - Open Graph
"frontMatter.taxonomy.contentTypes": [{
"name": "default",
"pageBundle": false,
"filePrefix": "yyyy-MM-dd",
"fields": [{
"title": "Title",
"name": "title",
"type": "string",
"required": true
},
@estruyf
estruyf / fm.snippets.json
Created June 9, 2022 18:29
Front Matter - Snippets
{
"frontMatter.content.snippets": {
"Image snippet": {
"body": "{{< caption-new \"[[&mediaUrl]]\" \"[[caption]]\" >}}",
"isMediaSnippet": true,
"description": ""
},
"Video snippet": {
"body": [
"{{< video \"[[&mediaUrl]]\" \"[[caption]]\" >}}"
@estruyf
estruyf / vscode-theme-variables.css
Created January 28, 2022 13:21
All VS Code theme variables
:root {
--vscode-font-weight:normal;
--vscode-font-size:13px;
--vscode-editor-font-family:&quot;Operator Mono Lig&quot;, &quot;Cascadia Code&quot;;
--vscode-editor-font-weight:normal;
--vscode-editor-font-size:15px;
--vscode-foreground:#f3eff5;
--vscode-errorForeground:#f48771;
--vscode-descriptionForeground:rgba(243, 239, 245, 0.7);
--vscode-icon-foreground:#c5c5c5;
@estruyf
estruyf / visit.adal.js
Created April 17, 2020 15:15
Visit page with access token retrieval
Cypress.Commands.add("visitWithAdal", (pageUrl) => {
const config = {
username: process.env.CI ? Cypress.env('USERNAME') : Cypress.env('username'),
password: process.env.CI ? Cypress.env('PASSWORD') : Cypress.env('password'),
tenant: process.env.CI ? Cypress.env('TENANT') : Cypress.env('tenant'),
clientId: process.env.CI ? Cypress.env('CLIENTID') : Cypress.env('clientid'),
clientSecret: process.env.CI ? Cypress.env('CLIENTSECRET') : Cypress.env('clientsecret'),
resource: process.env.CI ? Cypress.env('RESOURCE') : Cypress.env('resource')
};
@estruyf
estruyf / homebridge.schema.json
Last active April 9, 2020 08:47
homebridge.schema.json
{
"type": "object",
"minProperties": 0,
"title": "The Root Schema",
"description": "The root schema comprises the entire JSON document.",
"additionalProperties": true,
"required": [
"pluginAlias",
"pluginType",
"singular",
@estruyf
estruyf / unicorn-hat.sh
Last active April 3, 2020 09:44
unicorn-hat.sh
#!/bin/bash
: <<'DISCLAIMER'
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
@estruyf
estruyf / loadPropertyPaneResources.ts
Created March 11, 2020 20:03
Dynamically loading resources in loadPropertyPaneResources
/**
* Load property pane resources
*/
protected async loadPropertyPaneResources(): Promise<void> {
PropertyPaneHelpers.setSpinner({
bgColor: "white",
spinnerProps: {
getStyles: () => {
return {
circle: {
@estruyf
estruyf / playwright-jest-sample2.js
Created February 27, 2020 17:48
Playwright with Jest for E2E testing - samples 2
const playwright = require('playwright');
const PAGE_URL = "https://www.eliostruyf.com";
// Loop over all the supported browsers
for (const browserType of ["chromium", "firefox", "webkit"]) {
describe(`(${browserType}): UI Tests with Playwright`, () => {
let browser = null;
let page = null;