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 Path from 'path' | |
import express from 'express' | |
import Router from 'express-promise-router' | |
import { createProxyMiddleware } from 'http-proxy-middleware' | |
import env from '../env.js' | |
let assetsRoutes, indexHtmlFallback | |
// proxy requests to `parcel serve` process |
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 * as React from 'react' | |
import { createBrowserRouter, RouterProvider, Navigate, useLocation } from 'react-router-dom' | |
import { getLoginUrl } from '~/client/lib/urls' | |
import { useCurrentUser } from '~/client/hooks/auth' | |
import AppError from '~/client/components/AppError' | |
import FullPageLoading from './components/FullPageLoading' | |
import routeFiles from './routes/**/{Error,NotFound,Layout,Page}.js' |
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
// make new album and go to the add images page then run this script in the console | |
stopIt = false | |
;(async () => { | |
const scrollParent = $('.Purf9b') | |
const wait = async ms => { | |
await new Promise((r, rj) => { | |
setTimeout(() => { r() }, ms) | |
}) | |
} |
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
hyperspace-simulator tail_hypercore.js -- 0ce9e824c768daf0564f6f1ec24e04430111b8845476464ffbf60e8e3ef06347 |
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 is an example of how one could track if going back or forward is | |
an option for the user. | |
*/ | |
if (!window.history.state || !window.history.state.visitedAt){ | |
window.history.replaceState( | |
{...history.state, visitedAt: Date.now()}, |
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 React, { useRef, useState } from 'react' | |
import PropTypes from 'prop-types' | |
import ReactCrop from 'react-image-crop' | |
import 'react-image-crop/dist/ReactCrop.css' | |
export default function CropImage({ | |
className = '', | |
src, | |
height, | |
width, |
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 { h, Fragment } from 'preact' | |
import { memo } from 'preact/compat' | |
import PropTypes from 'prop-types' | |
import Link from 'components/Link' | |
const RawHTML = memo(({source = '', ignoreNodes = []}) => { | |
const parser = new global.DOMParser() | |
const doc = parser.parseFromString(source, "text/html") | |
const options = { |
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
#!/usr/bin/env node | |
function sortSortedWithArrayManipulation(a, b){ | |
a = [...a] | |
b = [...b] | |
const sorted = [] | |
while (a.length || b.length){ | |
if (a.length === 0){ | |
sorted.push(...b) | |
break |
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
launchctl unload ~/Library/LaunchAgents/com.epicgames.launcher.plist | |
rm ~/Library/LaunchAgents/com.epicgames.launcher.plist |
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
#!/usr/bin/env node | |
const fs = require('fs') | |
const words = fs.readFileSync('/usr/share/dict/words').toString().split(/\n+/g) | |
const spells = ["Abi-Dalzim’s Horrid Wilting","Absorb Elements","Acid Splash","Aganazzar’s Scorcher","Aid","Alarm (Ritual)","Alter Self","Animal Friendship","Animal Messenger (Ritual)","Animal Shapes","Animate Dead","Animate Objects","Antilife Shell","Antimagic Field","Antipathy/Sympathy","Arcane Eye","Arcane Gate","Arcane Lock","Armor of Agathys","Arms of Hadar","Astral Projection","Augury (Ritual)","Aura of Life","Aura of Purity","Aura of Vitality","Awaken","Bane","Banishing Smite","Banishment","Barkskin","Beacon of Hope","Beast Bond","Beast Sense (Ritual)","Bestow Curse","Bigby’s Hand","Blade Barrier","Blade Ward","Bless","Blight","Blinding Smite","Blindness/Deafness","Blink","Blur","Bones of the Earth","Booming Blade","Branding Smite","Burning Hands","Call Lightning","Calm Emotions","Catapult","Catnap","Cause Fear","Ceremony (Ritual)","Chain Lightning","Chaos Bolt","Charm Monster", |
NewerOlder