Skip to content

Instantly share code, notes, and snippets.

View jamesmyatt's full-sized avatar

James Myatt jamesmyatt

  • Capgemini Engineering
  • Stevenage, UK
  • X @nzbuu
View GitHub Profile
@jamesmyatt
jamesmyatt / flexispot-e7-esp8266.yaml
Created June 7, 2024 17:56
ESPHome Flexispot E7 ESP8266
# For pins, see: https://github.com/esp8266/Arduino/blob/master/variants/nodemcu/pins_arduino.h
substitutions:
devicename: flexispot-e7-esp8266
min_height: "58.1" # Min height + 0.1
max_height: "122.9" # Max height - 0.1
tx_pin: D5 # =GPIO14
rx_pin: D6 # =GPIO12
pin_20: D2 # =GPIO4
esphome:
@jamesmyatt
jamesmyatt / Update-AUPackages.md
Last active April 1, 2021 21:20
Update-AUPackages Report #powershell #chocolatey
@jamesmyatt
jamesmyatt / any_all_examples.ipynb
Last active December 9, 2018 17:09
Pandas docstring examples for Series.any/all
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jamesmyatt
jamesmyatt / homie_upload.py
Created June 1, 2017 07:52
OTA firmware upload for Homie ESP8266
from __future__ import (
division,
absolute_import,
print_function,
unicode_literals
)
import hashlib
import base64
import time
@jamesmyatt
jamesmyatt / matlab_env_list.m
Last active June 16, 2016 18:06
List of MATLAB environment variables
%% Create additional variables
setenv('ExampleVar1', 'on')
setenv('ExampleVar2', 'yes')
setenv('ExampleVar3', 'true')
%% List of Java environment variables
env_java = java.lang.System.getenv();
keys_java = cell(env_java.keySet.toArray());
%% List of system environment variables
@jamesmyatt
jamesmyatt / rm_obsolete_svn_branches.sh
Created July 3, 2014 12:56
Script to remove obsolete SVN branches from git-svn repository
svn_repos=`git config --get-all svn-remote.svn.url`
svn_prefix=svn/
git branch -r | sed 's|^[[:space:]]*||' | grep "^${svn_prefix}" | grep -v "^${svn_prefix}tags/" > git-branch-list
svn ls $svn_repos/branches | sed 's|^[[:space:]]*||' | sed 's|/$||' | sed "s|^|${svn_prefix}|" > svn-branch-list
echo "${svn_prefix}trunk" >> svn-branch-list
diff -u git-branch-list svn-branch-list | grep '^-' | grep -v '^--' | sed 's|^-||' > old-branch-list