Skip to content

Instantly share code, notes, and snippets.

@GitHeld
GitHeld / QEMU-Silicon-Mac-Virtualization.md
Created March 27, 2022 07:33 — forked from nrjdalal/QEMU-Silicon-Mac-Virtualization.md
Create Virtual Machines using QEMU on Silicon based Apple Macs

Install QEMU on Silicon based Apple Macs (June 2021)

Option 1 - Automatically

zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)"

Option 2 - Manually

  • Install Xcode command line tools

xcode-select --install
@GitHeld
GitHeld / autossh.service
Created March 26, 2022 20:37 — forked from thomasfr/autossh.service
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@GitHeld
GitHeld / auto-dash.md
Created March 26, 2022 17:06 — forked from Mathews2115/auto-dash.md
Automotive dashboard / Gauge cluster on a Raspberry Pi 3 using chomium and node.js

Quick How-To Raspberry Pi 3 Dashboard setup.

This is outdated - refer to this for more updated instructions

WHAT THIS DOESN'T HAVE

  • Code that listens and parses CAN messages. (Though I do use this and it is amazing)

Quick Hardware Review

  • Gauge Cluter/Dashboard
  • A raspberry pi will listen for CANBUS messages and whatever program you use (or make) will reactive to those messages.
@GitHeld
GitHeld / bootstrap.sh
Created March 26, 2022 17:05 — forked from abulte/bootstrap.sh
Build a custom RPI image
#!/bin/bash
# Based on work by Klaus M Pfeiffer at http://blog.kmp.or.at/2012/05/build-your-own-raspberry-pi-image/
# you need to do: "sudo apt-get install binfmt-support qemu qemu-user-static debootstrap kpartx lvm2 dosfstools"
# run with "sudo bootstrap.sh /dev/sd[x]"
echo "Use like: sudo bootstrap.sh /dev/sd[x]"
#deb_mirror="http://ftp.debian.org/debian"
#deb_local_mirror="http://ftp.debian.org/debian"
@GitHeld
GitHeld / gist:7e9c67416c7014d79920710bf758cd94
Created March 14, 2022 23:40 — forked from andphe/gist:3232343
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@GitHeld
GitHeld / extroot.sh
Created March 2, 2022 11:08 — forked from nikescar/extroot.sh
openwrt extroot
#!/bin/sh
# openwrt extroot /dev/sda1 ext4 /dev/sda2 swap
# latest version https://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ar71xx/generic/
opkg update
opkg install kmod-usb-storage kmod-scsi-core block-mount kmod-fs-ext4 kmod-usb-uhci e2fsprogs fdisk
echo "
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

GL-iNet pocket router

The following steps will help you configure a GL-iNet router running a version of linux called OpenWRT so that you can do real-time WiFi Probe Request capture. By using multiple of these GL-iNet devices you can easily create a perimeter for WiFi tracking.

create destination on the usb drive

mkdir /mnt/sda1/packages
echo dest usb /mnt/sda1/packages/ >> /etc/opkg.conf

Filesystem

@GitHeld
GitHeld / replace_synology_ssl_certs.sh
Created February 13, 2022 20:55 — forked from catchdave/replace_synology_ssl_certs.sh
CLI script to programmatically replace SSL certs on Synology NAS
#!/bin/sh
# How to use this script:
# 1. Get your 3 PEM files ready to copy over from your local machine/update server (privkey.pem, fullchain.pem, cert.pem)
# and put into a directory (this will be $CERT_DIRECTORY).
# 2. Ensure you have a user setup on synology that has ssh access (and ssh access is setup).
# This user will need to be able to sudo as root (i.e. add this line to sudoers, <USER> is the user you create):
# <USER> ALL=(ALL) NOPASSWD: /var/services/homes/<USER>/replace_certs.sh
# 3. Call this script as follows:
# sudo scp ${CERT_DIRECTORY}/{privkey,fullchain,cert}.pem $USER@$SYNOLOGY_SERVER:/tmp/ \
# && sudo scp replace_synology_ssl_certs.sh $USER@$SYNOLOGY_SERVER:~/ \
@GitHeld
GitHeld / README.md
Created February 13, 2022 19:08 — forked from akihikodaki/README.en.md
Linux Desktop on Apple Silicon/M1 in Practice

Linux Desktop on Apple Silicon/M1 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/M1.

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

@GitHeld
GitHeld / about:config.txt
Created January 27, 2022 05:35 — forked from jornane/about:config.txt
Recommended Firefox about:config settings
# Recommended Firefox about:config settings
# Privacy
# https://support.mozilla.org/en-US/kb/how-stop-firefox-making-automatic-connections
extensions.blocklist.enabled;false
browser.safebrowsing.downloads.remote.enabled;false
browser.safebrowsing.malware.enabled;false
browser.safebrowsing.passwords.enabled;false
browser.safebrowsing.phishing.enabled;false
network.prefetch-next;false