Skip to content

Instantly share code, notes, and snippets.

View lukatavcer's full-sized avatar
🍋
When life gives you lemons...

Luka Tavčer lukatavcer

🍋
When life gives you lemons...
View GitHub Profile
@lukatavcer
lukatavcer / irconvert.js
Created February 28, 2023 10:39 — forked from XMB5/irconvert.js
Convert from infrared pronto codes to raw codes
//usage: node irconvert.js <pronto hex>
//steps from https://stackoverflow.com/a/27323452
numbers=process.argv[2].split(' ').map(x=>parseInt(x,16))
fullSequenceConverted=[]
carrierFrequency = 1000000/(numbers[1] * .241246)
codeLength = numbers[2]
repeatCodeLength = numbers[3]
for(i=4;i<numbers.length;i++) {
@lukatavcer
lukatavcer / contribute_github_without_write_access.md
Created November 5, 2022 10:27 — forked from dlaehnemann/contribute_github_without_write_access.md
contributing to github repo without write access: pull from origin repo, push to your own fork

Whenever I want to create pull requests to a repo that I don't have write access to, I:

  1. Fork the original repo to my account.
  2. Clone the original repo to my local machine.
  3. Add my fork as an additional remote and make it the push default.
  4. Make changes in a new branch locally.
  5. Push this branch to my fork.
  6. Create a pull request from there.
@lukatavcer
lukatavcer / hdmi_cec_flirc.md
Last active October 26, 2022 12:15
Sending/receiving HDMI CEC signals and sending IR signals (Flutter/dart) using Flirc (USB IR transciever)

Understanding HDMI CEC commands

We want to send the following HDMI CEC commands from the Android Box to the TV:

  • get TV status (is it turned ON or OFF?)
  • get TV's current active source (HDMI1/HDMI2/...)
  • turn ON TV
  • turn off TV (standby)
  • switch HDMI source from HDMI1 to HDMI2

You can read more about CEC frames here: Understanding HDMI CEC frame