Skip to content

Instantly share code, notes, and snippets.

@jcubic
jcubic / cdn.md
Last active June 30, 2024 12:26
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 July 5, 2024 07:14
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 December 9, 2023 01:50
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 January 14, 2024 16:48
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:
@dannote
dannote / final-cut-pro-trial-reset.swift
Last active June 26, 2024 16:31
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 {
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active July 2, 2024 13:31
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se