Skip to content

Instantly share code, notes, and snippets.

@noahwilliamsson
noahwilliamsson / apple-vdm-get-actions-list.md
Last active July 27, 2024 10:37
Apple USB-PD VDM get-actions-list
Model / port 0x101 0x103 0x105 0x106 0x201 0x203 0x206 0x208 0x301 0x303 0x304 0x306 0x30a 0x502 0x606 0x702 0x803 0x809 0xb11 0x4606
MacBookAir10,1 (MBA’20) LR N/A 0x8000 0x8000 N/A N/A N/A 0x187 0x20c 0x318 0x8001 N/A 0x
@codello
codello / Apple-CentOS.md
Last active March 6, 2024 19:28
How to install CentOS 8 on a Mac.

Installing CentOS on Apple Hardware

Installing recent CentOS versions on Macs is not as straight forward as I wish it to be. I repeatedly had issues even getting the installation media to boot. In this snippet I gather my findings and present a way to successfully install CentOS on a Mac.

Tested using CentOS Stream 8 on a Late 2014 Mac Mini.

1. Preparing the Installation Media

When using the usual methods of creating a bootable USB drive (e.g. by using balenaEtcher) I was greeted by a black screen. In order to successfully get to the CentOS installer I did the following things:

@yunqu
yunqu / install-gcc.md
Last active October 8, 2024 01:45
Install a different version of GCC on Ubuntu

First, add the ubuntu-toolchain-r/test PPA to your system with:

sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test

Install the desired GCC and G++ versions by typing:

sudo apt install gcc-7 g++-7 gcc-8 g++-8 gcc-9 g++-9
@probonopd
probonopd / Wayland.md
Last active June 29, 2025 07:46
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


Update 06/2025: X11 is alive and well, despite what Red Hat wants you to believe. https://github.com/X11Libre/xserver revitalizes the Xorg X11 server as a community project under new leadership.

@gbrow004
gbrow004 / ubuntu-MBP-16.md
Last active May 8, 2025 17:05
Ubuntu on Apple Macbook Pro 16-inch (2019)

Update!

This gist is out of date and I can no longer help much, as I got rid of my Mac.

Please visit T2 Linux website for more and better information:

https://t2linux.org/

Acknowledgements

This gist is just a compilation of the hard work that others have put in. I'm not a software developer, so if there are any mistakes or better ways of doing things, I'd appreciate any suggestions. Here's a list of the real heroes who made this possible:

@ATRescue
ATRescue / AutoWB.js
Created May 26, 2019 02:08
UserScript to automatically save visited pages into the Wayback Machine.
/* This Userscript helps you preserving websites by automatically saving pages you visit, including their linked subpages and other linked URLs, into Internet Archive's Wayback Machine.
Run this UserScript using the following tools:
Desktop browsers:
* GreaseMonkey for Mozilla Firefox: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
* TamperMonkey for Google Chrome: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
* TamperMonkey for Chromium-Opera Browser: https://addons.opera.com/en/extensions/details/tampermonkey-beta/
@ChrisTollefson
ChrisTollefson / Boot Camp Assistant - USB Install Disk.md
Last active May 5, 2025 21:49
Boot Camp Assistant - Enabling creation of bootable USB disks for installing Windows
@andypiper
andypiper / bledump.txt
Last active January 24, 2022 18:52
experimenting with BLE and LEGO Boost
LEGO Move Hub
8E552B7A-1B9E-4F4D-A0AE-7D585F784B73
advertisementData: ["kCBAdvDataIsConnectable": 1, "kCBAdvDataTxPowerLevel": 0, "kCBAdvDataLocalName": LEGO Move Hub]
00001623-1212-EFDE-1623-785FEABCD123 []
00001624-1212-EFDE-1623-785FEABCD123 ["read", "writeWithoutResponse", "write", "notify"] <0f00043c 01140002 00000002 000000> ["Client Characteristic Configuration <0100>"]
Notification Log:
1502201043.29111 - 00001624-1212-EFDE-1623-785FEABCD123 isNotifying: true
@ericek111
ericek111 / xoverlay.cpp
Last active May 23, 2024 05:38
X11 overlay
/*
* Copyright (c) 2020 ericek111 <[email protected]>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
/**
* 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具
*
* 参考 https://github.com/wandergis/coordtransform 实现的Java版本
* @author geosmart
*/
public class CoordinateTransformUtil {
static double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
// π
static double pi = 3.1415926535897932384626;