Skip to content

Instantly share code, notes, and snippets.

View hrysd's full-sized avatar
🤔
hoi

Hiroshi Yoshida hrysd

🤔
hoi
View GitHub Profile
@hrysd
hrysd / Dockerfile
Last active March 19, 2021 10:28
CPK を手元で動かす
FROM rubylang/ruby:2.7.2-bionic
RUN apt-get update
RUN apt-get install -y build-essential libpq-dev mysql-client libmysqlclient-dev sqlite3 libsqlite3-dev
WORKDIR /usr/src/app
@hrysd
hrysd / app.rb
Last active December 23, 2019 00:47
PHP 標準の cURL の挙動
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'sinatra'
end
require 'sinatra'
@hrysd
hrysd / Dockerfile
Created October 15, 2019 05:00
Gentoo の Docker イメージ
FROM gentoo/portage:latest as portage
FROM gentoo/stage3-amd64:latest
COPY --from=portage /var/db /var/db
RUN echo "GENTOO_MIRRORS=\"rsync://rsync.jp.gentoo.org/gentoo-portage/\"" >> /etc/portage/make.conf
@hrysd
hrysd / Rakefile
Created September 18, 2012 04:46
CC = "gcc"
task :default => "hello"
file "hello" => "hello.o" do
sh "#{CC} -o hello hello.o"
end
file "hello.o" => "hello.c" do
sh "#{CC} -c hello.c"
require 'jekyll'
site = Jekyll::Site.new(Jekyll.configuration)
array = Dir.glob('./_posts/*').map {|post|
document = Jekyll::Document.new(post, site: site, collection: Jekyll::Collection.new(site, 'post'))
document.read
{
title: document.data['title'],
@hrysd
hrysd / README.md
Last active September 7, 2017 10:23

環境

webpack: 3.5.6

実行方法

$ npx webpack
@hrysd
hrysd / Cargo.toml
Created October 15, 2016 08:24
cat
[package]
name = "cat"
version = "0.1.0"
authors = ["hrysd"]
[dependencies]
getopts = "0.2"
#include <Servo.h>
Servo hoge;
int val; // サーボモーターの角度
void setup() {
hoge.attach(9);
}
const int LED = 13;
const int BUTTON = 7;
int val = 0;
int old_val = 0;
int state = 0;
void setup() {
pinMode(LED, OUTPUT);
pinMode(BUTTON, INPUT);