Skip to content

Instantly share code, notes, and snippets.

const TWO_WEEKS_IN_MS = 14 * 24 * 60 * 60 * 1000; // 14 days in milliseconds
const targetDate = new Date('2023-03-10T14:45:04Z');
const currentDate = new Date();
if (currentDate.getTime() - targetDate.getTime() >= TWO_WEEKS_IN_MS) {
console.log('The target date is two weeks or older than the current date.');
return true;
} else {
console.log('The target date is less than two weeks older than the current date.');
return false;
{
"workbench.startupEditor": "newUntitledFile",
"atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"terminal.integrated.fontSize": 14,
"editor.fontFamily": "SF Mono, Fira Mono, Consolas, 'Courier New', monospace",
"editor.tabSize": 2,
"workbench.editor.enablePreview": false,
"editor.minimap.enabled": false,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
---
title: Vue & Nuxt
excerpt: Single & multi-page web apps
description: Single & multi-page web apps
imageCard: card-service-vue-nuxt
imageSocial: og-card-service-vue-nuxt.png
date: 2022-12-02
highlight: -1
cover: '/content/cards/card-service-vue-nuxt-lg'
order: 0
// @prefix vvv
// @description
<template lang="pug">
.name
</template>
<script setup>
cd "$1" . "$2" && mkdir -p \
"01 Artwork/01 Assets" \
"01 Artwork/02 Stuff" \
"01 Artwork/Ω Archived" \
"02 Supplied" \
"03 Docs" \
"04 Backups"
@blackspike
blackspike / home.js
Last active December 10, 2022 15:54
<script setup>
import anime from 'animejs'
import * as THREE from "three"
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js"
import { stateStore } from '~/stores/state'
const state = stateStore()
const props = defineProps({
screens: {
@blackspike
blackspike / html
Last active December 6, 2022 10:31
<div class="container">
<!-- Main page -->
<main id="main-content" class="page">
<!-- Page content -->
<article id="content" class="page-content text-content">
<!-- Page header -->
<header class="page-header">
<h1 class="page-header__title">Accessible Data Storytelling with Power BI: Design Concepts and Accessible Colours</h1>
</header>
{
"name": "SpikeNewsBot",
"description": "A context menu item to post links from spike.news",
"version": "1.0",
"manifest_version": 2,
"permissions": [
"*://spike.news/*",
"*://localhost/*",
"activeTab",
browser.contextMenus.create({
id: 'spikebot',
title: 'Post to spike.bot',
contexts: ['link'],
})
browser.contextMenus.onClicked.addListener(async (info, tab) => {
if (info.menuItemId === 'spikebot') {
// HTML-escape external input to avoid XSS.
const safeUrl = escapeHTML(info.linkUrl)