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
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);
@hrysd
hrysd / stdout.md
Created December 19, 2015 08:40
`rails new -h`
> be rails new -h
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /Users/hrysd/.rbenv/versions/2.2.3/bin/ruby
  -m, [--template=TEMPLATE]                              # Path to some application template (can be a filesystem path or URL)
  -d, [--database=DATABASE]                              # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)