こちらを参照。
- Turbolinksの5.xがインストールされている(Gemfile.lockをチェック!)
- Gemfileにgemのバージョンを指定しないと、最新バージョンがインストールされる可能性がある
- jquery-turbolnksはTurbolinks 2.xまでしか対応していない
- このためjquery-turbolnksを入れても、jQueryのイベントがうまく設定されない
require 'minitest/autorun' | |
require 'json' | |
require 'date' | |
def execute | |
# How to create qiita.json | |
# 1. curl -o qiita.json https://qiita.com/api/v2/items?page=1&per_page=100&query=title%3A%E9%9A%8F%E6%99%82%E6%9B%B4%E6%96%B0 | |
# 2. curl -o qiita.json https://qiita.com/api/v2/items?page=2&per_page=100&query=title%3A%E9%9A%8F%E6%99%82%E6%9B%B4%E6%96%B0 | |
# 3. Merge them manually | |
path = '/Users/jit/Desktop/qiita.json' |
RSpec.describe 'Sample' do | |
after do |example| | |
if example.exception | |
puts 'Error!' | |
else | |
puts 'OK!' | |
end | |
end | |
example 'sample' do |
require 'benchmark' | |
def with_sum | |
(0..9_999_999) | |
.map { |n| n * 2 } | |
.select { |n| n % 3 == 0 } | |
.sum | |
end | |
def with_inject |
➜ ~ ruby -v | |
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16] | |
➜ ~ irb | |
irb(main):001:0> [].delete 1 { 'NG' } | |
SyntaxError: (irb):1: syntax error, unexpected '{', expecting end-of-input | |
[].delete 1 { 'NG' } | |
^ | |
from /Users/jit/.rbenv/versions/2.3.4/bin/irb:11:in `<main>' | |
irb(main):002:0> exit | |
➜ ~ rbenv shell 2.4.1 |
こちらを参照。
-- http://qiita.com/jnchito/items/29e22cc5a73da29f65a3 | |
SELECT | |
e.id | |
,e.name | |
,sh.section_name | |
,to_char(sh.start_date, 'yyyy/mm/dd') as start_date | |
FROM | |
employees e | |
INNER JOIN | |
section_histories sh |
-- http://qiita.com/jnchito/items/1d21fa3970b3c76bee43 | |
WITH target_dates AS | |
(SELECT joined_on AS target_date | |
FROM users | |
UNION | |
SELECT left_on AS target_date | |
FROM users | |
WHERE left_on IS NOT NULL ), | |
joined_counts AS | |
(SELECT joined_on, |
fizz_buzz = -> (n) do | |
f = -> (cond, ans, nxt, n) { n % cond == 0 ? ans : nxt.(n) }.curry | |
patterns = [[n, n.to_s], [5, 'Buzz'], [3, 'Fizz'], [15, 'Fizz Buzz']] | |
patterns.inject(nil) { |nxt, (cond, ans)| f.(cond, ans, nxt) }.(n) | |
end | |
(1..20).map(&fizz_buzz) | |
=begin | |
[ | |
[ 0] "1", |
-- https://gist.github.com/natcl/7a5c98aae8b21475caf9 | |
log "start" | |
property imageFiles : {"jpg", "pef", "dng", "jpeg"} | |
tell application "Finder" | |
set MyFolder to folder POSIX file "/Users/your-path/" | |
set SubFolders to every folder of MyFolder | |
end tell | |
repeat with aFolder in SubFolders |
Because Junichi Ito's post was public, I wanted to translate my answer to Japanese before posting it. Here's my English answer:
Thanks for your comments and your support! I realise we should have done a better job at explaining how we arrived at the pricing.
With Doorkeeper, we’re focused on organisers who hold events on a regular basis, not one off events. This is why we’ve chosen to go with monthly pricing, instead of one a one off fee. We think Doorkeeper already provides you some value when you’re not holding events (people can join your community, you can send them messages), and we want look to how we can provide even more continuous value for communities. If you have any ideas how we could make Doorkeeper more valuable to you even when you’re not holding an event, please let us know.
We chose the smallest plan to have five upcoming events number because we thought it would be the largest number a non professional event organiser would have. We think that ¥1,500 per month is a reasonable price even i