Skip to content

Instantly share code, notes, and snippets.

View arfoll's full-sized avatar

Brendan Le Foll arfoll

  • Deutschland
View GitHub Profile
@arfoll
arfoll / flirc_util_lgtv_onoff
Created June 25, 2022 16:32
flirc_util LG tv on/off
For some reason you need to add a leading 0 to the pattern
$ flirc_util sendir --pattern=0,8950,4400,550,550,600,500,600,1650,550,550,600,500,600,550,600,500,600,550,550,1650,600,1600,600,550,550,1650,600,1600,600,1600,600,1650,600,1600,600,500,600,550,600,500,600,1600,600,550,600,500,600,550,600,500,600,1600,600,1650,600,1600,600,500,600,1650,550,1650,600,1600,600,1600,600
Tested on latest firmware at the time. Range is terrible as advertised, but it does work.
$ flirc_util version
3.25.3
FW Version: v4.9.3
SKU: Flirc 2.0 [dori]
Branch: master
@arfoll
arfoll / shelly_gen2_mqtt.yaml
Created December 5, 2021 14:13
shelly gen 2 mqtt
## configuration.yaml
automation: !include automation.yaml
switch: !include switches.yaml
binary_sensor: !include binary_sensors.yaml
sensor: !include sensors.yaml
## automation.yaml
- id: shellies_get_status
alias: Shellies Get Status
description: ''
# Gen1 FireTV
Bugs:
BUG_1 - Location failed to grab
BUG_2 - WPS not working (or maybe my router)
BUG_3 - Can't switch to metric units
BUG_4 - switching to UK lang keeps frontpage in german until a reboot
BUG_5 - it's hilariously slow to boot
ADB activation:
@arfoll
arfoll / parse-ext-csd.py
Created September 27, 2019 14:18 — forked from kylemanna/parse-ext-csd.py
Parse eMMC Extended CSD and print useful things.
#!/usr/bin/env python
"""
Author: Kyle Manna <kyle@kylemanna.com>
Blog: https://blog.kylemanna.com
cat /d/mmc0/mmc0:0001/ext_csd
0000000000000001030100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000087a0000000000000000061502030700100608010101080800100000728000000808080808080000000000010200070002000500000000000001000200000000000000000000000000000100050000000000030001ca00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
#!/usr/bin/env bash
# Author: Stefan Andritoiu <stefan.andritoiu@intel.com>
# Copyright (c) 2016 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
@arfoll
arfoll / gist:8eabe0fd1e04fc865bec
Last active February 23, 2016 19:02
imraa_concept
/etc/imraa.conf
Defines how pins will be used:
{
"lockfile-location": "xxx",
"Platform" :[
{"id":"512", "type":"GENERIC_FIRMATA", "flash":"/var/cache/101/firmata.img", "usbserial": "auto"}
],
"IO" :[
@arfoll
arfoll / gist:f450a0630c8b120a1f94
Created March 1, 2015 10:34
mraa buld error issue #144 (nodejs 0.12.0 + swig 3.0.5)
This file has been truncated, but you can view the full file.
INFO - libmraa Version v0.6.1-8-g2c74ba7
INFO - Target arch is x86_64
INFO - Adding x86 platforms
-- Configuring done
-- Generating done
-- Build files have been written to: /home/brendan/git/mraa/build
[ 6%] Swig source
Scanning dependencies of target mraajs
[ 12%] Building CXX object src/javascript/CMakeFiles/mraajs.dir/mraajsJAVASCRIPT_wrap.cxx.o
/home/brendan/git/mraa/build/src/javascript/mraajsJAVASCRIPT_wrap.cxx:772:13: error: ‘Arguments’ in namespace ‘v8’ does not name a type
@arfoll
arfoll / gist:65621988a6064e8cd47c
Created December 6, 2014 23:24
edison_boarddef_cleanup
diff --git a/src/intel_edison_fab_c.c b/src/intel_edison_fab_c.c
index 9a3a1db..4ac0009 100644
--- a/src/intel_edison_fab_c.c
+++ b/src/intel_edison_fab_c.c
@@ -101,13 +101,21 @@ mraa_intel_edison_gpio_dir_pre(mraa_gpio_context dev, gpio_dir_t dir)
mraa_gpio_context output_e;
output_e = mraa_gpio_init_raw(outputen[pin]);
- if (mraa_gpio_dir(output_e, MRAA_GPIO_OUT) != MRAA_SUCCESS)
+ if (output_e == NULL) {
@arfoll
arfoll / binding.gyp
Created November 23, 2014 18:03
mraa binding.gyp
{
'targets': [
{
'target_name': 'mraa',
'sources': [ '../src/mraa.c',
'../src/gpio/gpio.c',
'../src/aio/aio.c',
'../src/i2c/i2c.c',
'../src/pwm/pwm.c',
'../src/spi/spi.c',
@arfoll
arfoll / blink-io.cpp
Created October 18, 2014 14:56
mraablinksplit