Skip to content

Instantly share code, notes, and snippets.

@patrickdk77
patrickdk77 / a25-tx028.txt
Last active October 12, 2022 01:02
A25-TX028 Remote (hampton bay/dawnsun)
Hampton Bay mara fan (dawnsun remote)
Uses unmarked chip
{ 400, { 34, 1 }, { 1, 2 }, { 2, 1 }, true } (rc-switch)
aaaa is address dips, 0=on 1=off
111111000110aaaa01111110 Power On (actually just toggles)
111111000110aaaa01111101 Power Off (actually just toggles)
111111000110aaaa01110100 Fan High
#!/bin/bash
dl_and_install_build_prereq() {
# Prerequisites: https://openwrt.org/docs/guide-developer/quickstart-build-images
# Download and install prerequisites for compiling firmware
sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt -y install subversion g++ zlib1g-dev build-essential git python time
sudo apt -y install libncurses5-dev gawk gettext unzip file libssl-dev wget
sudo apt -y install libelf-dev ecj fastjar java-propose-classpath
@decatur
decatur / ipc.py
Last active June 18, 2023 16:55
Fast inter-process communication (ipc) for python on MS-Windows using shared memory and eventing.
# -*- coding: utf-8 -*-
"""
Copyright 2018-09-09, Wolfgang Kühn
Fast inter-process communication (ipc) for Python (CPython, PyPy, 2.7, 3.6+) on MS-Windows.
It uses shared memory and eventing.
Example rpc style synchronization:
Server (rpc provider):
import numpy as np
import scipy.linalg
# see http://eprints.maths.ox.ac.uk/926/1/NA-10-03.pdf
# and http://www.chebfun.org/examples/approx/CF30.html
def rcf(Fx,m,n,nfft,K,domain=(-1,1)):
# CONTROL PARAMETERS
dim = K+n-m
nfft2 = nfft//2
@jsbain
jsbain / Audio.py
Created June 24, 2016 17:03
Audio.py
from objc_util import *
import ctypes
import numpy as np
import matplotlib.image
import io,ui
AVAudioEngine=ObjCClass('AVAudioEngine')
AVAudioSession=ObjCClass('AVAudioSession')
def setup():
error=ctypes.c_void_p(0)
session=AVAudioSession.sharedInstance()
@Dutcho
Dutcho / Audio Recorder.py
Created December 26, 2015 14:30 — forked from omz/Audio Recorder.py
Audio Recorder.py
# Retrieved from https://gist.githubusercontent.com/omz/9882a00abf59c6009fa4/raw/139afad596c6d46f2f104b16120eefbb36e9960c/Audio%2520Recorder.py on Sat 26-Dec-2015 07:22:53
# Olaf, 26 Dec 2015, updated to use objc_util instead of ctypes; also removed seemingly superfluous AVAudioSession
import objc_util, os
def main():
NSMutableDictionary = objc_util.ObjCClass('NSMutableDictionary')
settings = NSMutableDictionary.dictionary()
kAudioFormatMPEG4AAC = 1633772320
settings.setObject_forKey_(kAudioFormatMPEG4AAC, 'AVFormatIDKey')
@goebish
goebish / Makefile
Last active August 29, 2015 14:26
M63 RC transmitter for RPi, uses XN297 transceiver on SPI port
DEBUG = -O3
CC = g++ -std=c++
INCLUDE = -I/usr/local/include
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
LDFLAGS = -L/usr/local/lib
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
SRC = m63.cpp
OBJ = $(SRC:.cpp=.o)
BINS = $(SRC:.cpp=)
@goebish
goebish / CX10_nRF24.ino
Last active January 20, 2019 20:20
nRF24 CX-10 Tx Code (green & blue boards)
/*************************************************************
************* nRF24 Cheerson CX-10 Tx Code ******************
************* (Green & Blue boards) ******************
**************************************************************
by goebish on RCgroups.com
Thanks to:
PhracturedBlue, victzh, hexfet, closedsink, midelic, Hasi ...
@ruzickap
ruzickap / openwrt_wireless.sh
Created April 6, 2014 16:55
OpenWrt WiFi configuration tweaks
uci set wireless.radio0.channel=8
uci set wireless.radio0.htmode=HT40-
uci set wireless.radio0.noscan=1
uci set wireless.radio0.bursting=1
uci set wireless.radio0.ff=1
uci set wireless.radio0.compression=1
uci set wireless.radio0.xr=1
uci set wireless.radio0.ar=1
uci set wireless.radio0.txpower=20
@dankrause
dankrause / ssdp.py
Last active February 16, 2024 16:23
Tiny python SSDP discovery library with no external dependencies
# Copyright 2014 Dan Krause
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,