LightSailでVPNをつなぐまで
create instance $ aws lightsail create-instances --instance-names ubuntu_18_vpn --blueprint-id ubuntu_18_04 --bundle-id nano_2_0 --region us-west-2 --availability-zone us-west-2a --user-data "wget ...
create instance $ aws lightsail create-instances --instance-names ubuntu_18_vpn --blueprint-id ubuntu_18_04 --bundle-id nano_2_0 --region us-west-2 --availability-zone us-west-2a --user-data "wget ...
解決 docker上の ~/.pryrc に記載する。 事象 pry-byebugでrubyをデバッグする - Qiita のショートカットをプロジェクトに設置しても、使用できない if defined?(PryByebug) Pry.commands.alias_command 's', 'step' Pry.commands.alias_command 'n', 'next'...
git log でファイルも表示しグレップする $ git log --stat | grep -B 8 hoge.rb | less -B X は要調整 git log で変更・追加されたファイルを表示する - yuumi3のお仕事日記 grepで該当する行の前後も一緒に表示するには
解決 react-dom を読み込み、 ReactDOM.render で実行する。 [React.render is not a function 穀風](https://kokufu.blogspot.com/2016/09/reactrender-is-not-function.html) ...
解決 babelifyにpresetsを設定する .transform(babelify.configure({ presets: ["@babel/react","@babel/preset-env"] })) React.js - webpack4で構築、jsx内でReactの記述が使えない|teratail node.js - Cannot find modul...
実現したこと defaultの設定にサービス毎に必要な箇所のメッセージを上書きする 構成 config/locales/ ├── ja.yml └── service1 └── ja.yml └── service2 └── ja.yml 修正 --- ja: application: environment: production: "本番環境...
解決 dockerで開発しているが、ポートを変更している為に発生している模様。nginxなどでヘッダーのトークンを書き換えればいいかなと。 それが面倒な時は下記。 protect_from_forgery :except => ["destroy"] CSRFの対応について、rails使いが知っておくべきこと - おもしろwebサービス開発日記 Ruby on Ra...
clone時 recursive を付与 $ git clone --recursive git://github.com/foo/bar.git 既にcloneしている $ git submodule update --init --recursive gitでクローンと同時にサブモジュールを初期化、アップデートする – IsaB
.profile 環境変数など # 環境変数の設定 export PATH="/usr/local/opt/mysql@5.7/bin:$PATH" export PATH="/usr/local/opt/openssl/bin:$PATH" export PATH="~/Library/Python/3.7/bin:$PATH" export PATH="$HOME/.nodenv/bin...
未解決 意味がわかりそうで分からない。 type A = { prop?: T } means that object can have prop of type T or do not have it at all. type B = { prop: ?T } means that object always have prop, it can be of type T or null....
構図 Capistrano Server[Docker] <=> Local[Mac] <=> SSHD Server[Docker] 接続先(ファイル設置先) サーバ 設定ファイル version: "3" services: ssh: build: dockerfile: Dockerfile command: ["/usr/s...
テストメソッド def self.runnable! return if !(Rails.env.staging? || Rails.env.production?) || ENV["IMPORTANT_CODE"].present? raise Error end アフター describe "#runnable!" do subject { described_clas...
解決 config.after_initialize 内で行う。 module KuraPlatformBackend class Application < Rails::Application ... config.after_initialize do raise I18n.t("error_messages.not_hoge") if hoge...
エラーのグルーピング Raven.user_context(id: xxx) でエラーをグルーピングできる。 エラー付近のソースを行単位で修正した場合、グルーピングされない(別エラーの扱い)ので気をつける! Rails アプリのエラーを Sentry で管理する & Slack 通知する - Qiita 開発環境でも通知を送信する dsnを設定 enviro...
./ssh/configに Host 192.168.* と記載する。 ssh 192.168.0.1 のような呼び出した際に適用されます。 OpenSSH: Configurations Based On Hosts, Etc. - DEV Community 👩💻👨💻