Skip to content

Instantly share code, notes, and snippets.

@rosswd
rosswd / restore.md
Last active December 31, 2025 20:52
Restoring to a new SSD in MacOS High Sierra

Installing a new ssd in MacOS High Sierra

This guide is for upgrading to a new SSD, restoring from Time Machine and keeping your Recovery Partition.

The first time I tried to install a new SSD I just installed the SSD and didn't format anything. I figured the format would be chosen by MacOS but it wasn't and the recovery partition didn't copy over to the new disk. If you don't have a Recovery Partition you can't use Disk Encryption or Find My Mac.

Note: you may have to disable/remove disk encryption but my Disk wasn't encrypted so I don't have steps for that

Preparing your Computer

  • Do a Time Machine Backup and make sure you're not excluding anything you need
  • Shut down your Mac and go through the process of removing the old drive
#include <ILI9341_t3.h> // https://github.com/PaulStoffregen/ILI9341_t3
struct CanData {
uint32_t id;
uint8_t len;
uint8_t data[8] __attribute__((aligned(8)));
};
int CAN_IDS[] = {
0x050,
@faparicior
faparicior / end.gcode
Created April 28, 2020 16:03
Start and End G-code for Ender 3 on Cura
; Ender 3 Custom End G-code
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y{machine_depth} F1000 ; Move Heat Bed to the front for easy print removal
M106 S0 ; Turn off cooling fan
@mihaiserban
mihaiserban / printer.cfg
Last active October 10, 2025 23:57
Klipper Ender 5 Plus stock printer config
# This file contains pin mappings for the Creality Ender 5 Plus.
# Ender 5 Plus stock uses a Creality v2.2 board, similar to CR-20 Pro.
# To use this config, the firmware should be compiled for the AVR atmega2560.
# See the example.cfg file for a description of available parameters.
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
@pjobson
pjobson / apple_install_dates.md
Last active January 18, 2026 10:27
OSX Install Dates

Various Versions of macOS/OSX will fail on install for various reasons. You can fix them by disconnecting from your wifi or network or resetting your NVRAM. Booting from your USB stick, opening terminal and doing: date ########## where the # nubers are below. Format is: MMDDhhmmYY

10.16 - 0.5 Leopard   - date 0101010121 <- Currently not needed
10.15 - Catalina      - date 0101010120 <- Currently not needed
10.14 - Mojave        - date 0101010119 <- Currently not needed
10.13 - High Sierra   - date 0101010118

10.12 - Sierra - date 0101010117

@Californ1a
Californ1a / youtubeThumbnailResize.css
Last active August 19, 2025 23:36
Change YouTube homepage grid count (youtube thumbnail resize)
/* Credit https://chrome.google.com/webstore/detail/youtube-thumbnail-resizer/pbkkiocccjpeadoiakfbljdbhhdimoac
It's seriously just 1 css rule! 🤯 */
.ytd-rich-grid-renderer {
--ytd-rich-grid-items-per-row: 6;
}
/* Updated version: https://reddit.com/r/youtube/comments/qwjc10/how_to_display_more_thumbnailsitems_on_youtube/hl4fwty/ */
ytd-rich-grid-renderer {
--ytd-rich-grid-items-per-row: 6 !important;
}
@danielrotaermel
danielrotaermel / toggle-pip.applescript
Last active January 17, 2026 13:49
Applescript to toggle picture-in-picture globally - I assign this to a keyboard shortcut with better touch tool (cmd+ctrl+p). Make sure "Developer > Allow JavaScript from Apple Events" is enabled in Safari. Download BTT preset -> https://share.folivora.ai/sP/3dd264e3-5d16-425f-8ab3-ce14877ec04f
(*
Description: Applescript to open/close picture-in-picture in Safari
Supported Applications: Safari, IINA
Author: Daniel Rotärmel
Source: https://gist.github.com/danielrotaermel/201f549d5755ea886eb78bb660133722
Instructions:
Assign this to a global keyboard shortcut with better touch tool / hammerspoon etc. - suggested: cmd+ctrl+p.
Make sure "Developer > Allow JavaScript from Apple Events" is enabled in Safari.
Download the BTT preset here -> https://share.folivora.ai/sharedPreset/caa1198d-36dd-4aeb-89de-142bf39cc336
*)
@barbietunnie
barbietunnie / dropbox-v2-upload.md
Created November 21, 2020 03:53
Upload Large Files with Dropbox v2

Upload Large Files with Dropbox v2

To upload large files with Dropbox, you need to use upload sessions.

The utility function below can be used for this purpose.

It uses the Dropbox Python SDK to upload the local file specified as file_path to the remote path specified by dest_path. It also chooses whether or not to use an upload session based on the size of the file.

@properlypurple
properlypurple / gist:91313ba00fe146a996c9a01c5a8a6950
Last active December 31, 2023 07:35
Klipper Ender 3 4.2.2 128x64 SPI OLED
# This file contains pin mappings for the stock 2020 Creality Ender 3
# V2. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and with "Use USB for
# communication" disabled.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select the
# USART3 serial port, which is broken out on the 10 pin IDC cable used
# for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
@LukeZGD
LukeZGD / ios-downgrade-dualboot.md
Last active February 3, 2026 09:09
Downgrade and dualboot status of almost all iOS devices

Downgrade and dualboot status of almost all iOS devices

UPDATED: 2025-11-23