Skip to content

Instantly share code, notes, and snippets.

サワードウ・スターター(天然酵母)づくり編

用意するもの

  • ライ麦全粒粉もしくは小麦粉全粒粉
    • ライ麦なら酸味が強め、小麦粉なら弱めになる
  • 口の広いガラス瓶

つくりかた

FROM node:10-slim
WORKDIR /usr/src/app
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
@mirakui
mirakui / # node - 2015-12-15_10-15-41.txt
Created December 15, 2015 01:24
node on OS X 10.10.5 - Homebrew build logs
Homebrew build logs for node on OS X 10.10.5
Build date: 2015-12-15 10:15:41
@mirakui
mirakui / csv_counter.md
Last active August 29, 2015 14:04
Comparing standard CSV library in go and ruby

入出力

標準入力を隠す

require 'io/console'
password = STDIN.noecho(&:gets).chomp

日付・時刻

Time.now.strftime("%Y/%m/%d %H:%M:%S")
@mirakui
mirakui / README.md
Last active December 20, 2015 11:08
fake-s3 + aws-sdk
$ gem install aws-sdk fake-s3
$ fakes3 -r /tmp/fakes3 -p 4567
Loading FakeS3 with /tmp/fakes3 on port 4567 with hostname s3.amazonaws.com
[2013-07-31 17:52:34] INFO  WEBrick 1.3.1
[2013-07-31 17:52:34] INFO  ruby 2.0.0 (2013-06-27) [x86_64-darwin12.4.0]
[2013-07-31 17:52:34] INFO  WEBrick::HTTPServer#start: pid=34539 port=4567

Using rails_admin without devise

Having a buckload of code to authorize users on your application is something you may like or not. Speaking for myself I hate it. But I still love rails_admin, here's how you install it without devise. Thanks to phoet for providing the hints in the gist I have forked from.

Add RailsAdmin to your Gemfile

do NOT add devise

gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"

@mirakui
mirakui / social_game_ids.md
Last active December 16, 2015 04:19
social game ids
  • パズドラ
    • 127,841,241
  • ぷよクエ
  • 59595321
@mirakui
mirakui / compile_assets_and_rsync_with_remote_cache.rb
Created November 15, 2012 13:19
Fast deploy using capistrano_rsync_with_remote_cache and turbo-sprockets-rails3
# Requirements:
# https://github.com/vigetlabs/capistrano_rsync_with_remote_cache
# https://github.com/ndbroadbent/turbo-sprockets-rails3
require 'capistrano/recipes/deploy/strategy/rsync_with_remote_cache'
Capistrano::Deploy::Strategy::RsyncWithRemoteCache.class_eval do
def deploy!
update_local_cache
prepare_assets
update_remote_cache
finalize_assets
@mirakui
mirakui / capture.rb
Created November 7, 2012 02:34
capturing stdout and stderr
def capture(options={})
out = options[:out]
err = options[:err] || :out
stdout_old = $stdout.dup
stderr_old = $stderr.dup
$stdout.reopen out
err = $stdout if err == :out