Note To Self ~One Step At A Time~

AUTHOR
kkawazoe
163 Posts
62 Tags

ページ内検索

vagrant halt 失敗時の対応方法

  • Oct 4, 2020
  • POST
経緯 vagrant halt を行った際に以下のエラーが発生したため、その対処方法を備忘録として残しておく 手順 vagrant halt を行う 以下のエラーが発生 An action 'halt' was attempted on the machine 'default', but another process is already executing an action on the machine. ess at a time. Please wait until the other Vagrant process finishes modifying this machine, then try again. If you believe this message is in error, please check the process listing for any "ruby" or "vagrant" processes and kill them.

Hugo に数式を挿入する その2

  • May 23, 2020
  • POST
[前回までの記事] Hugo に数式を挿入する 経緯 mathjax のバージョンを 3 系 にアップデートした際に単純にいかなかったので備忘録として残しておく 手順 参考 を見ながらアップデートする ※version2 から version 3 への変換を利用 partials フォルダ配下の以下のファイルを修正する CDN で提供されている最新の MathJax.js の URL は、cdnjs.com で確認する <script type="text/javascript"> MathJax = { tex: { inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true, tags: "ams", autoload: { color: [], colorV2: ['color'] }, packages: {'[+]': ['noerrors']} }, chtml: { matchFontHeight: false, displayAlign: "left", // version 2 で css で変更していた 数式の表示位置の設定 displayIndent: "2em" }, options: { skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'], renderActions: { /* これを記述しないと インライン数式(例.

Rails で静的エラーページにレイアウトを適用する

  • May 17, 2020
  • POST
環境 rails: rails 5.2.3 方法 Gem Errgent を使用して実現する 確認 config/environments/development.rb の以下を編集して確認する config.consider_all_requests_local = false 実際のコード 例. エラーコード 404, 500 ロケール毎に静的エラーページを生成する => 生成されるファイル 例. public/404.ja.html desc 'Generate Error Pages' task generate_error_pages: :environment do I18n.available_locales.each do |locale| I18n.locale = locale renderer = Errgent::Renderer.new( codes: [404, 500] layout: 'layouts/error_page', # where to find your layout by default output: "public/%s.#{locale}.html" # where to put generated pages by default, %s is the replacement for @code ) renderer.

Docker Compose 上で Rails の秘匿情報を扱う

  • Apr 4, 2020
  • POST
環境 rails: rails 5.2.3 方法 前提 credentials.yml.enc を使用 docker 上での rails のコンテナ名: rails 確認 例. production 環境の秘匿情報を確認する 以下のコマンドを使用して確認する docker-compose exec rails bash #=> コンテナが起動していない場合は docker-compose run rails bash EDITOR="vim" bin/rails env_credentials:show -e production 編集 例. production 環境の秘匿情報を編集する 以下のコマンドを使用して確認する docker-compose exec rails bash #=> コンテナが起動していない場合は docker-compose run rails bash EDITOR="vim" bin/rails env_credentials:edit -e production

Google Apps Script で Gmail から 特定条件のスレッドを検索しメールを取り出す

  • Mar 19, 2020
  • POST
実際のソース function searchContactMail() { /* Gmail から件名が「noreply」のスレッドを検索して内容を取り出す */ var strTerms = 'noreply'; var myThreads = GmailApp.search(strTerms, 0, 100); var myMsgs = GmailApp.getMessagesForThreads(myThreads); //二次元配列 var contents = []; /* 各メールの内容を取り出す */ for (var i = 0; i < myMsgs.length; i++) { for (var j = 0; j < myMsgs[i].length; j++) { var data = myMsgs[i][j].getTo(); if (data !== null) { contents.push([data]); } } } /* スプレッドシートのシート「output」に出力 */ if (myMsgs.length > 0) { var mySheet = SpreadsheetApp.

RSpec 内で動的に I18n の訳文を追加する

  • Sep 14, 2019
  • POST
環境 rails: rails 5.2.3 方法 I18n::Backend::Base#store_translations を使用する I18n.backend.store_translations( :ja, test: 'テスト' ) I18n.t(:test) #=> テスト

Rails でトークンを扱う方法

  • Jul 21, 2019
  • POST
環境 rails: rails 5.2.3 方法 トークンの認証 トークンの認証については authenticate_with_http_token を使用する 以下が対象 Authorization: Token XXX Authorization: Bearer XXX class ApplicationController < ActionController::API # authenticate_with_http_token を使用するために必要 include ActionController::HttpAuthentication::Token::ControllerMethods before_action :authenticate def authenticate authenticate_with_http_token do |token, options| # 認証処理 および レスポンスが必要な場合は記述 end end end トークンの取得 トークンの取得については token_and_options を使用する 以下が対象 Authorization: Token XXX Authorization: Bearer XXX class ApplicationController < ActionController::API # token_and_options を使用するために必要 include ActionController::HttpAuthentication::Token def access_token token_and_options(request)&.first end end

FP3級への道 その7

  • Jul 6, 2019
  • POST
学習中に間違えやすいと思った点を備忘録として残しておく [前回までの記事] FP3級への道 FP3級への道 その2 FP3級への道 その3 FP3級への道 その4 FP3級への道 その5 FP3級への道 その6 受験結果 2019年5月 一応 FP 3級合格 勉強時間は一月半程度 後半 2週間は過去2, 3年分の過去問を中心に解いて解説および関連する分野を勉強した FP に関しては試験受ける・受けないはともかくとして勉強自体はやって良かったと思う 2級以上を受験するかどうかは今のところ不明だがモチベーションが上がれば挑戦したい 【種目別試験結果】ファイナンシャル・プランニング技能検定 公式サイトで確認すると今回の合格率は以下 等級 学科/実技 試験科目 合格率 3級 学科 42.76% 3級 実技 個人資産相談業務 54.35% 大体例年通りくらいの合格率だったらしい

github で access token を使用してリポジトリを clone する

  • Jun 20, 2019
  • POST
経緯 表題の件を行う必要があり対応を行ったため備忘録として残しておく 手順 アクセストークンを作成する GitHub アカウントにログインし,Settings > Developer settings から Personal access tokens を選択する Generate new token を押下する 以下のコマンドを実行してリポジトリを clone する git clone https://{アカウント名}:{アクセストークン}@github.com/{アカウント名}/{リポジトリ名} ローカルの設定を追加する git config --local user.name {アカウント名} git config --local user.email {アカウントのメールアドレス}

electron-builder で Lint および UnitTest が通った場合のみビルドするようにする

  • May 24, 2019
  • POST
経緯 electron にて ビルドするのに electron-builder を使用してみた その際に最低限 Lint, UnitTest を通ることを担保するようにしたため備忘録として残しておく 構築環境 electron: 5.0.1 electron-builder: 20.39.0 実際のコード package.json に以下の定義がしてある前提 ※以下は electron x angular(Angular Cli で生成) { ・・・ "scripts": { "ng": "ng", "start": "ng build --prod && electron .", "build": "ng build", "test": "jest", "lint": "ng lint", "postinstall": "electron-builder install-app-deps", "release": "ng build --prod && node build.js", }, ・・・ } electron-builder のオプションについては公式を参照 'use strict'; const builder = require('electron-builder'); const Platform = builder.Platform; const childProcess = require('child_process'); const unitTest = new Promise((resolve, reject) => { childProcess.
  • ««
  • «
  • 11
  • 12
  • 13
  • 14
  • 15
  • »
  • »»
LATESTS
draw.io MCP を各ツールに導入する手順
  • Mar 5, 2026
  • POST
pgAdmin4 でソフトウェア自体の更新する際にエラーが発生する場合の対処法
  • Feb 6, 2026
  • POST
Google スプレッドシートにて大量の行数が存在するシートに対して連番を付与する方法
  • Jan 26, 2026
  • POST
WSL 上の VSCode で 'Exec format error' が発生して起動しなくなったときの対処方法
  • Jan 17, 2026
  • POST
JSTQB Foundation Level への道 その2
  • Nov 20, 2025
  • POST
JSTQB Foundation Level への道
  • Sep 19, 2025
  • POST
Rails 8.1 リリースノートまとめ
  • Sep 9, 2025
  • POST
RSpec で Cookie のテストを行う方法
  • Jun 19, 2025
  • POST
Serverless 構成で lambda ローカルデバッグ用に AWS SAM CLI を使用する
  • May 16, 2025
  • POST
Rails 8 で docker を使用している場合に rspec > requests spec で 403 エラーが発生した場合の確認点について
  • May 8, 2025
  • POST
TAGS
  • ruby-on-rails (43)
  • tools (41)
  • aws (31)
  • 資格 (17)
  • github (8)
  • postgresql (8)
  • google (7)
  • vs-code (5)
  • amazon-cognito (4)
  • amazon-ec2 (4)
ABOUT
プライバシーポリシー
  • Mar 1, 2019
  • ABOUT
マインドマップ

© Note To Self ~One Step At A Time~

Powered by Hugo.

Robust designed by Daisuke Tsuji.