Skip to content

Instantly share code, notes, and snippets.

View agronick's full-sized avatar

Kyle Agronick agronick

View GitHub Profile
@agronick
agronick / pids.csv
Created September 9, 2023 23:37
Mazda 3 PIDs (Rough List)
Name ShortName ModeAndPID Equation Min Value Max Value Units Header startDiagnostic stopDiagnostic scale minimumRefreshDelayMillis
[FORD]Coolant temperature(From TCM) Coolant 0x0105 A-40 0 120 °C TCM 1 0
[FORD]Engine Oil Temp EOT 0x221310 (((A*256)+B)/100)-40 0 300 °C Auto 1 0
Boost Pressure BOOST 0x22f470 ((D*256+E)/32-[33])/100 -0.5 1.8 bar 7E0 1 0
Boost Pressure Desired BOOST DSD 0x22f470 ((B*256+C)/32-[33])/100 -0.5 1.8 bar 7E0 1 0
Brake Fluid Pressure BFP 0x22280a (A*256+B)*100/128 0 65535 kPa 7E0 1 0
Brake Switch BRAKE SW 0x22da05 {A:7} 0 1 ON/OFF 726 1 0
Charge Air Cooler Temperature CACT 0x22f477 C-40 -40 100 °C 7E0 1 0
Coupling Solenoid Duty Cycle CUP SOL 0x221e7a A*100/255 0 100 % 761 1 0
Distance from Bumper to Target DIST BMP TGT 0x22d901 B/4 0 16 m 793 1 0
@agronick
agronick / vlctv.sh
Created December 3, 2018 23:49
VLC Linux with Chromecast: Solution to error "gnutls tls client error: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown. The name in the certificate does not match the expected. "
#!/bin/bash
# On my machine VLC fails to connect to chromecast. If I specify the IP it fails to connect because of certificate errors. I can
# manually download the certificate but it is only valid for 2 days. This little script gets it all working.
# Set your ip address below and call this script with the filename.
CHROMECAST_IP=192.168.1.153
gnutls-cli --save-cert=chromecast.pem --insecure $CHROMECAST_IP:8009
mkdir -p ~/.local/share/vlc/certs
mv chromecast.pem ~/.local/share/vlc/certs
@agronick
agronick / sample.py
Created April 1, 2018 03:55
Still in 2018 threads in Python do not make CPU bound tasks faster
import time
from concurrent.futures import ThreadPoolExecutor
import random
start = 0
def print_time():
global start
end = time.time()
print(end - start)
import React from 'react';
import './App.css';
import { useState } from 'react';
import cloneDeep from "lodash-es/cloneDeep";
import shuffle from "lodash-es/shuffle";
class WinLocation {
constructor() {
this.posArray = [];
@agronick
agronick / async.py
Created April 1, 2018 04:14
CPU Bound code runs 3x-5x slower with asyncio
import asyncio
import time
loop = asyncio.new_event_loop()
def print_time():
global start
end = time.time()
print(end - start)