Skip to content

Instantly share code, notes, and snippets.

View joshuataylor's full-sized avatar
👋

Josh Taylor joshuataylor

👋
View GitHub Profile
# MacOS Right Click Issues
tl;dr: MacOS right click sometimes doesn't seem to work
[This reddit thread](https://old.reddit.com/r/MacOS/comments/16tgy8e/intermittent_mouse_click_issues_after_sonoma/) confirmed others are having the same issue.
I started having this issue 2023-03-22, somehow out of the blue, with nothing changed, I downgraded from 14.4 to 14.3.1, still the same issue.
It HAS to be a software bug, and I'm slightly insane enough to prove it, as right click sometimes just doesn't work, which is absolutely infurating.
## My Configuration
@joshuataylor
joshuataylor / idea-gcg1.vmoptions
Created February 19, 2024 15:23 — forked from mahmoudimus/idea-gcg1.vmoptions
A running timeline of my IntelliJ on Steroids with GC tuning
-ea
-server
-Xss256k
-Xms4G
-Xmx4G
-XX:+IgnoreUnrecognizedVMOptions
-XX:+UnlockExperimentalVMOptions
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:-UseSerialGC
@joshuataylor
joshuataylor / defang.md
Created February 17, 2024 15:48 — forked from macshome/defang.md
How to defang system protections on macOS

How to Defang macOS System Protections

If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.

Note that all of these things put a Mac into an unsupported and less secure state.

Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around

Protections and Terms

(This list is not exahustive on the details of each. Check the links at the end for more info.)

@joshuataylor
joshuataylor / gist:58011e245910b413bc67df42c9e30dae
Created August 22, 2023 10:27
Gitea backup speed for tar, zst, bz2, etcetc
I have 3 smallish repositories:
```
Repository Size 943 KiB
Repository Size 857 KiB
Repository Size 6.0 MiB
```
Gitea backup speed for each of the commands:
From 5d04dc68d7a952c2b98cab7af60bba93bee2dec7 Mon Sep 17 00:00:00 2001
From: lilydjwg <lilydjwg@gmail.com>
Date: Wed, 17 Nov 2021 19:34:58 +0800
Subject: [PATCH 1/2] xwayland: support HiDPI scale
This supports the xorg-xwayland patch at https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733
---
include/xwayland/xwm.h | 2 ++
xwayland/xwm.c | 51 +++++++++++++++++++++++++++++++-----------
2 files changed, 40 insertions(+), 13 deletions(-)
# Dumps using zstd, with up to 32 threads.
# To silence zstd, add -q
# xfsdump -L mybackup -J - / | zstd -3 --threads=0 -o /backups/mybackup.zstd
xfsdump options (https://man.archlinux.org/man/xfsdump.8.en):
# -L session_label: Specifies a label for the dump session. It can be any arbitrary string up to 255 characters long.
# -J Inhibits the normal update of the inventory. This is useful when the media being dumped to will be discarded or overwritten.
# - sends output to stdout, for zstd to read
# / the partition directory
@joshuataylor
joshuataylor / test
Created January 29, 2023 03:34
test
test
@joshuataylor
joshuataylor / test_parser.py
Created October 22, 2020 10:57
Parse dbt errors in github actions to display in github annotations
import json
import re
# Open the run_results.json, which contains results from the run or test run.
input_file = open('target/run_results.json')
json_array = json.load(input_file)
# If there is no errors, by default we just print a new line.
errors = "\n"
for item in json_array["results"]:
# Run and test have different syntaxes, this should cover them both.
So you have setup your API to accept CORS requests on certain paths on your API using [cors_plug](https://github.com/mschae/cors_plug) or [corsica](https://github.com/whatyouhide/corsica) and you are wondering how you test this with ExUnit.
## Back to basics: Does the endpoint actually work?
Well the first thing to do is to check if your endpoint is actually working with CORS.
You can do this via cURL:
curl http://localhost:4000/api/posts -v -H "Origin: https://example.com"
foreach (var item in items)
{
var message = new Foobar();
tasks.Add(context.Publish(message));
}
await Task.WhenAll(tasks).ConfigureAwait(false);