明日の下書き
- 高円寺.dev #3 用の資料 https://koenji.connpass.com/event/160886/
- フロントエンド専門じゃない人向けの、フロントエンドの最先端〜やや未来の話です
- このレイヤーでは Node.js を使うべき/使うと強いという部分がありますが、他言語を否定しているわけではありません。むしろ他言語でこのアーキテクチャを模倣してほしいという話です。
明日の下書き
http://tddbc.doorkeeper.jp TDD Boot Camp 2013-07 -- TDDBC で、偶然にもロンドンから来日していたSteve Freeman氏を招くことができた。ちなみに本当に偶然の来日で、その日の夕方にご家族と隅田川の花火を見る予定だったらしい。貴重な時間である。
20分ほど講演していただき、さらに参加者と一緒にペアプロ課題に挑戦してもらった。しかもペアプロでっていう貴重な体験をさせてもらったので、そのことについてまとめたい。
Steve Freeman氏は書籍 "Growing Object-Oriented Software, Guided by Tests" (邦訳「実戦テスト駆動開発」)の共著者の一人で、Javaのモックフレームワーク "JMock"の開発者の一人。当然、自動販売機の課題にもJMockを駆使してモデリングしていただくことになった。
'use strict' | |
import React, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
class LazyImg extends Component { | |
constructor () { | |
super() | |
this.state = { loaded: false } | |
this.img = {} |
# Original Rails controller and action | |
class EmployeesController < ApplicationController | |
def create | |
@employee = Employee.new(employee_params) | |
if @employee.save | |
redirect_to @employee, notice: "Employee #{@employee.name} created" | |
else | |
render :new | |
end |
This issue is so infuriating that I'm going to take some time to write about it.
MOST IMPORTANT. Your local development server must be bound to IP address 0.0.0.0. Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g. polymer serve --hostname domain.local
, hugo serve --bind 0.0.0.0
. If you use a named domain like domain.local
, it has to be defined in /etc/hosts
and pointing at 0.0.0.0.
My Parallels setting is using Shared Network, nothing special there.
Open macOS Terminal and type ifconfig
. Look for the value under vnic0
> inet
. It is typically 10.211.55.2
.
Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.
When using ActiveJobs, Rails will return a job_id
after sending the job to ActiveJobs
job = UserMailer.send_invite(params).deliver_later
// work on node v10.15.3 | |
const DIGIT = 6; | |
const TIME_STEP = 30; | |
/** | |
* Calculate TOTP value defined in [RFC6238](https://tools.ietf.org/html/rfc6238) | |
* | |
* @param {Buffer} key shared secret between client and server | |
* @param {Date} date date to calculate totp value. |
This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.