This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
MAINTAINER honeniq <honeniq@gmail.com> | |
RUN apt update && apt install gcc make ruby ruby-dev default-jdk git fonts-vlgothic -y | |
RUN gem install bundler | |
RUN git clone https://github.com/yasuhito/trema-book.git | |
RUN rm -rf trema-book/vendor/asciidoctor-fopub | |
RUN git clone https://github.com/asciidoctor/asciidoctor-fopub trema-book/vendor/asciidoctor-fopub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
latesturl=https://api.github.com/repos/peco/peco/releases/latest | |
binpath=~/.local/bin/ | |
zipurl=`curl -s ${latesturl} | grep -o 'https://.*peco_linux_amd64.tar.gz'` | |
echo ${zipurl} | |
curl -sL ${zipurl} | tar xz -C ${binpath} --strip=1 peco_linux_amd64/peco |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!mruby | |
@Usb = Serial.new(0, 115200) | |
@Dev = I2c.new(1) # SDA=>pin0, SCL=>pin1 | |
@Address = 0x00 # Register address to read. | |
@Usb.println("I2C Scanner") | |
(1..127).each do |i| | |
r = @Dev.read(i, @Address) | |
@Usb.println(i.to_s(16) + ' ' + r.to_s(16)) if r != 255 |