Skip to content

Instantly share code, notes, and snippets.

@almas
almas / ubuntu-on-mbp-a1707.md
Last active January 11, 2026 03:42 — forked from rob-hills/ubuntu-22.04-mbp-a1707.md
Ubuntu LTS on MacBook Pro 2017 (A1707, MBP 14,3)(T1 chip)

Summary

Notes to install Ubuntu 22.04.4LTS (Upgraded to 24.04LTS) up and running on my 2017 MacBook Pro 15 inch (MacBookPro14,3).

Now everything except the TouchID (Fingerprint), Suspend and Hibernation seems to work for me.

About Ubuntu 24.04LTS: I tried to install Ubuntu 24.04 and didn't have success. There was a crash issue during installation. https://bugs.launchpad.net/subiquity/+bug/2065310 But I installed 22.04 and upgraded it to the 24.04LTS later and it working same as 22.04.4.

Useful References (not mentioned in the text)

@brandonkramer
brandonkramer / bulk-edit-yoast-canonical-url.php
Created October 24, 2020 00:16
Change Yoast canonical URL in bulk for all posts for consolidation/migration by updating the meta field
add_action( 'wp_head', function () {
if ( isset( $_GET[ 'bulk-edit-canonical-url' ] ) ) {
$args = [
'post_type' => 'post',
'suppress_filters' => true,
'posts_per_page' => -1,
'post_status' => [ 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit' ],
];
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active April 25, 2025 19:23
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
MOVED TO ⮕ https://github.com/erikw/restic-automatic-backup-scheduler
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active January 3, 2026 13:48
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

@Kartones
Kartones / postgres-cheatsheet.md
Last active January 11, 2026 15:46
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@anthonywu
anthonywu / update_ubuntu_old_release.sh
Created March 9, 2012 23:08
Redirecting Ubuntu apt-get to old-releases
# Point end-of-life Ubuntu versions' apt source URLs to old-releases.*
# See: https://help.ubuntu.com/community/EOLUpgrades
sudo sed -i s/us.archive.ubuntu/old-releases.ubuntu/g /etc/apt/sources.list
sudo sed -i s/security.ubuntu/old-releases.ubuntu/g /etc/apt/sources.list
sudo apt-get update