Skip to content

Instantly share code, notes, and snippets.

View algas's full-sized avatar

Masahiro Yamauchi algas

View GitHub Profile
@algas
algas / m5stack_icm20948.py
Last active September 2, 2023 02:11
M5Stack Fire 9DoF IMU (ICM-20948)
'''
Copyright 2020 SparkFun Electronics
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE US
@algas
algas / m5stack_fire_6dof.py
Created August 28, 2023 02:38
M5Stack Fire 6DoF IMU
from m5stack import *
from m5ui import *
from uiflow import *
import i2c_bus
setScreenColor(0x222222)
PWR_MGMT_1 = None
PWR_MGMT_2 = None
i = None
@algas
algas / Dockerfile
Created September 4, 2022 12:26
GitHub Codespeces for Haskell
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
ARG VARIANT="jammy"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1
ENV BOOTSTRAP_HASKELL_GHC_VERSION=9.0.2
ENV BOOTSTRAP_HASKELL_CABAL_VERSION=3.4.1.0
@algas
algas / README.md
Created April 13, 2021 08:25
github organization search query
@algas
algas / Makefile
Last active August 13, 2023 08:13
makefile subcommand example
NAMES = foo bar baz
hello: $(addprefix hello-, $(NAMES))
hello-%:
@echo "hello ${@:hello-%=%}"
world: $(addprefix world-, $(NAMES))
world-%:
@algas
algas / README.md
Last active February 21, 2020 04:54
花粉症から国民を守る会

スギ花粉症対策

スギ花粉症への半恒久的な対策として舌下減感作療法をオススメします。 自宅で毎日服薬するだけで花粉症の症状を数年間抑えることが期待できます。 以下に書いてあることは個人的な症状の改善例であり、すべての人に当てはまるわけではありません。

舌下減感作療法

シダキュアによる舌下減感作療法

  • 基本的には毎日続けてください。
@algas
algas / github_title_url.js
Created June 21, 2019 04:24
Bookmarklet to get the title of github issue or pull request
javascript:(function(){window.prompt('Github Title and Link',document.querySelector('.gh-header-title').innerText+' '+location.href)})();
@algas
algas / hspec-hpack.hsfiles
Last active December 11, 2017 02:03
Haskell stack template with hpack
{-# START_FILE package.yaml #-}
name: {{name}}
version: 0.1.0.0
#synopsis:
#description:
homepage: https://github.com/{{github-username}}{{^github-username}}githubuser{{/github-username}}/{{name}}#readme
license: BSD3
author: {{author-name}}{{^author-name}}Author name here{{/author-name}}
maintainer: {{author-email}}{{^author-email}}example@example.com{{/author-email}}
copyright: {{year}}{{^year}}2017{{/year}} {{author-name}}{{^author-name}}Author name here{{/author-name}}{{/copyright}}
@algas
algas / linuxkit.yml
Created July 21, 2017 06:02
Linukkit example: node web app with nginx reverse proxy
kernel:
image: linuxkit/kernel:4.9.38
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:d049e7b2074da5cd699a27defb47eb101142455d
- linuxkit/runc:d5cbeb95bdafedb82ad2cf11cff1a5da7fcae630
- linuxkit/containerd:e33e0534d6fca88e1eb86897a1ea410b4a5d722e
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41
@algas
algas / Dockerfile
Created April 18, 2017 05:40
Dockerfile for embulk
FROM java:8
ARG EMBULK_VERSION=0.8.18
RUN curl -L https://bintray.com/artifact/download/embulk/maven/embulk-${EMBULK_VERSION}.jar -o /opt/embulk.jar
WORKDIR /work
ENTRYPOINT ["java", "-jar", "/opt/embulk.jar"]
CMD ["--help"]