Skip to content

Instantly share code, notes, and snippets.

View Muffinman's full-sized avatar
🤠
Stuff

Matt Jones Muffinman

🤠
Stuff
View GitHub Profile
From 272da51bfd562f5b9847c1b41eaa5d7018058490 Mon Sep 17 00:00:00 2001
From: Manuel Kress <[email protected]>
Date: Fri, 1 Mar 2024 17:47:21 +0100
Subject: [PATCH] Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon
system
setitimer(ITIMER_PROF) fires too early on MacOS 14 when running on Apple
Silicon. See https://openradar.appspot.com/radar?id=5583058442911744.
Fixes GH-12814
@Muffinman
Muffinman / get_composer_deps.py
Last active May 17, 2024 13:24 — forked from yebt/get_composer_deps.py
This script was created as an helps to recover the require dependencies inside vendor directory of project, if you lost the main composer.json
#!/bin/python
# -*- coding: utf-8 -*-
import json
import sys
# Constant vars
if len(sys.argv) != 2:
print('Error!! -- No file specified ')
print('\t get_composer_deps.py <path/to/vendor/composer/installed.json>')
@Muffinman
Muffinman / example.sh
Created November 2, 2023 16:59
Typesense query token problem
#!/bin/bash
export TYPESENSE_API_KEY=xyz
curl "http://localhost:8108/debug" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}"
curl "http://localhost:8108/collections" \
-X POST \
@Muffinman
Muffinman / webpack.config.js
Last active October 19, 2022 09:45
Webpack merge rules
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
const { getWebpackEntryPoints } = require('@wordpress/scripts/utils/config');
module.exports = {
...defaultConfig,
stats: 'minimal',
entry: {
...getWebpackEntryPoints(),
'app-styles': ['./src/css/app.css'],
'app-scripts': ['./src/js/app.js'],