This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { walk } from "https://deno.land/std/fs/walk.ts"; | |
import { join } from "https://deno.land/std/path/mod.ts"; | |
const megaFiles = {} | |
async function crawlDirectory(relativePath: string): Promise<string[]> { | |
const filePaths: string[] = []; | |
const currentDir = Deno.cwd(); // Get the current working directory | |
const absolutePath = join(currentDir, relativePath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const addToIndexedDB = async (dbName, version, storeName, keyPath, key, value) => { | |
try { | |
// Open a connection to the database | |
const dbRequest = indexedDB.open(dbName, version); | |
dbRequest.onupgradeneeded = (event) => { | |
const db = event.target.result; | |
// Create an object store if it doesn't exist | |
db.createObjectStore(storeName, { keyPath }); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.github-contributions { | |
--color-workflow-card-connector: var(--color-scale-gray-5); | |
--color-workflow-card-connector-bg: var(--color-scale-gray-5); | |
--color-workflow-card-connector-inactive: var(--color-border-default); | |
--color-workflow-card-connector-inactive-bg: var(--color-border-default); | |
--color-workflow-card-connector-highlight: var(--color-scale-blue-5); | |
--color-workflow-card-connector-highlight-bg: var(--color-scale-blue-5); | |
--color-workflow-card-bg: var(--color-scale-gray-7); | |
--color-workflow-card-inactive-bg: var(--color-canvas-inset); | |
--color-workflow-card-header-shadow: rgba(27, 31, 35, 0.04); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this file is loaded in worker-dom by amp-script and handles all comment functions | |
(async function ampComments() { | |
const addSiSpinner = function (element, prepend = false) { | |
const spinner = document.createElement('div'); | |
spinner.classList.add('loadingspinner'); | |
if (prepend) { | |
element.insertBefore(element, element.firstElementChild); | |
} else { | |
element.appendChild(spinner); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -r 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |