My days of...

生活のことなど、がんばろう

Dockerは開発環境として、学習対象としてもとりあえずお休み

新しくiMacを購入して設定に一番迷ったのが、これを機会に、Dockerの勉強も含めて開発環境はDockerにしようか、それともVirtualBoxVagrantにしようかというところ。で、結局Vagrantを入れて、UbuntuでのLAMP環境を作成(とりあえず)にしました。

これからはDockerでしょ!というのもあるのだけれど、1人で趣味の域を出ないかもしれない、と考えたときになんかDockerはよくわからない、が先行したためやめました。多分、それでもDocker環境を作ることに慣れておいたほうがいいのだろうな、という気はしています。Docker環境を入れるのをやめた理由は、単に自分の理解がなんかついていけそうにないこと。ネットに転がってるサイトの情報などを読んだつもりだけれど、単にPHPで書きたいて移動だったらMAMP、XAMPP、デフォルトのApachePHPで作れば、が多かったのもある。

複数のWeb系のプロジェクトを持ち、それぞれの開発環境が異なる人であればDockerがいいのだろうけど、単にPHPとデータベースを使ったWebサイトを作りたいな、作れるようになりたい程度だったら、いらないかも。

LinuxApachePHPのコンテナとMySQLのコンテナ2つ入れるらしい、というのがすでになんで?状態の人には理解が困難でした。

WebサーバーとDBサーバーだから2ついるの?1つにまとめたものはないの?TerminalからDockerコマンド叩けばいいだけ?毎回?(それはVagrantもいっしょ)とかなんか考えるのが面倒になったし。

もう少ししたら、頭の中で落ち着いてまとまると思うからまたその時にでも、再挑戦。de

プログラマのためのDocker教科書 第2版 インフラの基礎知識&コードによる環境構築の自動化

プログラマのためのDocker教科書 第2版 インフラの基礎知識&コードによる環境構築の自動化

 
Docker

Docker

 

 

Netflixの「ザ・テキサス・レンジャーズ」を観た

Netflixの映画「ザ・テキサス・レンジャーズ」(原題は「The Highwaymen」)を観ました。主演はケヴィン・コスナーウディ・ハレルソン。他にキャシー・ベイツテキサス州知事役で出ています。

ストーリーはアメリカでは有名な銀行強盗ボニーとクライドを追い詰めていく実話に基づくドラマ。伝説のテキサス・レンジャーであるフランク・ハマーをケヴィン・コスナー、メイニー・ゴールトをウディ・ハレルソンが演じています。

舞台は大恐慌時代。テキサス・レンジャーズの機能がほぼ停止された後、捕まえることもできないボニー&クライドを仕留めるため、引退していた2人を呼びもどすところから始まります。テキサス・レンジャーズが廃止されているので、名目は高速道路取締官っぽいもの。

経験と勘を頼りに、追いかけていく様は、今風の犯罪ドラマとはまた異なる趣で、あるところでそう言うものかな、という感じがします。また別の意味ではヤマカンで捕まえられるもの?そう言うもの?といった感じもしないではありません。歴史としてすでに起こった出来事を、当時の記録や社会情勢(アメリ中南部)等を分析して作られた作品なので個人的には面白い映画でした。

ケヴィン・コスナーウディ・ハレルソンも老けてお腹が出たり皺が多く、年寄り感も満載でした。特にウディ・ハレルソンは本当に70台?みたいにも見えました。実年齢以上に年寄り感でしたが、年齢を重ねてもできることはまだまだある、経験を活かしてどうにかできる、というのも思った次第。

最後、事件後のシーンですが、大衆とはいかに扇動されやすいのか、を改めて感じました。テキサス・レンジャーズはこの事件以後何年か経って後、1935年、新組織となり再開されたようです。

日本のタイトルはテキサス・レンジャーズと警官側ですが、現代のHighwaymenは犯罪者側のことを指しているのも興味深いですね。文化の違いでしょうか?

www.netflix.com 

 

iMacが届いてこれから設定

ようやくiMacが届いた。開封してこれから設定。

色々な設定関連やアプリなど何を入れていたか覚えていないので、試行錯誤しながらインストールしたり、設定したりしていきます。

多少のファイルなどはiCloudに保存していたから、戻ってきたものもあってちょっとうれしい。あとApp Store経由のものは履歴も含めて割とすぐに戻せるのも嬉しい。亡くなったAppもあるのは残念。

 Mac App Storeを初めて開いてなにこれ?と思ったのはいい思い出に。。。

Apple iMac?(21.5インチ, Retina?4Kディスプレイモデル, 3.0GHzクアッドコアIntel Core i5)

Apple iMac?(21.5インチ, Retina?4Kディスプレイモデル, 3.0GHzクアッドコアIntel Core i5)

 
macはじめよう MacBook Air & Pro iMac対応 mac OS Sierra対応版

macはじめよう MacBook Air & Pro iMac対応 mac OS Sierra対応版

 

 

消費税が上がったら、クレジットカードの決済手数料も当然ですがあがります

消費税の増税に合わせて導入するポイント還元が終わると同時にJCBなどのカード決済手数料が上がるみたい。どのくらい先になるのかちょっとわからんけど。

www.nikkei.com

現在3.25%のクレジットカード決済手数料が上がる?いまでもクレジットカード決済導入に迷う小売業者が気になるポイントの一つがこの決済手数料。交渉次第で多少変わったりもしますが、安くても2%台半ばくらい。大抵は3%前後といったところでしょうか。どうでしょう?

www.cardfellow.com

こちらのサイトのレートを見ると、クレジットカード会社のサービスによってさまざまなレートが公開されています。日本の場合のどれがこのリストのどこにあてはまるのかよくわからないところがミソ。

VISAだけでもこんなにたくさん

Visa

Debit AssessmentAlso called Visa US Acquirer Service Fee – Debit This assessment applies to all Visa debit transactions. 0.13%
Credit AssessmentAlso called Visa US Acquirer Service Fee – Credit This assessment applies to all Visa credit transactions. This assessment increased from 0.13% to 0.14% on January 1, 2019. 0.14%
Acquirer Processing Fee (APF) – CreditAlso called Visa Authorization Processing Fee – Variable Credit The Acquirer Processing Fee applies to all U.S.-based credit card authorizations acquired in the U.S. regardless of where the issuer/cardholder is located. If your business is based in the U.S., the acquirer processing fee will apply to all Visa credit card authorizations. $0.0195
Acquirer Processing Fee (APF) – DebitAlso called Visa Authorization Processing Fee – Variable Debit This fee applies to all Visa non-PIN debit authorizations acquired in the U.S. $0.0155
Credit Voucher Fee – CreditThis fee applies to refund transactions involving a credit card. $0.0195
Credit Voucher Fee – DebitThis fee applies to refund transactions involving a debit card. $0.0155
Base II Credit Voucher Fee (Credit)The Base II Credit Voucher Fee applies to all U.S.-based refund transactions involving a credit card. $0.0195
Base II Credit Voucher Fee (Debit)The Base II Credit Voucher Fee applies to all U.S.-based refund transactions involving a debit card. $0.0155
System File Transmission FeeAlso called Visa Base II System File Transmission Fee  System File Transmission Fee applies to all Visa transactions and is charged in addition to other transaction-based assessments, such as the Acquirer Processing Fee. $0.0018
Transaction Integrity Fee (TIF) Also called Visa Debit Integrity Fee This fee applies to transactions involving Visa non-PIN debit and prepaid cards that do not meet CPS requirements.  $0.10
Fixed Acquirer Network Fee (FANF)FANF is a monthly fee that varies based on processing method, number of locations and volume. Varies
Kilobyte (KB) Access FeeVisa’s kilobyte fee is charged on each authorization transaction submitted to Visa’s network for settlement. $0.0047
Misuse of Authorization FeeThe Misuse of Authorization Fee applies to Visa authorizations that are not followed by a matching clearing transaction (or in the case of a cancelled or timed out authorization, not properly reversed). $0.09
Zero Floor Limit FeeVisa’s Zero Floor Limit applies to cleared transactions that can’t be matched to a previously approved or partially-approved authorization. In short, it applies to settlement transactions submitted without a proper authorization. $0.20
Zero Dollar Verification FeeThe Zero Dollar Verification fee applies to Zero Dollar Verification messages (approved and declined). Zero Dollar Verification messages include the verification of the card account number, address verification (through AVS), Card Verification Value 2 (CVV2) and Single Message System (SMS) acquired Account Verification authorizations. The Visa Misuse of Authorization Fee does not apply to these requests. The fee applies when you want to verify a cardholder’s information without actually authorizing an amount of their card. $0.025
International Service Assessment Fee (ISA)The International Service Assessment Fee applies to U.S. acquired transactions paid for with a card issued outside of the U.S. 0.80%
International Acquirer FeeThe International Acquirer Fee applies under the same circumstances as the International Service Assessment Fee noted above.Note: The International Service Assessment Fee and International Acquirer Fee often both apply to the same transaction bringing the total charge to 0.85%. 0.45%

ここにある数字を全部足すと3.5%くらいになるのかな?それともこの表はクレジットカードの決済手数料とは関係ないのだろうか・・・?

 

 

iMacが新しくなったし、ちょうど壊れてしまったので・・・

iPad miniiPad AirAppleのイベントに先駆けて発表されたと思ったら・・・

www.apple.com

iMacも新しくなりました。ということは2019年3月25日(日本時間だと26日)のAppleのイベント時は、サービス関連がメイン?

www.apple.com

 この発表会、何が出てくるのかな?

Apple iMac (27インチ, Retina 5Kディスプレイモデル, 3 .5GHzクアッドコアIntel Core i5)

Apple iMac (27インチ, Retina 5Kディスプレイモデル, 3 .5GHzクアッドコアIntel Core i5)

 

 

FirefoxでもVueJS DevToolなどがAddonで提供されてた

久しぶりにFirefoxを使ってみた。なんか軽く感じる。あくまで個人の感想ですけど。

前の記事にも書いたようにVueJSを勉強するのに、Vue DevToolというのがあるので、それを使うといいよーとVueJSの公式などで書かれていて、そのDevToolはChromeのAddonだから、という風にあったので、勝手にChrome拡張機能しかないと思い込んでいたので、Chromeじゃないと無理かとおもっていたら・・・

FirefoxのAddonに普通にあった。

addons.mozilla.orgFirefoxも普通にDevloper Toolあるし、Chromeである必要がない?もしかして。

たまにレイアウトが崩れるページがあるのは、Firefoxに対応できてないだけかな。そういうのは仕事として受注して作成している場合、どうなのだろう??

 

スラスラわかるHTML&CSSのきほん 第2版

スラスラわかるHTML&CSSのきほん 第2版

 
HTML&CSSとWebデザインが 1冊できちんと身につく本

HTML&CSSとWebデザインが 1冊できちんと身につく本

 

 

Vue.JSのチュートリアルでComponentなど

Vueの初心者向けチュートリアルを実施中。JavaScriptフレームワーク(?でいいの?)のVueはとっつきやすいという感じがしていて、本を購入しなくともオンラインのチュートリアルなどでそれなりに使えそうな気持ちになります。

マスターできた、という訳ではないところが注意。
ComponentでTemplateとMethodsを利用して割と簡単にボタンを押して、コンテンツの表示・非表示ができました。

Vue.component('message', {
props: [
'title',
'body'
],

data() {
return {
isVisible: true
}
},
template: `
<article class="message" v-show="isVisible">
<div class="message-header">
{{ title }}
<button @click="hideModal">X</button>
</div>

<div class="message-body">
{{ body }}
</div>
</article>
`,
methods: {
hideModal() {
this.isVisible = !this.isVisible;
}
},
});
new Vue({
el: "#root"
});

 HTML部分は

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="root" class="container">
<message title="hello World" body="Loren ipsum dolor sit amet..."></message>

<message title="hello VUE" body="This is Body of message template!"></message>

</div>
<script src="main.js"></script>
</body>
</html>

こんな感じです。CSSフレームワークのBulmaを利用しています。

Learn Vue 2: Step By Step: Practical Component Exercise #1: Message

を観ながら、そのままコピーしたため。

 

Vue.js入門 基礎から実践アプリケーション開発まで

Vue.js入門 基礎から実践アプリケーション開発まで

 
速習Vue.js 速習シリーズ

速習Vue.js 速習シリーズ