Skip to content

Instantly share code, notes, and snippets.

View peterhinson's full-sized avatar
🌊

Peter Hinson peterhinson

🌊
View GitHub Profile
@aynka
aynka / gist:c512be08a3ca3613855f88cc985addc1
Created July 8, 2023 10:43
Decoding and making a Serial Number from STM32 96bit UID
uint16_t snprint_stm32_serialno(char* p, uint16_t maxlen)
{
uint32_t uid0 = *(uint32_t*) (UID_BASE);
uint32_t uid1 = *(uint32_t*) (UID_BASE + 0x4);
uint32_t uid2 = *(uint32_t*) (UID_BASE + 0x8);
uint16_t n = 0;
if (maxlen > 16)
{
@osy
osy / README.md
Last active August 9, 2023 12:58
UTM on Apple M1 Guides

Thanks to the work of @agraf, @KhaosT, @imbushuo, and others, we have Virtualization.framework working on M1 Macs. These [changes][1] have been merged with QEMU v5.2.0 RC3 (will rebase once the final release is out) and integrated with UTM, a brand new QEMU frontend designed in SwiftUI for iOS 14 and macOS 11.

Screenshot

Downloads

@mmillar-bolis
mmillar-bolis / Launchctl_Unload-10.14.sh
Created November 23, 2020 07:46
A Quick Little Script to Force Disable Certain LaunchDaemons in macOS
#!/bin/bash
# I have managed to map out some undesirable daemons and agents. Most of these
# can be disabled without too much consequence.
## Daemons
# com.apple.analyticsd - Anonymized application analytics daemon
# com.apple.appleseed.fbahelperd - Feedback Assistant Helper Daemon
# com.apple.awacsd - Apple Wide Area Connectivity Service Daemon
# com.apple.backupd - Apple TimeMachine service
@junkblocker
junkblocker / disable.sh
Last active April 17, 2024 21:33
Disable bunch of #$!@ in Catalina
#!/bin/bash
############################################################################################
# WARNING: THESE SCRIPTS AND CHANGES ARE NOT MEANT FOR ANYBODY BUT ME.
# RUNNING THESE WILL MESS UP YOUR COMPUTER IN MYSTERIOUS AND USUALLY UNRECOVERABLE WAYS.
############################################################################################
if [[ "$(sw_vers -productVersion)" != 10\.15* ]]; then
echo "This is only meant to run on macOS 10.15.* Catalina" >&2
exit 1
@alexellis
alexellis / README.md
Last active July 29, 2021 18:09
Provision a Raspberry Pi SD card

You'll need

  • Raspberry Pi 3, 3+ or 2 (only)
  • A Linux PC, laptop or Raspberry with SD card reader/slot
  • A number of Raspberry Pis configured with Ethernet

You must have an SSH key, if you don't know what this is then type in ssh-keygen and follow the instructions.

Prepare to provision RPis:

@endolith
endolith / DFT_ANN.py
Last active June 12, 2024 18:25
Training neural network to implement discrete Fourier transform (DFT/FFT)
"""
Train a neural network to implement the discrete Fourier transform
"""
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
import numpy as np
import matplotlib.pyplot as plt
N = 32
batch = 10000
@buptliuwei
buptliuwei / Kubernetes cluster setup based on amd64 && NVIDIA JETSON TX2.md
Last active August 31, 2020 21:54
Our project aims to build a Multi-platform kubernetes cluster, we use the VM on x86 as master node and two nvidia tx2 development kits as node. So we can schedule both CPU and GPU resources.

Kubernetes cluster setup based on amd64 && NVIDIA JETSON TX2

Thanks to @luxas create the Kubernetes on ARM project. But my project has some different, i have a VM on x86 as master node and two nvidia tx2 development kits as work node. So my kubernetes cluster are multi-platform. I use kubeadm as a deployment method.Some basic information of my platform is as follows.

Versions

kubeadm version (use kubeadm version):1.10.0

Environment:

  • Kubernetes version (use kubectl version):1.10.0
  • Cloud provider or hardware configuration:an amd64 master and 1 arm nodes (nvidia tagra TX2)
@AbsoluteDestiny
AbsoluteDestiny / 01. Download Locations for FFmpeg.md
Last active March 16, 2023 12:54
Some FFMpeg commands I need to remember for converting footage for video editing. http://bit.ly/vidsnippets
@boseji
boseji / Rpi-InfluxDB-Install.md
Last active February 5, 2022 17:34
Raspberry Pi InfluxDB installation

Raspberry Pi InfluxDB: The solution for IoT Data storage

Raspberry Pi is costeffect linux computer very commonly used for IoT home automation projects.

Here are the 3 problems with conventional databases for IoT data store applications:

  • Too much or complex configuration
  • Unable to expire data / set retentional policies
  • Not tailor made of Time Series Data
@FabianInostroza
FabianInostroza / socketcan-golang.go
Last active August 21, 2023 13:25
SocketCan in Golang
package main
import "fmt"
import "golang.org/x/sys/unix"
import "net"
import "log"
import "encoding/binary"
import "flag"
// CANMsg almacena un mensaje de la red CAN