Skip to content

Instantly share code, notes, and snippets.

@zuku
zuku / m5stickc_broadcast.py
Created April 1, 2023 08:15
M5StickCのMicroPythonでUDPブロードキャストの送受信を行うサンプル
import wifiCfg, _thread, socket
wifiCfg.autoConnect()
class Broadcast:
"""
M5StickC PlusのMicroPython環境でブロードキャストの送信と受信を行うクラス
動作環境
* M5StickC Plus 1.1
@zuku
zuku / m5stickc_anti_flicker_clock.py
Last active February 23, 2023 02:11
M5StickC Plusで画面のちらつきを抑止する方法のMicroPython版サンプルコード
from m5stack import lcd
import utime
import wifiCfg
import ntptime
'''
M5StickC Plusで画面のちらつき(フリッカー)を抑止する方法のサンプルコード
MicroPython版
(Arduinoの場合はTFT_eSpriteを使うと良いらしい)
@zuku
zuku / cloud-watch-logs-to-sns-lambda.js
Created September 9, 2022 12:53
CloudWatch Logs to SNS Lambda function
'use strict';
const { unzip } = require('node:zlib');
const { promisify } = require('node:util');
const { SNS } = require('aws-sdk');
exports.handler = async (event, context) => {
const unzipPromise = promisify(unzip);
const logData = event['awslogs']['data'];
const buffer = Buffer.from(logData, 'base64');
@zuku
zuku / build.log
Last active August 29, 2015 14:05
fdkaac-0.6.0 build failure on OS X 10.8 with MacPorts
$ cd fdkaac-0.6.0
$ export LDFLAGS='-L/opt/local/lib'
$ export CPPFLAGS='-I/opt/local/include'
$ export LD_LIBRARY_PATH=/opt/local/lib
$ export LD_INCLUDE_PATH=/opt/local/include
$ autoreconf -i
configure.ac:12: installing './compile'
configure.ac:41: installing './config.guess'
configure.ac:41: installing './config.sub'
configure.ac:10: installing './install-sh'
@zuku
zuku / build.log
Created August 15, 2014 10:58
fdkaac-0.6.0 build failure on OS X 10.9 with Homebrew
$ cd fdkaac-0.6.0/
$ autoreconf -i
configure.ac:49: warning: macro 'AM_ICONV' not found in library
configure.ac:49: error: possibly undefined macro: AM_ICONV
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
$ autoreconf -i
configure.ac:49: warning: macro 'AM_ICONV' not found in library
configure.ac:12: installing './compile'