Skip to content

Instantly share code, notes, and snippets.

@mickey-happygolucky
mickey-happygolucky / run_crops.sh
Last active January 20, 2022 15:24
The helper script to run the bitbake with using CROPS.
#!/bin/sh
BUILD_DIR=build
usage_exit() {
echo "run_crops.sh [-b build] [commands]"
echo " -b: a build directory of poky"
exit 0
}
;; ricty font
(set-default-font "Ricty Diminished-10.5")
(set-fontset-font nil 'japanese-jisx0208 (font-spec :family "Ricty Diminished" :size 10.5))
(add-to-list 'default-frame-alist '(font . "Ricty Diminished-10.5"))
;; the additional load paths
(add-to-list 'load-path "~/.emacs.d/site-lisp")
;; package
(require 'package)
diff --git a/include/netutils/mqtt.h b/include/netutils/mqtt.h
new file mode 100644
index 00000000..b2077e67
--- /dev/null
+++ b/include/netutils/mqtt.h
@@ -0,0 +1,1509 @@
+#ifndef __MQTT_H__
+#define __MQTT_H__
+
+#include "mqtt_pal.h"
@mickey-happygolucky
mickey-happygolucky / talk_temperature.py
Last active January 24, 2019 07:25
sample program for Open JTalk with DHT11
# coding=utf-8
import os
import subprocess
import RPi.GPIO as GPIO
import dht11
def talk(s):
model = '/usr/share/Voice/mei/mei_happy.htsvoice'
dic = '/usr/share/dic'
@mickey-happygolucky
mickey-happygolucky / talk.py
Created January 23, 2019 10:45
open_jtalk python sample with yocto
# coding=utf-8
import os
import subprocess
def talk(s):
model = '/usr/share/Voice/mei/mei_happy.htsvoice'
dic = '/usr/share/dic'
wav = '/tmp/talk.wav'
txt = '/tmp/talk.txt'
これはテストデータです。
@mickey-happygolucky
mickey-happygolucky / led.py
Created May 27, 2017 05:18
HTTP server with python
import RPi.GPIO as GPIO
class Led:
def __init__(self, pin):
self.pin = pin
self.s = 0
GPIO.setmode(GPIO.BOARD)
GPIO.setup(self.pin, GPIO.OUT)
@mickey-happygolucky
mickey-happygolucky / mksd_panda.sh
Created January 10, 2017 14:18
Make SD card script for meta-panda-es-rev-b3
#!/bin/bash
##
# make sdcard for meta-panda-es-rev-b3
# This script create partition for PandaBoard SD Card.
# SD Card device detect automatically.
#
MOUNT_POINT=/media/${USER}/*
DISK=/dev/`cd /sys/block && grep ^ */removable | grep :1 | cut -d'/' -f1 | grep sd`
@mickey-happygolucky
mickey-happygolucky / pandoc_slide.sh
Created October 24, 2016 17:03
A script that convert to reveal.js from pandoc markdown.
#!/bin/bash
filename=$1
theme=$2
transition=$3
exec_pandoc() {
pandoc ${filename} -s -t revealjs --slide-level=2 --self-contained -o ${filename%.*}.html
}
@mickey-happygolucky
mickey-happygolucky / CMakeLists.txt
Created September 17, 2016 02:29
Minimal example for OpenGLES on raspberrypi
cmake_minimum_required(VERSION 2.8)
set(PROJ_NAME first_window)
# find opengl via pkg-config
find_package(PkgConfig)
pkg_check_modules(EGL REQUIRED egl)
pkg_check_modules(GLES2 REQUIRED glesv2)
# Include directories for this project
set(INCLUDE_PATH