A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| /** | |
| * Retry-status object type, for use with RetryCB. | |
| */ | |
| export type RetryStatus<D = unknown> = { | |
| /** | |
| * Retry index, starting from 0. | |
| */ | |
| readonly index: number, | |
| /** |
| // #popclip extension for ChatGPT | |
| // name: ChatGPT Quick Actions | |
| // icon: iconify:logos:openai-icon | |
| // language: javascript | |
| // module: true | |
| // entitlements: [network] | |
| // options: [{ | |
| // identifier: apikey, label: API Key, type: string, | |
| // description: 'Obtain API key from https://platform.openai.com/account/api-keys' | |
| // }] |
| <script context="module"> | |
| import { get, readable } from 'svelte/store' | |
| import { createClient, operationStore } from '@urql/svelte' | |
| import { browser, dev } from '$app/env' | |
| /** | |
| * @type {import('@sveltejs/kit').Load} | |
| */ |
| // npm install superagent | |
| const superagent = require("superagent"); | |
| // this is verdaccio's url ↓ but you could use like registry.npmjs.com if that is allowed in their TOS | |
| const registryUrl = "http://127.0.0.1:4873"; | |
| const username = "myusername2"; | |
| const password = "mypassword2"; | |
| const frm ={ | |
| name: username, |
| #!/bin/bash | |
| # | |
| # A script to update your /etc/hosts file from minikube ingest records | |
| # | |
| # Installation | |
| # ------------ | |
| # curl -L https://gist.github.com/jacobtomlinson/4b835d807ebcea73c6c8f602613803d4/raw/minikube-update-hosts.sh > /usr/local/bin/minikube-update-hosts | |
| # chmod +x /usr/local/bin/minikube-update-hosts | |
| set -e |
| #!/bin/bash | |
| #------------------ | |
| # Extract the key, certficiate, and chain in PEM format from a PFX format file | |
| # | |
| # Must supply the input pfx file | |
| PFX_PATH="$1" | |
| if [ "${PFX_PATH}" == "" ]; then | |
| echo "Must supply pfx file path" | |
| exit 1 |
| # using VirtualBox version $VBOX_VERSION | |
| FROM boot2docker/boot2docker | |
| RUN apt-get install p7zip-full | |
| RUN mkdir -p /vboxguest && \ | |
| cd /vboxguest && \ | |
| curl -L -o vboxguest.iso http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso && \ | |
| 7z x vboxguest.iso -ir'!VBoxLinuxAdditions.run' && \ | |
| sh VBoxLinuxAdditions.run --noexec --target . && \ |
| var cluster = require('cluster'); | |
| var http = require('http'); | |
| var numCPUs = require('os').cpus().length; | |
| if (cluster.isMaster) { | |
| // Fork workers. | |
| for (var i = 0; i < numCPUs; i++) { | |
| cluster.fork(); | |
| } | |
| cluster.on('exit', function(worker, code, signal) { |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs