Skip to content

Instantly share code, notes, and snippets.

@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 / openwork_upgrade.md
Created December 18, 2023 01:34
Sysupgrade OpenWRT

scp openwrt-19.07.7-ar71xx-mikrotik-nand-64m-squashfs-sysupgrade.bin root@192.168.1.1:/tmp

@startergo
startergo / dhcp.md
Created December 17, 2023 17:19
T-mobile at home Internet and OpenWRT router settings
@startergo
startergo / reset_Git.md
Created October 15, 2023 14:15
Reset clone to specific Git commit id
  • Look at the git log:
git log -n 5 --oneline
  • Pick up a commit id and reset:
git reset --hard 'commit id'
@startergo
startergo / path.md
Created October 14, 2023 20:12
How to display $PATH as one directory per line and change the $PATH variables
  • You can modify path display with any one of the following commands, which substitutes all occurrences of : with new lines \n.

  • sed:

$ sed 's/:/\n/g' <<< "$PATH"
  • tr:
$ tr ':' '\n' &lt;&lt;&lt; "$PATH"
@startergo
startergo / pyenv_macports.md
Last active October 14, 2023 17:36
Install Pyenv with Macports
  • Install Macports.
  • Install python dependencies:
sudo port install pkgconfig openssl zlib xz gdbm tcl tk +quartz sqlite3 sqlite3-tcl
  • Install python:
GDBM_CFLAGS="-I$(dirname $(dirname $(which port)))/include" \
GDBM_LIBS="-L$(dirname $(dirname $(which port)))/lib -lgdbm" \
pyenv install 3.11.5
@startergo
startergo / PkgInstallerLog.md
Created September 23, 2023 20:38
Find the Package Installer Log details on macOS
  • Run the pkg. At the first install screen in the menu bar click File --> Show Files (Command + I).

Another useful thing to do is look at the install log.

Window --> Installer Log (Command + L)

  • To determine where it puts files after the fact (the pkg is still relevant, but you may not have it anymore) use the lsbomcommand. An example:
lsbom -f /var/db/receipts/com.growl.growl.pkg.bom
@startergo
startergo / python_uninstall.md
Last active September 23, 2023 15:31
Completely uninstall official 2.7 Python on macOS

Removing the app does not completely uninstall that version of Python. You will need to remove the framework directories and their symbolic links.

Deleting the frameworks

sudo rm -rf /Library/Frameworks/Python.framework/Versions/[version number] replacing [version number] with 3.10 in your case.

Removing symbolic links

To list the broken symbolic links.

@startergo
startergo / openssl.md
Created September 23, 2023 02:32
Openssl pyenv python install

Outdated SSL is a common issue on multiple platforms:

Here's the general approach...

0. Install OpenSSL

  • Option I: Install system packages of side-by-side OpenSSL 1.x libs (-dev or -devel) packages.

     # FreeBSD
    
@startergo
startergo / ezntfs.md
Last active September 19, 2023 01:44
ezntfs-app
ezntfs list
disk0s4: BOOTCAMP [350.2 GB] -- mounted: yes
sudo ezntfs disk0s4
Volume: BOOTCAMP [350.2 GB]
BOOTCAMP is already writable.