Skip to content

Instantly share code, notes, and snippets.

View m7kvqbe1's full-sized avatar
:shipit:
Hello, World!

Tom Humphris m7kvqbe1

:shipit:
Hello, World!
View GitHub Profile
@m7kvqbe1
m7kvqbe1 / curl-with-http3-macos.md
Created December 6, 2024 14:31 — forked from xmlking/curl-with-http3-macos.md
Installing curl with http3 on MacOS

Work-in-pogress

Ref: cloudflare/homebrew-cloudflare#21

 # Clean up any old version of curl you may have already tried to install
brew remove -f curl

# Download the curl ruby install script provided by cloudflare
#!/bin/bash
# Check if the correct number of arguments is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <repository> <username>"
echo "Example: $0 octocat/Hello-World johndoe"
exit 1
fi
# Variables from command-line arguments
@m7kvqbe1
m7kvqbe1 / gist:7743337cfe34ca2122e17f42411c8fb1
Created April 30, 2024 09:36
Invalidate all GHA runner caches
gh cache list | awk '/[0-9]{5}/{print substr($0,match($0,/[0-9]{5}/),5)}' | xargs -I {} gh cache delete {}
// requestInterceptor.js
const hostnameWhitelist = ['api.example.com', 'another.api.com'];
// Original functions
const originalFetch = window.fetch;
const originalXMLHttpRequest = window.XMLHttpRequest;
const originalSendBeacon = navigator.sendBeacon.bind(navigator);
const originalWebSocket = window.WebSocket;
@m7kvqbe1
m7kvqbe1 / access.log for nextjs.md
Created February 29, 2024 16:14 — forked from x-yuri/access.log for nextjs.md
access.log for nextjs

access.log for nextjs

$ npx create-next-app app

app/Dockerfile:

FROM node:20.11.1-alpine3.19 as npm
@m7kvqbe1
m7kvqbe1 / gist:a89bf90c35bd96a0e89400863248ead6
Last active February 9, 2022 13:22
react-component-library Field
import styled from "styled-components";
const StyledField = styled.div``;
const StyledErrorMessage = styled.span``;
const StyledHintText = styled.span``
function Field({ hintText, errors, children, ...rest }) {
// Function as Child Component (FaCC - pretty render prop)
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@m7kvqbe1
m7kvqbe1 / gist:ecdbdd0d658d0af593b447e9d0a09976
Created December 11, 2020 11:39
lerna-changelog-regenerate
Tips
Generating Initial Changelogs
If you start using the --conventional-commits option after the monorepo has been active for awhile, you can still generate changelogs for previous releases using conventional-changelog-cli and lerna exec:
# Lerna does not actually use conventional-changelog-cli, so you need to install it temporarily
npm i -D conventional-changelog-cli
# Documentation: `npx conventional-changelog --help`
# fixed versioning (default)
# run in root, then leaves
@m7kvqbe1
m7kvqbe1 / gist:f7139d4bf0540f96ec9d10d79363f218
Created September 24, 2020 10:34
transformIgnorePatterns node_module
transformIgnorePatterns node_module
https://github.com/facebook/jest/issues/6229#issuecomment-403539460
@m7kvqbe1
m7kvqbe1 / gist:0ba32f56466b8904655cfa089b73e0ee
Created December 10, 2019 14:03
Manual node install...
sudo tar -xf some-node-tarball.tar.gz --directory /usr/local --strip-components 1