Skip to content

Instantly share code, notes, and snippets.

View Inventsable's full-sized avatar
🌎
Now I am become Life, the creator of worlds

Tom Scharstein Inventsable

🌎
Now I am become Life, the creator of worlds
View GitHub Profile
@addyosmani
addyosmani / README.md
Last active July 13, 2024 21:26 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

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

@Manouchehri
Manouchehri / rfc3161.txt
Last active July 10, 2024 06:32
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@sergiodxa
sergiodxa / async-thread.js
Last active June 27, 2023 05:38
Use WebWorkers and promises to run sync heavy functions in a worker (process) and get the result in a promise
function asyncThread(fn, ...args) {
if (!window.Worker) throw Promise.reject(
new ReferenceError(`WebWorkers aren't available.`)
);
const fnWorker = `
self.onmessage = function(message) {
(${fn.toString()})
.apply(null, message.data)
.then(result => self.postMessage(result));
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active July 15, 2024 14:30
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@clhenrick
clhenrick / .block
Last active June 14, 2023 09:45
Custom tiles in Google Maps
license: apache-2.0
@jmsdnns
jmsdnns / jd-export.jsx
Last active May 1, 2024 21:14
Illustrator script—Exports CMYK, RGB, and Hex values for all the color swatches in a document. CMYK to RGB conversion using Adobe’s default US Web Coated SWOP2 to sRGB.
/**
* jd-export.jsx
* -------------
* Illustrator script—Exports CMYK, RGB, and Hex values for all the color
* swatches in a document. CMYK to RGB conversion using Adobe’s default US
* Web Coated SWOP2 to sRGB.
*
*
* LICENSE
* -------
@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active May 6, 2024 06:11
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@eeropic
eeropic / Ae expressions and scripts.js
Last active June 12, 2024 10:23
After effects expressions and scripts collected from various authors and myself.
//dynamic parenting for 3d layers
//from Dan Ebberts on forums I think..
//Position
L=thisComp.layer("Object center");
L.toWorld(L.effect(name)("3D Point"));
//Scale
L =thisComp.layer("Object center");
[L.transform.scale[0]/100*value[0],L.transform.scale[1]/100*value[1],L.transform.scale[2]/100*value[2]];
@Sergeon
Sergeon / commit-msg
Last active December 4, 2019 01:54
Commit-msg git hook with node.js
#!/usr/bin/env node
/**
*
* This code will ensure that before every commit in your client repository, your branch name and commit message adheres to a certain contract.
* In this example, branch names must be like 'feature/AP-22-some-feature-name' or 'hotfix/AP-30-invitation-email-not-sending', and commit messages must start like some issue code, like AP-100 or AP-101.
*
* 'AP' just stands for Acme Platform and is an example. I made this example with Jira in mind, since Jira issue codes have this structure -as far as I know-, but is pretty easy to change it to any other issue id like #100 or $-AP-120, or whatever.
*
* In order for this to work, you should go to .git/hooks in any git client repository and create a commit-msg file (or modify the provided by default, commit-msg.sample) with
const { Worker, isMainThread, parentPort } = require('worker_threads');
if (isMainThread) {
// This code is executed in the main thread and not in the worker.
// Create the worker.
const worker = new Worker(__filename);
// Listen for messages from the worker and print them.
worker.on('message', (msg) => { console.log(msg); });
} else {
// This code is executed in the worker and not in the main thread.