Skip to content

Instantly share code, notes, and snippets.

@jcubic
jcubic / cdn.md
Last active November 13, 2024 22:56
How to setup a literally free CDN
@mashirozx
mashirozx / _polyfill.scss
Last active March 13, 2024 08:23
Flex box gap polyfill with scss mixin
@use 'sass:math';
@mixin _flex-gap($gap, $row: true) {
$margin: math.div($gap, 2);
$transform: -$margin;
@if $row {
margin-left: $transform;
margin-right: $transform;
} @else {
margin-top: $transform;
margin-bottom: $transform;
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active November 15, 2024 14:00
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@dhinakg
dhinakg / tutorial.md
Last active September 16, 2024 13:12
iOS/iPadOS 14.3 OTA
@BourgonLaurent
BourgonLaurent / APPro_LMC_change.applescript
Last active August 7, 2022 03:58
AirPods Pro Listening Mode Changer. Copy-Paste the contents of the file "AirPods Pro Listening Mode Changer.json" inside BTT. The two other files are the scripts used by the widget. The last file (APPro_LMC_diag.applescript) retrieves the necessary information to add a new device, or debug a current one.
-- Change the listening mode of AirPods Pro, Laurent Bourgon 2020
-- Works in the background using private APIs, thanks to @smithumble
-- Frameworks to connect with Bluetooth
use framework "IOBluetooth"
use scripting additions
-- Get AirPods Name
tell application "BetterTouchTool" to set AIRPODS_PRO_NAME to get_string_variable "AirPodsWg_DevceName"
@ifilipis
ifilipis / Tweak.x
Created February 18, 2020 18:13
iPhone XS night mode
/*
-------------------------------------------------
Here's the progress to date:
- Night mode UI is showing night mode controls
- Night mode triggers in low light automatically
- Core functionality of AVFoundation and Celestial does recognize Night mode
- All the logic is already implemented for XS and 11 (they even share the same ipsw for 13.3)
- iPhone X support could be significantly harder to get, plus I don't have it to test anyways
Here's what's not working:
@joevt
joevt / EDIDUtil.sh
Last active July 23, 2024 03:03
A set of shell functions used to view and edit EDIDs.
#!/bin/bash
#!/bin/zsh
# by joevt May 24/2023
#=========================================================================================
edid_decode=edid-decode
#=========================================================================================
# Modify EDID
@mollymerp
mollymerp / sshfs-gcp-instance-osx.md
Last active January 10, 2024 14:52
How to mount a GCP compute instance filesystem locally using `sshfs` on MacOS

How to mount a GCP compute instance filesystem locally using sshfs

This guide assumes that:

  • you already have an instance set up on GCP that you want to mount locally
  • the GCP CLI (gcloud) is installed on your local machine
  • you have authenticated locally to your google account gcloud auth login
  1. make sure your gcloud config is correct for the instance you're trying to access:
@JeremyRH
JeremyRH / event-delegation-performance.md
Last active October 22, 2024 19:42
Does event delegation actually improve performance?

Does event delegation actually improve performance?

Event delegation works by attaching a single event listener to a parent element to catch events bubbling up from the children. Many people believe this is more performant than attaching event listeners to each child. I am not convinced this is always true.

Let's start with a common example of event delegation. Here we have a list of elements:

<ul id="item-list">
  <li data-cost="12">Item 1</li>
  <li data-cost="18">Item 2</li>
  <li data-cost="6">Item 3</li>
 ...
@dannote
dannote / final-cut-pro-trial-reset.swift
Last active November 15, 2024 15:21
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {