Skip to content

Instantly share code, notes, and snippets.

View macdet's full-sized avatar
🏠
Working from home

Detlev Lengsfeld macdet

🏠
Working from home
View GitHub Profile
#!/bin/bash
#About the SMC Firmware Updates (outdated), https://support.apple.com/en-au/HT202040
sysctl hw.model
system_profiler SPHardwareDataType | grep -i "Version" | awk -F ':' '{print $1 $2}'
/usr/libexec/firmwarecheckers/eficheck/eficheck --integrity-check
#!/bin/bash
#About the SMC Firmware Updates (outdated), https://support.apple.com/en-au/HT202040
sysctl hw.model
system_profiler SPHardwareDataType | grep -i "Version" | awk -F ':' '{print $1 $2}'
/usr/libexec/firmwarecheckers/eficheck/eficheck --integrity-check
@macdet
macdet / mac_boot_options.txt
Created January 6, 2020 05:20 — forked from patrickgill/mac_boot_options.txt
Apple Mac boot options
Mac boot options
Hold keys at startup.
Startup Manager: Option (⌥)
Set boot source as default: Get to Startup manager then hold Control while selecting the disk
Boot from CD/DVD/USB: C
Target Disk Mode: T
Check for Option ROM firmware: Option-Shift-Command-Period
Safe Mode: Shift (⇧)
@macdet
macdet / gpu.sh
Created January 6, 2020 15:33 — forked from patrickgill/gpu.sh
#!/bin/bash
# Disable failed GPU on Macbook Pro (2011)
sudo nvram boot-args="-v"
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
exit 0

Fix sudoers Issue on macOS Catalina

If you messed up with editing sudoers, this solution is for you. The solution is limited to restoring /etc/sudoers file to the original state. It is easier to mess up your config such as saving wrong format, etc.

How to Fix

  • Please reboot your macOS into recovery mode. While rebooting press and hold Cmd+R key.
  • After you completely reboot, you will see a dialog. You need to open Terminal by clicking Utilities > Terminal on menu.
  • In order to mount /etc as writable state, you need to disable SIP first by executing csrutil disable.
  • Reboot into single user mode. While rebooting press and hold Cmd+S key.
@macdet
macdet / README.md
Created January 17, 2021 08:28 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@macdet
macdet / README.md
Created March 15, 2022 07:04 — forked from BadmanBarista/README.md
Theme to hide the blue paved cycleways or make them thinner on Wahoo Bolt v2

NOTE: I've found that outside my city, there are some actual important paths that this hack will hide. So I've provided an alternative file vtm-elemnt-THIN.xml. This makes the blue cyclepaths really thin rather than removing them entirely, just use it instead and remove the -THIN from the name.

There are three versions of the vtm-elemnt.xml file:

  • vtml-elemnt-DEFAULT.xml is the default from the BoltApp.apk (version 12513)
  • vtml-elemnt-HIDDEN.xml has the paved cycle paths commented out for the bolt v2.
  • vtml-elment-THIN.xml makes the paved cycle paths thinner.
  1. Turn on your Bolt v2.
  2. Plug it into a PC that supports MTP (Windows does out the box, More info can be found here).
@macdet
macdet / tag-wahoo.xml
Created March 15, 2022 07:52 — forked from Intyre/1 - wahoo-create-maps.md
Wahoo create maps
<?xml version="1.0" encoding="UTF-8"?>
<tag-mapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-zoom-appear="16"
profile-name="default-profile" xmlns="http://mapsforge.org/tag-mapping"
xsi:schemaLocation="http://mapsforge.org/tag-mapping https://raw.githubusercontent.com/mapsforge/mapsforge/master/resources/tag-mapping.xsd">
<!-- ************* POIS *************** -->
<!-- HIGHWAY TAGS -->
<pois>
<osm-tag key="highway" value="mini_roundabout" zoom-appear="17" />