Contract Killer
Stuff & Nonsense
The popular open-source contract for web professionals by- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
import { useStorageAsync } from "@vueuse/core"; | |
import { get, set, del } from "idb-keyval"; | |
export const STORAGE_KEY_PREFIX = "app.session."; | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
export function useIdbStorage<T = any>(key: string, initialValue: T) { | |
return useStorageAsync(`${STORAGE_KEY_PREFIX}${key}`, initialValue, { | |
async getItem(key: string) { | |
return (await get<string>(key)) ?? null; |
cd {SITE_DIRECTORY} | |
# Create .env if not present | |
if [ ! -f .env ] && [ -f .env.production.example ]; then | |
cp .env.production.example .env | |
fi | |
# Pull changes | |
git pull origin main |
.gig-page .gig-gallery-component .gallery-thumbnails .thumbs-container .thumbnail { | |
width: 100px; | |
height: 100%; | |
margin-right: 5px; | |
} | |
.gig-page .gig-gallery-component .gallery-thumbnails .thumbs-container .thumbnail img { | |
height: 100%; | |
width: inherit; | |
} |
@media (hover: none) and (pointer: coarse) { | |
/* Touchscreens */ | |
} | |
@media (hover: none) and (pointer: fine) { | |
/* Stylus */ | |
} | |
@media (hover: hover) and (pointer: coarse) { | |
/* Controllers */ | |
} | |
@media (hover: hover) and (pointer: fine) { |
panel.plugin("distantnative/block-accordion", { | |
blocks: { | |
accordion: { | |
methods: { | |
addRow() { | |
this.content.rows.push({ summary: "", detail: "" }); | |
this.update({ rows: this.content.rows }); | |
}, | |
removeRow(index) { | |
this.content.rows.splice(index, 1); |
import { existsSync, readFileSync, writeFileSync } from 'fs' | |
const readDb = path => existsSync(path) ? JSON.parse(readFileSync(path)) : [] | |
const writeDb = (path, value) => { | |
writeFileSync(path, JSON.stringify(value, null, 2)) | |
} | |
class MapDb extends Map { | |
constructor (path) { |
<?php | |
// Link this script in `php.ini`: | |
// `opcache.preload=/path/to/project/preload.php` | |
// | |
// Thanks to Brent Roose for the preloading script | |
// @see https://stitcher.io/blog/preloading-in-php-74 | |
require_once __DIR__ . '/vendor/autoload.php'; |
ssh-keygen -o -a 64 -t ed25519 -f ~/.ssh/id_ed25519 -C "john@example.com" |
<!-- | |
@license | |
Copyright 2018 Google Inc. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |