Skip to content

Instantly share code, notes, and snippets.

View cephalization's full-sized avatar
💻
`rm -rf node_modules; npm install; npm start`

Tony Powell cephalization

💻
`rm -rf node_modules; npm install; npm start`
View GitHub Profile

Apple Studio Display Setup on Arch Linux with Hyprland

Problem Description

Apple Studio Display (5K) on Arch Linux with Hyprland was experiencing intermittent connection issues where:

  • Display would not always connect reliably
  • System detected the display as two separate devices
  • Wrong display connector was sometimes chosen

System

@cephalization
cephalization / trackSearchBad.tsx
Created March 30, 2022 22:36
Incorrect useTransition usage
import React, { useCallback, useEffect, useState, useTransition } from 'react';
import { useAppDispatch, useAppSelector } from '~/hooks';
import { libraryActions } from '~/store/slices/library/library';
import { librarySelectors } from '~/store/slices/library/selectors';
// Search input
// Dispatches redux thunk when text input changes
export function TrackSearch() {
const dispatch = useAppDispatch();
@cephalization
cephalization / index.html
Created October 17, 2019 14:24 — forked from RubaXa/index.html
for-in vs. Object.values vs. for loop (http://jsbench.github.io/#835140d2ac680481e62951e641f6a5c4) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>for-in vs. Object.values vs. for loop</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>