Skip to content

Instantly share code, notes, and snippets.

View flaviotoribio's full-sized avatar

Flavio Toribio flaviotoribio

View GitHub Profile
@flaviotoribio
flaviotoribio / racecapture3.lua
Created June 1, 2024 00:46 — forked from kosenko-max/racecapture3.lua
Improved version with CAN mapping in the config string
-- Copyright 2016 Mash at boostedforums.net
-- Minify before use by https://mothereff.in/lua-minifier
-- Editor https://ace.c9.io/build/kitchen-sink.html
-- don't remove excessive commas or comments - minify will deal with it
-- ========================= CAN CONFIG =======================================
local canCon ="0x7E1,0x33,10;8,SstTemp,-50,205,C@0x7E1,0x34,10;8,SstMode,1,3@0x7E1,0x36,3;8,Gear,0,11@0x7E1,0xA6;16,SstSlip1,-8500,8500,RPM,1/2,0,1;16,SstSlip2,-8500,8500,RPM,1/2,0,1@0x7E1,0xAA;16,SstPress1,0,30,Bar,1/500,0,1;16,SstPress2,0,30,Bar,1/500,0,1@0x7E1,0xA5;16,SstTemp1,-40,215,C,1/4,0,1;16,SstTemp2,-40,215,C,1/4,0,1@0x7E1,0x38;8,GearTarget,0,11@0x7E1,0xAB;16,SstPosF1,-128,128,mm,1/256,0,1;16,SstPosF2,-128,128,mm,1/256,0,1@0x7E1,0xAC;16,SstPosF3,-128,128,mm,1/256,0,1;16,SstPosF4,-128,128,mm,1/256,0,1@0x7E1,0xAD;16,SstCurF1,0,2048,mA,1/16,0,1;16,SstCurF2,0,2048,mA,1/16,0,1@0x7E1,0xAE;16,SstCurCool,0,2048,mA,1/16,0,1@0x7E1,0xAF;16,SstCurLPS,0,2048,mA,1/16,0,1@0x7E1,0xB0;16,SstShaft1,0,8500,RPM,1/2,0,
@flaviotoribio
flaviotoribio / racecapture2.lua
Created June 1, 2024 00:44 — forked from kosenko-max/racecapture2.lua
Improved version of Evo X RaceCapture Pro script (WORKING)
-- Copyright 2016 Mash at boostedforums.net
-- Minify before use by https://mothereff.in/lua-minifier
-- Editor https://ace.c9.io/build/kitchen-sink.html
-- don't remove excessive commas or comments - minify will deal with it
local afrM = 0.046872 -- AFR Multiplicator - Set own calibration
local afrA = 7.3125 -- AFR Additive - Set own calibration
local mapM = 4/3 -- Set it to 1.0 if stock MAP
local frontO2PID = 0x808661 -- Specific by ROM (this one 5305012
local bToPsi = 14.5037738 -- Set to 1 to get pressures in Bar
@flaviotoribio
flaviotoribio / asdf.zsh
Created February 27, 2023 17:57
ohmyzsh asdf nodejs version macovsky theme
# ~/.ohmyzsh/custom/asdf.zsh
# get the asdf tool version
# example: asdf_prompt_info nodejs
function asdf_prompt_info() {
if [[ -n $1 ]]; then
which asdf &>/dev/null || return
local asdf_prompt
if asdf_prompt=$(asdf current "$1" 2>/dev/null); then
local asdf_tool_version=$(echo "$asdf_prompt" | awk '{print $2}')
@flaviotoribio
flaviotoribio / vimeo.sh
Created June 21, 2017 08:24
Vimeo.com 4K DASH downloader and merger shell script
#!/bin/bash
# Vimeo.com 4K DASH downloader and merger shell script
# by Flavio Toribio (github.com/flaviotoribio)
# Tested on Ubuntu/Debian and Windows (Cygwin)
# Needs Python 2.7, wget and ffmpeg
# Usage:
# ./vimeo.sh <url to the master.json file of the vimeo video>
@flaviotoribio
flaviotoribio / materializecss_datepicker_pt-br.js
Created August 19, 2016 20:43
MaterializeCSS 0.97.7 Datepicker Portuguese Brazil (PT-BR) Language I18N Calendário
var datePickerPtBr = {
selectMonths: true,
selectYears: 15,
labelMonthNext: 'Próximo mês',
labelMonthPrev: 'Último mês',
labelMonthSelect: 'Selecione o mês',
labelYearSelect: 'Selecione o ano',
monthsFull: [ 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' ],
monthsShort: [ 'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez' ],
weekdaysFull: [ 'Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sábado' ],
@flaviotoribio
flaviotoribio / durtree.sty
Created April 12, 2016 00:19
(LaTeX only) dirtree/durtree with sane pagebreaks v0.32
% This file was durtree.sty from this link:
% http://tex.stackexchange.com/a/6514/102958
% It was modified by TH from that link to support pagebreaks nicely,
% but it was for an older version (0.1) of the package.
% It is now updated to version 0.32 by Flavio Toribio.
%
% This file was dirtree.tex. It was modified by TH. to support
% splitting the tree at pagebreaks sanely. It has been renamed to
% durtree.sty. It will now only work with LaTeX. It is meant as a
% quick hack to solve the problem at hand. Any bugs in it are my own,