Skip to content

Instantly share code, notes, and snippets.

View mamemomonga's full-sized avatar
🏠
Working from home

Shotaro Takahashi mamemomonga

🏠
Working from home
View GitHub Profile
@mamemomonga
mamemomonga / ssd1306_japanese_font.py
Created March 8, 2019 17:03 — forked from yuasatakayuki/ssd1306_japanese_font.py
Raspberry Pi 3で128×64ピクセルのOLEDに日本語を表示するサンプル
# -*- coding: utf-8 -*-
import Adafruit_GPIO.SPI as SPI
import Adafruit_SSD1306
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
# Raspberry Pi pin configuration
#!/bin/bash
REV=`zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep '* firmware as of' | head -n 1 | sed -e 's/\ \*\ firmware as of \(.*\)$/\1/'`
rm -rf rasp-tmp
mkdir -p rasp-tmp
mkdir -p rasp-tmp/linux
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/git_hash -O rasp-tmp/git_hash
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/Module.symvers -O rasp-tmp/Module.symvers
@mamemomonga
mamemomonga / supervisord
Last active July 9, 2021 18:02 — forked from keimlink/gist:831633
/etc/rc.d/init.d/supervisord for CentOS 6
#!/bin/bash
#
# Startup script for the Supervisor server
#
# Tested with CentOS release 6.6
#
# chkconfig: 2345 85 15
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.