Skip to content

Instantly share code, notes, and snippets.

@startergo
startergo / README.en.md
Last active May 31, 2024 22:49 — forked from akihikodaki/README.en.md
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@startergo
startergo / osx-software-update-urls-10.3-to-14.txt
Created February 3, 2024 15:32 — forked from b0gdanw/osx-software-update-urls-10.3-to-14.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@startergo
startergo / Install_USB_Maker.sh
Last active January 28, 2024 14:38 — forked from dakanji/Install_USB_Maker.sh
Creates Bootable USB for Mac OS Lion to Monterey
#!/usr/bin/env bash
# Install_USB_Maker.sh
# Copyright (c) 2020 - 2023 Dayo Akanji
# - dakanji@users.sourceforge.net
# Portions Copyright (c) Jeff Geerling
# - https://github.com/geerlingguy/macos-virtualbox-vm/blob/master/LICENSE
#
# MIT License
@startergo
startergo / sip_config.py
Created March 26, 2023 14:51 — forked from pudquick/sip_config.py
Querying active SIP status directly from the kernel, bypassing nvram and csrutil, via python on macOS
# An overly complicated SIP config checker
# This is a technically interesting implementation because it does not rely on csrutil
# Instead it queries the kernel directly for the current configuration status
# This means, for example, in environments where SIP has been disabled and csrutil has
# been removed or modified (say, with DYLD_LIBRARY_PATH), as long as python can run you
# can still check status
# Additionally, checking the nvram csr-active-config setting isn't accurate now with
# 10.12.2+, since running "sudo csrutil clear" deletes the variable until reboot,
@startergo
startergo / recovery.sh
Created February 12, 2023 18:16 — forked from jonathantneal/recovery.sh
Create or update macOS Big Sur (or Catalina, or Mojave) Recovery Partition Without Reinstalling
#!/bin/sh
# Set the macOS installer path as a variable
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")"
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport"
echo "macOS installer is \"$MACOS_INSTALLER\""
# Set the target disk as a variable
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//')
echo "Target disk is \"$TARGET\""
@startergo
startergo / sync-forked-repo.md
Created February 5, 2023 15:23 — forked from corinneling/sync-forked-repo.md
How to sync up a forked repository

How to Sync A Forked Repo

One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).

  1. Make sure you are in the right place
    • That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.

      fatal: refusing to merge unrelated histories

    • That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error

  • An easy way to check where you are is the command:
@startergo
startergo / KextUtil.sh
Created February 5, 2023 14:33 — forked from joevt/KextUtil.sh
Commands for kexts
#!/bin/bash
# joevt Jan 31, 2023
#10.4 Tiger to 10.13 High Sierra
kextload=kextload
# Later macOS versions
command -v kextutil > /dev/null && kextload=kextutil
getkextidentifier () {
@startergo
startergo / pcitree.sh
Created January 31, 2023 02:28 — forked from joevt/pcitree.sh
A bash script to produce more informative output than lspci -nntv
#!/bin/bash
# by joevt Jan 22, 2023
#===================
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root like this:"
echo "sudo $0"
exit 1
fi
#===================
@startergo
startergo / install-gcc-9.sh
Created January 3, 2022 04:22 — forked from alexandreelise/README.md
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04
#!/usr/bin/env sh
sudo apt-get update -y && \
sudo apt-get upgrade -y && \
sudo apt-get dist-upgrade -y && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt-get update -y && \
sudo apt-get install gcc-9 g++-9 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 && \
@startergo
startergo / Convert-WindowsImage.ps1
Created October 26, 2021 12:09 — forked from john-clark/Convert-WindowsImage.ps1
deplyment powershell scripts found on the internets
Function
Convert-WindowsImage
{
<#
.NOTES
Copyright (c) Microsoft Corporation. All rights reserved.
Use of this sample source code is subject to the terms of the Microsoft
license agreement under which you licensed this sample source code. If