<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>h3pei.tech</title><description>h3pei.techはソフトウェアエンジニア h3pei のブログです。プログラミングのネタを中心に自由気ままに書いています。</description><link>https://h3pei.tech/</link><item><title>Rails の enqueue_after_transaction_commit を深掘りする</title><link>https://h3pei.tech/articles/2026-03-03-enqueue_after_transaction_commit/</link><guid isPermaLink="true">https://h3pei.tech/articles/2026-03-03-enqueue_after_transaction_commit/</guid><description>Active Job で利用できる enqueue_after_transaction_commit オプションについて調べていたところ、意外と奥が深く、それなりの時間調べたのでわかりやすくまとめてみます。 検証環境- rails 8.1.2- ruby 3.4.8 enqueue_after_transaction_commit とはDBのトランザクション内から</description><pubDate>Tue, 03 Mar 2026 00:00:00 GMT</pubDate></item><item><title>Neovimでテキストのケーススタイルをダイヤル式に切り替える</title><link>https://h3pei.tech/articles/2025-12-07-create-case-dial-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-12-07-create-case-dial-nvim/</guid><description>コードを書いていると、テキストのケーススタイルを変換したくなる場面が時々あります。user_name を UserName にしたい、userId を USER_ID にしたい、などです。変数名、定数名、ファイル名など、文脈によって異なる規則になっているので致し方ないですが、手で書き直すのは少々面倒です。そこで case-dial.nvim(https://github</description><pubDate>Sun, 07 Dec 2025 00:00:00 GMT</pubDate></item><item><title>Ruby の完全なクラス名（FQCN）を一発で取得する方法 ~ ruby-fqcn.nvim ~</title><link>https://h3pei.tech/articles/2025-11-27-create-ruby-fqcn-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-11-27-create-ruby-fqcn-nvim/</guid><description>Ruby のコードを書いていると、あるクラスの完全な名前がほしくなるときがよくあります。  例えば以下のクラスであれば :: で区切られた Foo::Bar::Baz という文字列が欲しいです。rubymodule Foo  module Bar    class Baz       ..    end  endend取得したあと、別のクラスから呼び</description><pubDate>Thu, 27 Nov 2025 00:00:00 GMT</pubDate></item><item><title>Ruby のブロック記法 do~end と {} を切り替える Neovim プラグインを作った</title><link>https://h3pei.tech/articles/2025-11-25-create-ruby-block-toggle-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-11-25-create-ruby-block-toggle-nvim/</guid><description>ruby-block-toggle.nvim という Neovim プラグインを作りました。https://github.com/h3pei/ruby-block-toggle.nvimできることはただ1つ...  Ruby のブロックの2種類ある書き方 do ~ end と {} を切り替えることだけです。!ruby-block-toggle.nvim de</description><pubDate>Tue, 25 Nov 2025 00:00:00 GMT</pubDate></item><item><title>Questal で起こしたい「推進力」について</title><link>https://h3pei.tech/articles/2025-11-06-questal-core-concept-propulsion/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-11-06-questal-core-concept-propulsion/</guid><description>Questal(https://questal.app/) というサービスを個人で開発・運営しています。https://questal.app/同じ目標・同じ熱量を持った仲間が集まることで生まれる推進力を活かしながら目標達成を目指し、その活動が継続し、ゴールに到達することを支援します。この記事では、コンセプトを構成する「推進力」について、開発者として考えたことをお話しします。※</description><pubDate>Thu, 06 Nov 2025 00:00:00 GMT</pubDate></item><item><title>img-clip.nvim がブログを書くときの画像貼り付けの面倒さから解放してくれた</title><link>https://h3pei.tech/articles/2025-10-22-efficient-image-workflow-with-img-clip-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-10-22-efficient-image-workflow-with-img-clip-nvim/</guid><description>ブログの記事を Neovim で書くようになりそれなりに時間が経ちました。使い慣れたエディタでブログを書けるのは多くの面で快適で心地よいのですが、記事内の画像の挿入だけはものすごく面倒に感じていました 。この1点のデメリットが大きく、ドラッグアンドドロップで済む Web ベースのブログエディタに戻ろうかと何度か考えたこともあります。そんな折、img-clip.nvim(</description><pubDate>Wed, 22 Oct 2025 00:00:00 GMT</pubDate></item><item><title>ActionMailer で From に表示名をつける方法</title><link>https://h3pei.tech/articles/2025-10-15-actionmailer-sender-name-with-email/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-10-15-actionmailer-sender-name-with-email/</guid><description>ActionMailer でメール送信をする際、ApplicationMailer に次のように書く例はよく見かけると思います。rubyclass ApplicationMailer &lt; ActionMailer::Base  default from: &apos;notifications@example.com&apos;endこれで、ApplicationMailer を継承した全</description><pubDate>Wed, 15 Oct 2025 00:00:00 GMT</pubDate></item><item><title>フリーランスになりました</title><link>https://h3pei.tech/articles/2025-09-26-became-freelance-developer/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-09-26-became-freelance-developer/</guid><description>2025年9月からフリーランスのソフトウェアエンジニアになりました。これまではずっと会社員としてエンジニアをやってきましたので、フリーランスで活動するのは初の試みになります。 背景・動機以前からフリーランスという働き方には関心があり、一度は経験してみたいと考えていました。なぜそう思っていたかを改めて考えてみたところ、やはり仕事をする上での自由さが得られるというのは大きいです。も</description><pubDate>Fri, 26 Sep 2025 00:00:00 GMT</pubDate></item><item><title>Tailwind CSS v4 + Rails8 アプリを本番環境にデプロイしたら一部のスタイルが適用されない問題に遭遇した</title><link>https://h3pei.tech/articles/2025-08-30-tailwindcss-v4-rails-missing-classes-docker/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-08-30-tailwindcss-v4-rails-missing-classes-docker/</guid><description>Ruby on Rails 8 + Tailwind CSS v4 を使った Web アプリを本番環境にデプロイしたところ Tailwind CSS の一部のスタイルが適用されない という問題に遭遇しました。これまでも Tailwind CSS のクラスが適用されない問題には何度か遭遇していたので、最初は「ああ、またこのパターンか」と軽い気持ちで考えていたのですが、実際には解決までかな</description><pubDate>Sat, 30 Aug 2025 00:00:00 GMT</pubDate></item><item><title>ブログ名とドメイン名を変更しました</title><link>https://h3pei.tech/articles/2025-03-24-change-blog-name-and-domain-name/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-03-24-change-blog-name-and-domain-name/</guid><description>ブログ名とドメイン名を変更しました。- ブログ名: mogulla3.tech → h3pei.tech- ドメイン名: mogulla3.tech → h3pei.techちょうど10年前くらいに、友人と雑談しながらネタで考えた mogulla3 というアカウント名をずっと使い続けてきてしまいましたが、自分でもなんと発音すればわからないという謎な状態が続いていたため</description><pubDate>Mon, 24 Mar 2025 00:00:00 GMT</pubDate></item><item><title>現在行に変更を与えた Pull Request を追跡する Neovim プラグイン trace-pr.nvim を作った</title><link>https://h3pei.tech/articles/2025-01-25-create-trace-pr-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2025-01-25-create-trace-pr-nvim/</guid><description>trace-pr.nvim という Neovim プラグインを作りました。https://github.com/h3pei/trace-pr.nvim!trace-pr.nvim demo(https://i.gyazo.com/866dbfb5a016bccfa7a6317d0138f981.gif &apos;trace-pr.nvim demo&apos;)&lt;!-- どういうplugin</description><pubDate>Sat, 25 Jan 2025 00:00:00 GMT</pubDate></item><item><title>Neovim の折りたたみを使いやすくカスタマイズする</title><link>https://h3pei.tech/articles/2024-10-14-customising-neovim-folds-for-ease-of-use/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-10-14-customising-neovim-folds-for-ease-of-use/</guid><description>Vim に標準で備えられている折りたたみ機能について、ちょくちょく使ってはいたものの雑な設定しかしていない状態でした。今回ユーザマニュアルを読みつつ設定を見直し、ある程度使いやすいと感じる状態になったのでその記録を残します。 そもそもどういう用途で折りたたみを使うかまず、どういう用途で折りたたみを使うかを改めて言語化してみました。  ここは人によって様々かと思いますが、自分の場合は</description><pubDate>Mon, 14 Oct 2024 00:00:00 GMT</pubDate></item><item><title>WezTerm でも「⌘ + ,」のショートカットキーで設定画面を開きたい</title><link>https://h3pei.tech/articles/2024-07-07-open-the-wezterm-config-file-with-command-plus-comma/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-07-07-open-the-wezterm-config-file-with-command-plus-comma/</guid><description>macOS のアプリの多くは、コマンドキーとカンマ（⌘ + ,）を同時に入力することでそのアプリの設定画面を開くショートカットキーが割り当てられていると思います。しかし、私の知る限り WezTerm は設定用の UI は持ち合わせておらず、Lua によるプレーンなテキストファイルですべてを管理しています。Lua で設定を管理できる、というのは私が WezTerm を使い始めるきっかけに</description><pubDate>Sun, 07 Jul 2024 00:00:00 GMT</pubDate></item><item><title>Lofree FLOW の Command キーと Option キーが入れ替わってしまった場合の対処法</title><link>https://h3pei.tech/articles/2024-06-22-how-to-deal-with-swapped-command-and-option-keys-on-the-lofree-flow/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-06-22-how-to-deal-with-swapped-command-and-option-keys-on-the-lofree-flow/</guid><description>当方、MacBook Pro に Lofree FLOW というキーボードを接続して使っているのですが、ある日突然、Command キーと Option キーが入れ替わってしまったような現象に遭遇しました。MacBook の内蔵キーボードでは起きないので Lofree FLOW の問題のように思いました。ググってもそれらしい事象を見つけることができなかったので説明書をいちから読んでいたのですが</description><pubDate>Sat, 22 Jun 2024 00:00:00 GMT</pubDate></item><item><title>tmux 上で斜体が表示されない問題への対処</title><link>https://h3pei.tech/articles/2024-06-16-fix-the-problem-of-italics-not-rendering-in-tmux-session/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-06-16-fix-the-problem-of-italics-not-rendering-in-tmux-session/</guid><description>久しぶりに tmux の設定を見直していて、普段はほぼ常に起動している tmux ですが、変更した設定を都度確認できるように tmux の外で作業をしていました。そのとき、tmux を起動しない状態だと斜体で表示されている文字列が、tmux 上だと表示されていないことに気が付きました。斜体が表示されないことで困ったことはありませんが、見た目はかっこいいので使いたいところです。調べてみたとこ</description><pubDate>Sun, 16 Jun 2024 00:00:00 GMT</pubDate></item><item><title>Raycast でマッチするものが見つからなかったら Google 検索させる</title><link>https://h3pei.tech/articles/2024-03-31-fallback-to-google-search-in-raycast/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-03-31-fallback-to-google-search-in-raycast/</guid><description>※  本記事の内容は Raycast version 1.70.3 で確認していますRaycast(https://www.raycast.com/) には Fallback Commands(https://manual.raycast.com/fallback-commands) という機能があり、 入力ワードにマッチするものが見つからなかったときに実行できるコマンドの候補を表示し</description><pubDate>Sun, 31 Mar 2024 00:00:00 GMT</pubDate></item><item><title>Neovim から tig を起動する with toggleterm.nvim</title><link>https://h3pei.tech/articles/2024-03-18-open-tig-in-neovim-with-toggleterm-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-03-18-open-tig-in-neovim-with-toggleterm-nvim/</guid><description>Git の操作をするときは、基本的に tig(https://github.com/jonas/tig) を使っています。これまでは、ターミナル上で tmux(https://github.com/tmux/tmux) を起動して tig 専用のペインを用意し、 commit や push をしたくなったら tig のペインに移動するという作業フローを取っていました。この作業フロー</description><pubDate>Mon, 18 Mar 2024 00:00:00 GMT</pubDate></item><item><title>Neovim 上で factory_bot の呼び出し箇所から定義ファイルにジャンプする</title><link>https://h3pei.tech/articles/2024-03-09-jump-to-factory-bot-definitions-in-neovim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-03-09-jump-to-factory-bot-definitions-in-neovim/</guid><description>Ruby、特に Rails アプリケーションのテストを書くときに、factory_bot(https://github.com/thoughtbot/factory_bot) をよく使います。https://github.com/thoughtbot/factory_botfactory_bot を使うとrubycreate(:user, :admin, name: &apos;Bo</description><pubDate>Sat, 09 Mar 2024 00:00:00 GMT</pubDate></item><item><title>Neovim 上でファイルパスをクリップボードにコピーする</title><link>https://h3pei.tech/articles/2024-02-24-copy-file-path-in-neovim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-02-24-copy-file-path-in-neovim/</guid><description>現在開いているファイルのパスが欲しくなるときが意外とあります。クリップボードにコピーして、その次の行動に使えるようにしたいです。 コマンドが覚えにくいしかしながら、Vim / Neovim でこれを実現するには少々面倒なコマンドが必要なようです。  私が最初に知ったのは stack overflow の こちらの質問(https://stackoverflow.com/quest</description><pubDate>Sat, 24 Feb 2024 00:00:00 GMT</pubDate></item><item><title>RSpec の partial double とはなにか</title><link>https://h3pei.tech/articles/2024-02-12-what-is-partial-double-in-rspec/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-02-12-what-is-partial-double-in-rspec/</guid><description>RSpec には and_call_original(https://rspec.info/features/3-13/rspec-mocks/configuring-responses/calling-the-original-implementation/) というメソッドがあり、これを使いたい場面があったのですが、使い方を間違えて次のようなエラーが発生しました。xxx</description><pubDate>Mon, 12 Feb 2024 00:00:00 GMT</pubDate></item><item><title>Lofree FLOW というキーボードを使い始めた</title><link>https://h3pei.tech/articles/2024-02-04-start-using-lofree-flow/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-02-04-start-using-lofree-flow/</guid><description>Lofree FLOW(https://amzn.to/3vXy1JU) というキーボードを使い始めました。!Lofree FLOW(/assets/2024-02-04-start-using-lofree-flow-01.jpg &apos;Lofree FLOW&apos;)(https://amzn.to/3vXy1JU)デザインと打鍵音(感)の2点に惹かれ、気がつけばポチっておりました。2</description><pubDate>Sun, 04 Feb 2024 00:00:00 GMT</pubDate></item><item><title>RSpec で module のテストを書く方法</title><link>https://h3pei.tech/articles/2024-01-28-how-to-write-module-test-in-rspec/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-01-28-how-to-write-module-test-in-rspec/</guid><description>例として Calculatable というモジュールの関数をテストしたいとします。ruby calculatable.rbmodule Calculatable  def add(a, b)    a + b  endend実際にこのモジュールを include しているクラスに対してテストを書くということもできますが、クラスの関心事も入ってきてしまい書きづ</description><pubDate>Sun, 28 Jan 2024 00:00:00 GMT</pubDate></item><item><title>ブログのアップデート</title><link>https://h3pei.tech/articles/2024-01-04-blog-updates-for-jan-2024/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-01-04-blog-updates-for-jan-2024/</guid><description>2024年の年末年始の時間を使ってブログを少しアップデートしました。  主な更新内容と、変更の背景について簡単にまとめます。 レイアウトを2カラムに変更1カラムから2カラムのレイアウトに変更しました。!変更前: 1カラムレイアウト(/assets/2024-01-04-blog-updates-for-jan-2024-01.png &apos;変更前: 1カラムレイアウト&apos;)!変</description><pubDate>Thu, 04 Jan 2024 00:00:00 GMT</pubDate></item><item><title>nvim-tree.lua で .gitignore にリストされたファイルも表示する</title><link>https://h3pei.tech/articles/2024-01-02-configure-nvim-tree-lua-to-show-files-listed-in-gitignore/</link><guid isPermaLink="true">https://h3pei.tech/articles/2024-01-02-configure-nvim-tree-lua-to-show-files-listed-in-gitignore/</guid><description>Neovim で使えるファイルエクスプローラープラグインとして nvim-tree.lua(https://github.com/nvim-tree/nvim-tree.lua) があります。とても手に馴染んでいて、気に入っているプラグインの1つです。このプラグインで .gitignore されたファイルもエクスプローラー上に表示する方法と、表示したくなった背景についてご紹介。</description><pubDate>Tue, 02 Jan 2024 00:00:00 GMT</pubDate></item><item><title>WezTerm 上でのダブルクリックによるテキストの選択範囲をカスタマイズする</title><link>https://h3pei.tech/articles/2023-12-29-customize-selection-word-boundary-in-wezterm/</link><guid isPermaLink="true">https://h3pei.tech/articles/2023-12-29-customize-selection-word-boundary-in-wezterm/</guid><description>WezTerm(https://wezfurlong.org/wezterm/) 上で tmux を使って縦分割をしているときに、マウスでダブルクリックをしてテキストを選択状態にしようとすると分割線の │ も一緒に選択されてしまいます。!&quot;WezTerm&quot; だけ選択したい(/assets/2023-12-29-customize-selection-word-boundary-in</description><pubDate>Fri, 29 Dec 2023 00:00:00 GMT</pubDate></item><item><title>ブログのホスティングサービスを Gatsby Cloud から Netlify へ移行した</title><link>https://h3pei.tech/articles/2023-09-23-migrate-from-gatsby-cloud-to-netlify/</link><guid isPermaLink="true">https://h3pei.tech/articles/2023-09-23-migrate-from-gatsby-cloud-to-netlify/</guid><description>本ブログはもともと Gatsby Cloud でホスティングしていたが、Netlify による Gatsby の買収に伴い Gatsby Cloud は終了することになった。  Gatsby Cloud にはこれといった不満もなく快適便利に使わせてもらっていたが、そのような背景もあって Netlify に移行した。この記事では移行にあたっての作業記録的なものを簡単に残す。 移行の全体観</description><pubDate>Sat, 23 Sep 2023 00:00:00 GMT</pubDate></item><item><title>rspec.nvim の `RSpecJump` コマンドに force オプションを追加した</title><link>https://h3pei.tech/articles/2023-09-10-add-force-option-to-rspec-jump-command/</link><guid isPermaLink="true">https://h3pei.tech/articles/2023-09-10-add-force-option-to-rspec-jump-command/</guid><description>ブログ書くのが久しぶりすぎて書き方忘れました。書きたいネタはちょいちょい思い浮かぶのだけど、なんだかんだ書かずに最後の記事から1年近くが経ちかけようとしていたことに驚き。 RSpecJump の派生として、推測したファイルがいずれも存在しなかった場合に、ファイルの作成をしてくれる force オプション的な機能を実装したいと思っている。 新規でファイルを追加した場合に特に便利</description><pubDate>Sun, 10 Sep 2023 00:00:00 GMT</pubDate></item><item><title>プロダクトコードとテストコード間をジャンプする機能を rspec.nvim に実装した</title><link>https://h3pei.tech/articles/2022-10-24-implement-rspec-jump-command-in-rspec-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2022-10-24-implement-rspec-jump-command-in-rspec-nvim/</guid><description>以下の gif のように、プロダクトコードとテストコード間をジャンプできる機能を rspec.nvim(https://github.com/h3pei/rspec.nvim) に実装した。 :RSpecJump というコマンドでジャンプできる。https://github.com/h3pei/rspec.nvim!RSpecJumpのデモ(https://i.gyazo.co</description><pubDate>Mon, 24 Oct 2022 00:00:00 GMT</pubDate></item><item><title>Neovimプラグイン rspec.nvim を作った</title><link>https://h3pei.tech/articles/2022-09-26-create-rspec-nvim/</link><guid isPermaLink="true">https://h3pei.tech/articles/2022-09-26-create-rspec-nvim/</guid><description>rspec.nvim(https://github.com/h3pei/rspec.nvim) という、RSpec を Neovim からシームレスに実行できるプラグインを作った。https://github.com/h3pei/rspec.nvimこの記事ではプラグインの機能の紹介をしつつ、開発した背景や実装時に考えたことを書いていく。 モチベーション最近、Neovim</description><pubDate>Mon, 26 Sep 2022 00:00:00 GMT</pubDate></item><item><title>Gemfileで使われる ~&gt; はなにを意味するか</title><link>https://h3pei.tech/articles/2022-06-12-what-does-twiddle-wakka-mean-in-gemfile/</link><guid isPermaLink="true">https://h3pei.tech/articles/2022-06-12-what-does-twiddle-wakka-mean-in-gemfile/</guid><description>Gemfileにてgemのバージョン指定に使われる ~ という記号が示すバージョンの範囲が覚えられないので整理した。 最初に結論- メジャーバージョンのみ指定した場合、指定したメジャーバージョンの最新版が入る- マイナーバージョンまで指定した場合、メジャーバージョンを維持しつつ、指定したマイナーバージョン以上の最新版が入る- パッチバージョンまで指定した場</description><pubDate>Sun, 12 Jun 2022 00:00:00 GMT</pubDate></item><item><title>Vimの改行コードの設定見直し</title><link>https://h3pei.tech/articles/2022-06-08-vim-fileformat-settings/</link><guid isPermaLink="true">https://h3pei.tech/articles/2022-06-08-vim-fileformat-settings/</guid><description>Vimの文字エンコーディングの設定を見直しているとき(/articles/2022-06-04-vim-encoding-settings-to-open-shift-jis-file/)に、改行コードについてもドキュメントなどから目に触れる機会が多かったのでついでに見直した雑な記録です。 3つの改行コード以下は前提知識として抑えておきます。色々な記事で説明されていますのでざっくり</description><pubDate>Wed, 08 Jun 2022 00:00:00 GMT</pubDate></item><item><title>VimでShift_JISなファイルを文字化けせずに開くために文字エンコーディングの設定を見直した</title><link>https://h3pei.tech/articles/2022-06-04-vim-encoding-settings-to-open-shift-jis-file/</link><guid isPermaLink="true">https://h3pei.tech/articles/2022-06-04-vim-encoding-settings-to-open-shift-jis-file/</guid><description>Microsoft Excelで作成されたCSVファイルをvimで開いたら文字化けしてしまう状態だったので、これを機にVimの文字エンコーディングまわりの設定を見直しました。 設定見直し前の状態文字コードShift_JISで保存されたファイルを開くと次の画像のような状態になっていました。!文字化けしている様子(/assets/2022-06-04-vim-encoding-se</description><pubDate>Sat, 04 Jun 2022 00:00:00 GMT</pubDate></item><item><title>シェルのコマンド履歴をインクリメンタルサーチで検索して素早く再利用する方法</title><link>https://h3pei.tech/articles/2021-09-06-search-command-history-with-incremental-search/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-09-06-search-command-history-with-incremental-search/</guid><description>この記事では、シェルのコマンド履歴をインクリメンタルサーチで検索して素早く再利用する方法についてステップバイステップで紹介します。最終的に、次のgifアニメのような操作ができるようになります。!search-command-history-with-incremental-search(https://i.gyazo.com/255dcec9ffa9cb685bb19790cff963</description><pubDate>Mon, 06 Sep 2021 00:00:00 GMT</pubDate></item><item><title>zshの設定ファイルの読み込み順序</title><link>https://h3pei.tech/articles/2021-09-05-load-order-of-zsh-files/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-09-05-load-order-of-zsh-files/</guid><description>~/.zshenv に設定したはずの環境変数が期待通り反映されていないことに偶然気が付き、原因を調べてみたところ後から読み込まれるファイルに環境変数が上書きされているためだった..。同じ轍を踏まないように、zshの設定ファイルの読み込み順序をメモしておく。  ※ 検証環境 : macOS, zsh5.8 読み込み順序1. /etc/zshenv2. ~/.zshenv</description><pubDate>Sun, 05 Sep 2021 00:00:00 GMT</pubDate></item><item><title>リングコンを吊るすのに山崎実業のマグネットホルダーがぴったりだった</title><link>https://h3pei.tech/articles/2021-08-09-ring-con-with-yamajitsu-magnetic-holder/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-08-09-ring-con-with-yamajitsu-magnetic-holder/</guid><description>リングフィットアドベンチャー、このコロナ禍において自宅にいながらも運動不足の解消ができる素晴らしいゲームですね。本当に素晴らしいので政府が運動不足な世帯に無償で配ってもいいんじゃないかとすら思います。そんな最高のゲームのリングフィットアドベンチャーですが、少し困ることがありました。それはリングコンの置き場所です。!リングコン(/assets/2021-08-09-ring-con-</description><pubDate>Mon, 09 Aug 2021 00:00:00 GMT</pubDate></item><item><title>ON DUPLICATE KEY UPDATE構文を activerecord-import で使う</title><link>https://h3pei.tech/articles/2021-07-17-on-duplicate-key-update-with-activerecord-import/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-07-17-on-duplicate-key-update-with-activerecord-import/</guid><description>MySQLが提供する INSERT .. ON DUPLICATE KEY UPDATE 構文の使い方について、activerecord-import(https://github.com/zdennis/activerecord-import) というRubyのライブラリを例に整理します。また、この構文をMySQLで使うときの注意点についても後半に書きます。 INSERT .</description><pubDate>Sat, 17 Jul 2021 00:00:00 GMT</pubDate></item><item><title>ちゃんと理解するrbenv : (4) shimsを理解する</title><link>https://h3pei.tech/articles/2021-07-12-understanding-rbenv-4/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-07-12-understanding-rbenv-4/</guid><description>はじめに本記事は、「ちゃんと理解するrbenv」の第4回です。  ※ 前回の記事(/articles/2021-07-10-understanding-rbenv-3/)今回は、rbenvにおける重要な概念である shims について整理します。 shimsとはshimsは rake、rubocop、rspec などといったRubyのコマンド単位</description><pubDate>Mon, 12 Jul 2021 00:00:00 GMT</pubDate></item><item><title>ちゃんと理解するrbenv : (3) バージョン切り替えの仕組みを理解する</title><link>https://h3pei.tech/articles/2021-07-10-understanding-rbenv-3/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-07-10-understanding-rbenv-3/</guid><description>はじめに本記事は、「ちゃんと理解するrbenv」の第3回です。  ※ 前回の記事(/articles/2021-07-10-understanding-rbenv-2/)今回は、rbenvの機能の真髄であるバージョン切り替えの仕組みについて深堀りながら整理します。 バージョン切り替えのコマンドが裏でやっていることバージョン切り替えに関わるコマンドとして、以下の3つが</description><pubDate>Sat, 10 Jul 2021 00:00:00 GMT</pubDate></item><item><title>ちゃんと理解するrbenv : (2) 基本的な使い方</title><link>https://h3pei.tech/articles/2021-07-10-understanding-rbenv-2/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-07-10-understanding-rbenv-2/</guid><description>はじめに本記事は、「ちゃんと理解するrbenv」の第2回です。  ※ 前回の記事(/articles/2021-07-10-understanding-rbenv-1/)今回はrbenvの基本的な使い方について整理します。  前回の記事でrbenvのイメージがぼんやりと構築されたかと思うので、今回は実際に使ってみる中でそのイメージを具体化していくことを目指します。 想</description><pubDate>Sat, 10 Jul 2021 00:00:00 GMT</pubDate></item><item><title>ちゃんと理解するrbenv : (1) 概念理解</title><link>https://h3pei.tech/articles/2021-07-10-understanding-rbenv-1/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-07-10-understanding-rbenv-1/</guid><description>はじめに本記事は、Rubyで開発している人にとってほぼ必須ツールと言ってよいであろう rbenv(https://github.com/rbenv/rbenv) について、ちゃんと理解して使えるようになることを目指して解説・整理したものです。少し長くなるため、読みやすい単位で記事を分けるつもりです。rbenvはとてもシンプルで洗練されたツールなので、READMEをさっと読むだけで</description><pubDate>Sat, 10 Jul 2021 00:00:00 GMT</pubDate></item><item><title>はてなブログからGatsby製ブログに完全移行した</title><link>https://h3pei.tech/articles/2021-06-28-migration-from-hatenablog-to-gatsby/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-06-28-migration-from-hatenablog-to-gatsby/</guid><description>はてなブログからGatsby製ブログに完全移行した。つい2週間前のブログ(/articles/2021-06-13-new-blog-using-gatsby/) ではそれぞれ棲み分けて使っていきたい、と言っていたのにも関わらず。こんなに短い期間で考えを180度変えることになるとは思わなんだ...。 before → after- ドメイン : mogulla3.tech</description><pubDate>Mon, 28 Jun 2021 00:00:00 GMT</pubDate></item><item><title>記事の目次を表示するようにした</title><link>https://h3pei.tech/articles/2021-06-17-render-table-of-contents/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-06-17-render-table-of-contents/</guid><description>再び、このGatsby製ブログの機能改善について。  記事の見出しから目次を生成し、記事ページの上部(タイトルの直下)に表示するようにした。 目次の生成方法について調査記事の見出しにアンカーリンクがつくようにした(/articles/2021-06-15-add-anchor-links-to-headlines/) でもそうだったように、gatsbyプラグインを使って目次の生成</description><pubDate>Thu, 17 Jun 2021 00:00:00 GMT</pubDate></item><item><title>記事の見出しにアンカーリンクがつくようにした</title><link>https://h3pei.tech/articles/2021-06-15-add-anchor-links-to-headlines/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-06-15-add-anchor-links-to-headlines/</guid><description>GitHubの README.md のように、記事の見出しにアンカーリンクがつくようにした。見出しの左側にリンクアイコンがぴょこっと出るようになり、そのアイコンをクリックするとその見出しに一発でジャンプできるURLが生成され飛べるようになった。!Image from Gyazo(https://i.gyazo.com/b18640b3e43348fe4527d6c62194f3b8.</description><pubDate>Tue, 15 Jun 2021 00:00:00 GMT</pubDate></item><item><title>Gatsbyで新しくブログを作った</title><link>https://h3pei.tech/articles/2021-06-13-new-blog-using-gatsby/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-06-13-new-blog-using-gatsby/</guid><description>Gatsby(https://www.gatsbyjs.com/) を使って新しくブログを作った。既に持っているブログ MogLog から完全に置き換えるつもりはなく、それぞれ棲み分けて使っていこうと思っている。以下、なぜこのブログを作ったか・作りたいと思ったかを残しておく。 より気軽に考えたこと・感じたことを表現する場既存ブログでやるかどうかは結構迷ったけど、より気軽に自</description><pubDate>Sun, 13 Jun 2021 00:00:00 GMT</pubDate></item><item><title>`destroyed_by_association` で親モデルの関連により削除されるかどうかを判定する</title><link>https://h3pei.tech/articles/2021-04-18-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-04-18-01/</guid><description>Rails (ActiveRecord) ネタ。  destroyed_by_association(https://api.rubyonrails.org/classes/ActiveRecord/AutosaveAssociation.htmlmethod-i-destroyed_by_association) を使うと、モデル間の関連設定により削除されるのか、それとも自身で削除</description><pubDate>Sun, 18 Apr 2021 00:00:00 GMT</pubDate></item><item><title>.tigrcの地道な改善</title><link>https://h3pei.tech/articles/2021-03-27-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-03-27-01/</guid><description>普段から、開発時にお世話になっている tig(https://github.com/jonas/tig) について、ちょくちょく改善を加えているので最近加えた設定についてまとめてみる。 .tigrc改善のモチベーションtigはかれこれ3年近く使い続けているくらいには気に入ってるツールなのだけど、デフォルト状態では割と限られたgit操作しかできない。実際使っているとtigのUIから</description><pubDate>Sat, 27 Mar 2021 00:00:00 GMT</pubDate></item><item><title>逆算思考でドキュメントを書く</title><link>https://h3pei.tech/articles/2021-03-20-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-03-20-01/</guid><description>最近ドキュメントを書く機会が増えてきたこともあって、良いドキュメントを書くにはどうすればいいかというのを改めて考えたので、考えたことを残しておく。 誰のために書くか（対象読者）を考えるこれが最も重要。  本を読んでいると、まえがきなどに想定読者が明示されていることがあると思うが、それと同じようにドキュメントも誰のために書くかを最初に考える。これは読み手と書き手の双方にメリットがあ</description><pubDate>Sat, 20 Mar 2021 00:00:00 GMT</pubDate></item><item><title>ActiveRecordのautosaveの設定で子モデル含めた新規作成・更新時の振る舞いはどのように変わるか</title><link>https://h3pei.tech/articles/2021-02-07-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-02-07-01/</guid><description>ActiveRecordが提供する has_many 、has_one 、belongs_to といったアソシエーションの設定を行うメソッドには autosave というオプションがある。APIドキュメント(https://api.rubyonrails.org/classes/ActiveRecord/AutosaveAssociation.html) を見るとオプション</description><pubDate>Sun, 07 Feb 2021 00:00:00 GMT</pubDate></item><item><title>実装速度を向上させるためのセルフリファインメント</title><link>https://h3pei.tech/articles/2021-01-31-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-01-31-01/</guid><description>実装速度を向上させる目的で最近個人的にやっている「セルフリファインメント」について紹介。 セルフリファインメントとは「セルフリファインメント」というのは自分が勝手にそう呼んでいるだけの言葉で明確な定義は無いが、これから実装しようとしているタスクの詳細化を1人でやるということ。スクラム開発に親しんでいる人ならば、スプリント計画の前にプロダクトバックログアイテムのリファインメント作業を</description><pubDate>Sun, 31 Jan 2021 00:00:00 GMT</pubDate></item><item><title>timecopはどのようにして時を止めているか</title><link>https://h3pei.tech/articles/2021-01-03-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2021-01-03-01/</guid><description>timecop(https://github.com/travisjeffery/timecop) というgemがどうやって時間を止めているかについて調べた。※ timecopのバージョンは、v0.9.2 最初に結論Time や Date などの組み込みクラスをオープンしてメソッドを追加し、alias_method で now や today とい</description><pubDate>Sun, 03 Jan 2021 00:00:00 GMT</pubDate></item><item><title>ruby-buildとrbenvのプラグイン機構</title><link>https://h3pei.tech/articles/2020-12-30-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-12-30-01/</guid><description>前回の記事(/articles/2020-12-29-01/) に続いてrbenvネタ。今回は、ruby-buildとrbenvの関係について。 ruby-buildとは何かruby-buildとは、あらゆるバージョンのrubyを簡単にインストールするためのコマンドラインユーティリティ。本家のREADME(https://github.com/rbenv/ruby-build</description><pubDate>Wed, 30 Dec 2020 00:00:00 GMT</pubDate></item><item><title>rbenv rehashをちゃんと理解する</title><link>https://h3pei.tech/articles/2020-12-29-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-12-29-01/</guid><description>rbenv(https://github.com/rbenv/rbenv) の rehash というコマンドについてちゃんと理解するべく調べたのでまとめる。なお調べたのはバージョン1.1.2のrbenv。$ rbenv --versionrbenv 1.1.2もしかすると間違っている部分があるかもしれないので、気づいた方はコメントなどいただけるとありがたいです。</description><pubDate>Tue, 29 Dec 2020 00:00:00 GMT</pubDate></item><item><title>NERDTree上でファイルの新規作成、リネーム、削除をする</title><link>https://h3pei.tech/articles/2020-11-08-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-11-08-01/</guid><description>小ネタ。NERDTree(https://github.com/preservim/nerdtree) というファイルエクスプローラ用のVimプラグイン上でファイルの新規作成やリネーム、削除をする方法をgif動画付きでご紹介。 ファイルの新規作成NERDTreeを起動 → m キーでNERDTree menuを開く → a キーで新規作成!Image from G</description><pubDate>Sun, 08 Nov 2020 00:00:00 GMT</pubDate></item><item><title>ISUCON10予選にチームモツ鍋として参加した</title><link>https://h3pei.tech/articles/2020-09-17-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-09-17-01/</guid><description>2020年9月12日に開催された ISUCON10(http://isucon.net/archives/54640423.html) 予選に、チーム「モツ鍋」として @mintsu123(https://twitter.com/mintsu123) との2名で参加した。最終スコアは 1691 で、予選通過はできなかった。この記事では、予選でやったことについて自分の視点から淡</description><pubDate>Thu, 17 Sep 2020 00:00:00 GMT</pubDate></item><item><title>コードリーディング：DraperのDecorator探索ロジックを追う</title><link>https://h3pei.tech/articles/2020-07-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-07-11-01/</guid><description>Draper(https://github.com/drapergem/draper) が、具体的にどういったロジックでDecoratorクラスを探索するかを調べた。  バージョンは v4.0.1 。 想定する状況次のように、decorate メソッドをActiveRecordのオブジェクトに対して呼び出す状況を想定する。rubyUser.last.deco</description><pubDate>Sat, 11 Jul 2020 00:00:00 GMT</pubDate></item><item><title>instance_doubleとinstance_spyの使い分け</title><link>https://h3pei.tech/articles/2020-07-04-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-07-04-01/</guid><description>RSpecの instance_double(https://rspec.info/documentation/3.9/rspec-mocks/RSpec/Mocks/ExampleMethods.htmlinstance_double-instance_method) と instance_spy(https://rspec.info/documentation/3.9/r</description><pubDate>Sat, 04 Jul 2020 00:00:00 GMT</pubDate></item><item><title>IIJmioひかりのインターネットが遅くなってきたので、ルータを変えて接続方式もIPoEに変えたらかなり速くなった</title><link>https://h3pei.tech/articles/2020-04-19-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-04-19-01/</guid><description>自分はインターネット接続サービスとして IIJmioひかり(https://www.iijmio.jp/imh/) を使っているのだが、ここ最近どうも速度が遅いなぁと感じていた。特に夕方以降は遅い。以下は、インターネット回線の速度テストができる fast.com(https://fast.com/ja/) で計測した結果である。!2020-04-19-01.png(/asset</description><pubDate>Sun, 19 Apr 2020 00:00:00 GMT</pubDate></item><item><title>git resetをちゃんと理解する</title><link>https://h3pei.tech/articles/2020-04-12-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-04-12-01/</guid><description>はじめに過去を振り返ってみて、gitの理解が一段階深まったなと感じたのはgitの HEAD の概念を理解したときだった。そしてそのHEADと密接に関連しているのが git reset コマンドだと思う。なのでgit resetコマンドをちゃんと理解できればHEADの概念の理解も進み、gitの理解も深まるのではないかと考えた。ということで、この記事ではgit reset</description><pubDate>Sun, 12 Apr 2020 00:00:00 GMT</pubDate></item><item><title>【Rails】ActiveRecordでJOIN先のテーブルのカラムで絞り込む</title><link>https://h3pei.tech/articles/2020-04-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2020-04-11-01/</guid><description>includes(https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.htmlmethod-i-includes) や joins(https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.htmlmethod-i-joins) でテーブルをJO</description><pubDate>Sat, 11 Apr 2020 00:00:00 GMT</pubDate></item><item><title>AWSアカウントとIAMユーザ</title><link>https://h3pei.tech/articles/2019-12-22-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-12-22-01/</guid><description>AWSのアカウントとかユーザといった概念をちゃんと理解できていなかったので調べてポイントになりそうなところだけ整理した。 AWSアカウント、ルートユーザ- 「AWSを使うぞ」となったらまずアカウント登録が必要になるが、このとき最初に作成するアカウントがAWSアカウント。TwitterやFacebookのようなWebサービスを使うときと同じように最初にアカウントを作るが、それと同じような</description><pubDate>Sun, 22 Dec 2019 00:00:00 GMT</pubDate></item><item><title>aws-sdk-s3 for Rubyを使ってみた</title><link>https://h3pei.tech/articles/2019-12-07-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-12-07-01/</guid><description>今更感があるが、Rubyのaws-sdk-s3 gemを使ってS3と戯れた記録を残す。 事前準備Gemとしては aws-sdk-s3(https://rubygems.org/gems/aws-sdk-s3/versions/1.59.0) だけ使えれば良いので、これをGemfileに書く。ruby ./Gemfilesource &quot;https://rubygems</description><pubDate>Sat, 07 Dec 2019 00:00:00 GMT</pubDate></item><item><title>Rails6で導入されたinsert_all、insert_all!、upsert_allを使ってみる</title><link>https://h3pei.tech/articles/2019-12-02-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-12-02-01/</guid><description>Rails6にて insert_all, insert_all!, upsert_all という一括作成・更新の機能が導入された。  https://railsguides.jp/6_0_release_notes.htmlactive-recordこれらのメソッドを、公式のAPIドキュメントを読みつつ手元の環境で実際に使ってみた記録を残す。 環境- ruby 2.</description><pubDate>Mon, 02 Dec 2019 00:00:00 GMT</pubDate></item><item><title>【Ruby】rescueした例外のmessageを上書きしてre-raiseする</title><link>https://h3pei.tech/articles/2019-11-12-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-11-12-01/</guid><description>rescueした例外のmessageを上書きしてre-raiseしたい場合、Exceptionexception を使うとスッキリ書ける。https://docs.ruby-lang.org/ja/latest/method/Exception/i/exception.html 引数を指定しない場合は self を返します。   引数を指定した場合 自身のコピー を生成し Ex</description><pubDate>Tue, 12 Nov 2019 00:00:00 GMT</pubDate></item><item><title>『雰囲気で使わずきちんと理解する！整理してOAuth2.0を使うためのチュートリアルガイド』がわかりやすくてオススメ</title><link>https://h3pei.tech/articles/2019-09-30-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-09-30-01/</guid><description>最近読んで良かった技術本『雰囲気で使わずきちんと理解する！整理してOAuth2.0を使うためのチュートリアルガイド』の紹介をしたい。&lt;AmazonAffiliate asin=&quot;B07XT8H2YG&quot; itemName=&quot;雰囲気で使わずきちんと理解する！整理してOAuth2.0を使うためのチュートリアルガイド (技術の泉シリーズ（NextPublishing）)&quot; / 読み始めた背景</description><pubDate>Mon, 30 Sep 2019 00:00:00 GMT</pubDate></item><item><title>現場で使えるRSpecパターン集 for Rails App</title><link>https://h3pei.tech/articles/2019-08-29-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-08-29-01/</guid><description>はじめにRSpecは慣れるととても手に馴染むテスティングツールだが、割と癖があってRSpecでテストを書くのに苦労している人も多いのではないだろうか。  自分はまさにそうで、書きたいテストは決まっていてもそれをどう書けばよいか、というところで当初は時間がかかっていたように思う。  実際に実務で何年かRSpecを使ってきて、よく使うパターン（型）のようなものができてきたので、それら</description><pubDate>Thu, 29 Aug 2019 00:00:00 GMT</pubDate></item><item><title>ActiveSupport::Concernが裏でやっていること</title><link>https://h3pei.tech/articles/2019-05-06-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-05-06-01/</guid><description>ActiveSupport::Concern(https://api.rubyonrails.org/classes/ActiveSupport/Concern.html) を extend したモジュールは以下の機能が使えるようになる。- class_methods do .. end ブロックに定義したメソッドをクラスメソッドとして、include する側のクラスに取り込む-</description><pubDate>Mon, 06 May 2019 00:00:00 GMT</pubDate></item><item><title>Rails の Flash の機能はどのように実現されているか</title><link>https://h3pei.tech/articles/2019-05-01-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-05-01-01/</guid><description>Rails には Flash という機能がある。Flash の機能は次の通り。 flashはセッションの中の特殊な部分であり、リクエストごとにクリアされます。つまりflashは「直後のリクエスト」でのみ参照可能になるという特徴を持ち、エラーメッセージをビューに渡したりするのに便利です。 https://railsguides.jp/action_controller_overview.h</description><pubDate>Wed, 01 May 2019 00:00:00 GMT</pubDate></item><item><title>ecs-deployを使ったAmazon ECSへのデプロイの裏側</title><link>https://h3pei.tech/articles/2019-04-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-04-14-01/</guid><description>ecs-deploy というデプロイツールがあり、これを使うと簡単に Amazon ECS へデプロイができる。  https://github.com/silinternational/ecs-deployDockerイメージを更新するだけであれば以下のように、コマンド一発でデプロイをいい感じにやってくれる。ecs-deploy --cluster my-cluster -</description><pubDate>Sun, 14 Apr 2019 00:00:00 GMT</pubDate></item><item><title>if-then-elseを使うかガード節を使うかの判断基準</title><link>https://h3pei.tech/articles/2019-03-31-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-03-31-01/</guid><description>最初に結論から- 一方が正常な振る舞い、もう一方は特殊な振る舞いと考えられる場合はガード節を使う- 双方とも同等に正常な振る舞いと考えられる場合は、if-then-else構文を使う 詳細 ガード節の有効性プログラムを書いていると、様々な条件が考えられ、それらを考慮したコードを書かなければならないというケースが往々にして発生するだろう。  このような場</description><pubDate>Sun, 31 Mar 2019 00:00:00 GMT</pubDate></item><item><title>RubyのProcは `#call` 以外でも実行できる</title><link>https://h3pei.tech/articles/2019-03-07-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-03-07-01/</guid><description>Procオブジェクトは call を使って実行することが多いと思う。rubyfn = Proc.new { |v| puts v }fn.call(&quot;Hello, world!&quot;) = &quot;Hello, world!&quot;しかし、次のように  を使っても実行できるのだ。rubyfn = Proc.new { |v| puts v }fn&quot;He</description><pubDate>Thu, 07 Mar 2019 00:00:00 GMT</pubDate></item><item><title>VSCodeでマウスを使わずにパネルサイズを調整する</title><link>https://h3pei.tech/articles/2019-03-05-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-03-05-01/</guid><description>自分は左側にエディタ、右側にターミナルという配置で作業をすることが多いのだけれど、作業中にパネルのサイズを調整したくなることがよくある。!2019-03-05-01.png(/assets/2019-03-05-01.png &apos;左にエディタ、右にターミナルの図&apos;)  このサイズの調整をマウスを使わずに行いたい！VSCodeにそういった機能はないかなぁ〜と思って探してみたら見つかった</description><pubDate>Tue, 05 Mar 2019 00:00:00 GMT</pubDate></item><item><title>gRPC × Rubyのチュートリアルをカスタムしてやってみた</title><link>https://h3pei.tech/articles/2019-03-04-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-03-04-01/</guid><description>gRPC公式のRuby版チュートリアルを参考に、手元で試してみた記録。  gRPCで開発をするときの全体感みたいなものをつかめたらいいなぁくらいのところからスタート。https://grpc.io/docs/tutorials/basic/ruby.html Protocol Buffersでサービスの定義を書くまず一番最初にやることは、Protocl Buffersを用いてサー</description><pubDate>Mon, 04 Mar 2019 00:00:00 GMT</pubDate></item><item><title>Rubyライブラリでよく見る `configure do ... end` による設定管理の仕組み</title><link>https://h3pei.tech/articles/2019-02-25-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-02-25-01/</guid><description>Rubyのライブラリで設定を管理するときに、次のようなパターンのコードをよく見ると思う。rubyXyz.configure do |config|  config.xxx = &apos;xxx&apos;  config.yyy = &apos;yyy&apos;endこのパターンを採用しているライブラリの1つである gruf(https://github.com/bigcommerce/gruf)</description><pubDate>Mon, 25 Feb 2019 00:00:00 GMT</pubDate></item><item><title>Rubyの`&amp;&amp;`と`||`</title><link>https://h3pei.tech/articles/2019-02-19-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-02-19-01/</guid><description>&amp;&amp;&amp;&amp; をよく使うのは、if 式などでの条件を書くときだろう。つまるところ真か偽の結果を得ることを期待していると思う。rubycond1 = truecond2 = falsecond3 = trueif cond1 &amp;&amp; cond2   実行されないendif cond1 &amp;&amp; cond3   実行されるendここで気をつけたい</description><pubDate>Tue, 19 Feb 2019 00:00:00 GMT</pubDate></item><item><title>mysqldumpに`--complete-insert`オプションをつけるとカラム名を含むINSERT文を出力してくれる</title><link>https://h3pei.tech/articles/2019-02-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-02-14-01/</guid><description>mysqldumpコマンドのデフォルト状態で出力されるINSERT文にはカラム名の情報が含まれていない。以下例（※ 見やすいようにインデントしている）。sqlINSERT INTO   users VALUES   (1,&apos;taro&apos;,20,&apos;male&apos;,1,&apos;2019-02-13 23:44:02&apos;,&apos;2019-02-13 23:44:02&apos;),  (2,&apos;jiro&apos;,3</description><pubDate>Thu, 14 Feb 2019 00:00:00 GMT</pubDate></item><item><title>RSpec with Railsでテスト時のデータはどのように削除されているか</title><link>https://h3pei.tech/articles/2019-02-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2019-02-11-01/</guid><description>RailsアプリでRSpecを使うと通常example実行のたびにデータが削除されるようになっているが、これが具体的にどのように行われているかについて。検証環境は以下の通り。- ruby 2.6.1p33 (2019-01-30 revision 66950) x86_64-darwin16- rails 5.2.2- rspec 3.8.0- rspec-rails 3.8.2</description><pubDate>Mon, 11 Feb 2019 00:00:00 GMT</pubDate></item><item><title>書き出して自分と対話・思考しながら仕事を進めるスタイルとそれについて考えたこと</title><link>https://h3pei.tech/articles/2018-10-20-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-10-20-01/</guid><description>ふと考えたことをとりとめもなく書いてみる。 書きながら自分と対話・思考しながら物事を進めるスタイル自分は仕事をするときに、作業の記録を書き残しながら進めることが多い。書いているのは以下のような内容。- 何のためにやるのか- どうしてやることになったのか- どうやって実現するか- 実際にどんな作業をしたか今書いて気づいたけど、目的、背景、実現手段、作業記録という構成になる</description><pubDate>Sat, 20 Oct 2018 00:00:00 GMT</pubDate></item><item><title>「既存のコードがそうなっているから」は逃げる理由になりがち</title><link>https://h3pei.tech/articles/2018-05-09-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-05-09-01/</guid><description>何らかの追加実装の作業をしているとき、往々にして既存のコードと類似した実装をする、あるいはそうできる場面に遭遇することがあると思う。  このような時、既存のコードと同じパターン・同じ構成で実装するというのは1つの選択肢になる。なぜならそのように書いたコードは、現在のコードとの調和を保ちつつも「既に動いている」という実績を持ち合わせているからだ。多くを考えること無く、短時間で動くコードを実装</description><pubDate>Wed, 09 May 2018 00:00:00 GMT</pubDate></item><item><title>【Rails】データベース名を明示せずにActiveRecordでMySQLに接続する</title><link>https://h3pei.tech/articles/2018-04-16-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-04-16-01/</guid><description>環境- Rails 5.1.6- MySQL 5.7.21 状況データベースはまだ存在しないが、ActiveRecordでMySQLへの接続だけは確立したい。何も考えずに次のようなコードを実行すると...rubyApplicationRecord.connection.execute(&quot;&lt;なんかSQL&quot;)次のようなエラーが起こる。ru</description><pubDate>Mon, 16 Apr 2018 00:00:00 GMT</pubDate></item><item><title>【Rails】app/以下に新規作成したディレクトリのファイルが読み込まれない件</title><link>https://h3pei.tech/articles/2018-04-15-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-04-15-01/</guid><description>結論：springの再起動が必要だった あらましRuby On Railsアプリケーションの開発中、app/以下に新しくvalidatorsというディレクトリを作ることになった。  最近のRailsではapp以下のファイルを自動で読み込んでくれるようになっているので、追加の設定は不要だ。Railsガイドにも次のように書かれている。 ところで、Railsに</description><pubDate>Sun, 15 Apr 2018 00:00:00 GMT</pubDate></item><item><title>draperを使ってみた</title><link>https://h3pei.tech/articles/2018-02-10-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-02-10-01/</guid><description>draper(https://github.com/drapergem/draper) というデコレーター（またはプレゼンター）の機能を持つGemを使ってみた記録。 draperとは- draper is ...  - ViewModel for Rails  - Railsアプリケーションにオブジェクト指向なプレゼンテーション層を追加する  - Modelにメンテナンス性の</description><pubDate>Sat, 10 Feb 2018 00:00:00 GMT</pubDate></item><item><title>ActiveModel::Serializersを使ってみた</title><link>https://h3pei.tech/articles/2018-02-03-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-02-03-01/</guid><description>ActiveModel::Serializers(AMS) という、出力するJSONをいい感じにコントロールできるというライブラリを使ってみた記録。多分、RailsでAPIを作るときなんかによく使われるライブラリ、くらいの認識からスタートした。https://github.com/rails-api/active_model_serializers 出鼻をくじかれる「よーし使ってみ</description><pubDate>Sat, 03 Feb 2018 00:00:00 GMT</pubDate></item><item><title>SOP（Same Origin Policy）とCORS（Cross Origin Resource Sharing）について調べた</title><link>https://h3pei.tech/articles/2018-01-06-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2018-01-06-01/</guid><description>SOP（Same Origin Policy）の理解が怪しいなぁと思ったのでちゃんとした仕様を調べた。  同時にCORS（Cross Origin Resource Sharing）についても調べることになったのでまとめて整理した。 SOP（Same Origin Policy: 同一生成元ポリシー)- Webブラウザなどのセキュリティ機能の1つ- ある オリジン から読み</description><pubDate>Sat, 06 Jan 2018 00:00:00 GMT</pubDate></item><item><title>属人化の排除と責任感のトレードオフについて</title><link>https://h3pei.tech/articles/2017-09-26-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-09-26-01/</guid><description>スクラムでプロダクト開発をするようになって、約1年が経過した。スクラムは実によくできたフレームワークであり、スクラムから得られたものはたくさんある。例えば.. 今自分がやっていることに対して納得感を持って取り組むことができるようになった 発生した問題に対して、その場しのぎではなく仕組みで解決することができるようになった 同じゴールを共有するようになったことで、&quot;チームでやってい</description><pubDate>Tue, 26 Sep 2017 00:00:00 GMT</pubDate></item><item><title>三浦半島  自転車旅行記</title><link>https://h3pei.tech/articles/2017-09-10-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-09-10-01/</guid><description>三浦半島を自転車で巡ってきたのでその記録を残す。 三浦半島とは 三浦半島（みうらはんとう）は、神奈川県南東部にある半島である。※ from: Wikipedia(https://ja.wikipedia.org/wiki/三浦半島)地図で言うと大体この辺り。!2017-09-10-01.png(/assets/2017-09-10-01.png) ルート（当</description><pubDate>Sun, 10 Sep 2017 00:00:00 GMT</pubDate></item><item><title>TOEICリスニングの問題が全然わからないので原因と対策を考えてみる</title><link>https://h3pei.tech/articles/2017-08-23-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-08-23-01/</guid><description>あらまし最近TOEICのリスニング問題を解いているのだが、びっくりするくらい全然わからない。  これはアカンということで自分なりに原因と対策を考えてみたい。 解けないのはPart3とPart4TOEICのリスニングは全部で4つのPartから構成されるようだ。- Part1: 写真描写問題- Part2: 応答問題- Part3: 会話問題- Part4: 説明文問</description><pubDate>Wed, 23 Aug 2017 00:00:00 GMT</pubDate></item><item><title>「成るようになる」のではなく「人事を尽くして天命を待ち」たい</title><link>https://h3pei.tech/articles/2017-08-16-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-08-16-01/</guid><description>成るようになる いろいろと気を揉んだり焦ったりしなくても物事はうまい具合に進行する、流れに任せてしまえばよい、といった意味合いで用いられる表現。「ケセラセラ」とも言う。※ from: 成るようになるとは - 日本語表現辞典 Weblio辞書(http://www.weblio.jp/content/成るようになる) 人事を尽くして天命を待つ 人事を尽くして天命</description><pubDate>Wed, 16 Aug 2017 00:00:00 GMT</pubDate></item><item><title>今更ながらベイマックスを見たら脳が震えた</title><link>https://h3pei.tech/articles/2017-06-17-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-06-17-01/</guid><description>&lt;AmazonAffiliate asin=&quot;B00TX3AZOG&quot; itemName=&quot;ベイマックス MovieNEX ブルーレイ+DVD+デジタルコピー(クラウド対応)+MovieNEXワールド Blu-ray&quot; /中身のない日記です。AmazonでKindle本50%OFFセールがやっていたので適当に気になった本を数冊買ったところ、Amazonビデオの割引クーポンが送られて</description><pubDate>Sat, 17 Jun 2017 00:00:00 GMT</pubDate></item><item><title>LPICレベル1  合格体験記</title><link>https://h3pei.tech/articles/2017-03-30-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-03-30-01/</guid><description>LPICレベル1(http://www.lpi.or.jp/examination/level1.shtml)を受験し、無事に合格できたので感想やら何やらを書いていく。 受験の動機ことのはじまりはSREに興味があって、SREにどんな技術セットが求められるかを調べたりしていたところ(http://qiita.com/h3pei/items/7bf8db3b18980277db52</description><pubDate>Thu, 30 Mar 2017 00:00:00 GMT</pubDate></item><item><title>『Web開発者のための大規模サービス技術入門』がめっちゃ良かった</title><link>https://h3pei.tech/articles/2017-01-01-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2017-01-01-01/</guid><description>『Web開発者のための大規模サービス技術入門』を読んだ。とても勉強になった。&lt;AmazonAffiliate asin=&quot;4774143073&quot; itemName=&quot;Web開発者のための大規模サービス技術入門 ―データ構造、メモリ、OS、DB、サーバ/インフラ (WEB+DB PRESS plusシリーズ)&quot; /特に興味深く読めたのは次の部分。- ハードウェアレベルの話（第2回）</description><pubDate>Sun, 01 Jan 2017 00:00:00 GMT</pubDate></item><item><title>『知識ゼロからの宇宙入門』を読んだ</title><link>https://h3pei.tech/articles/2016-11-21-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-11-21-01/</guid><description>『知識ゼロからの宇宙入門』を読んだ。&lt;AmazonAffiliate asin=&quot;4344901924&quot; itemName=&quot;知識ゼロからの宇宙入門&quot; / 読みはじめた動機突然、宇宙について知りたくなった。その理由は自分でもよくわからない。 感想斜め読みというか、ちょっと考えたくなるような場所でも無視してどんどん読み進めたので、そんな読み方での感想を書く。  まず全</description><pubDate>Mon, 21 Nov 2016 00:00:00 GMT</pubDate></item><item><title>初めてのスペイン旅行を楽しむためのスペイン基礎知識</title><link>https://h3pei.tech/articles/2016-11-20-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-11-20-01/</guid><description>...っていうタイトルの記事があったら嬉しいな〜、と思って調べたけど無いようなので書いた。この記事のスコープは、スペインのかなり基礎的な知識。※ 注意：記事の内容がタイトル通りになっている保証はありません内容のほとんどは、以下の書籍と https://ja.wikipedia.org/wiki/スペイン から引用している。&lt;AmazonAffiliate asin=&quot;44780488</description><pubDate>Sun, 20 Nov 2016 00:00:00 GMT</pubDate></item><item><title>地球に季節ができる仕組みについて調べた</title><link>https://h3pei.tech/articles/2016-11-19-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-11-19-01/</guid><description>&lt;AmazonAffiliate asin=&quot;4344901924&quot; itemName=&quot;知識ゼロからの宇宙入門&quot; /『知識ゼロからの宇宙入門』という本の中に「地球に季節がある理由」という章があったけど、ちゃんと理解するために追加でいくつか調べたのでその時の記録を残す。他人向けに書いてないので、親切な内容にはなっていないと思う。 なぜ地球に季節があるのか答え：太陽の照り方に</description><pubDate>Sat, 19 Nov 2016 00:00:00 GMT</pubDate></item><item><title>『話したくなる！つかえる物理』を読んだ</title><link>https://h3pei.tech/articles/2016-11-16-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-11-16-01/</guid><description>『話したくなる！つかえる物理』という本を読んだ。&lt;AmazonAffiliate asin=&quot;4756915965&quot; itemName=&quot;話したくなる! つかえる物理 (アスカビジネス)&quot; / 読みはじめた動機とにかく物理まわりの知識無さすぎてマズイな、って感じたのがきっかけ。万有引力の法則とかエネルギーとか質量保存の法則とか電気とか、ほとんど覚えていないし誰かに説明できそうにも</description><pubDate>Wed, 16 Nov 2016 00:00:00 GMT</pubDate></item><item><title>Tokyo RubyKaigi11に行ってきた</title><link>https://h3pei.tech/articles/2016-05-29-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-05-29-01/</guid><description>http://regional.rubykaigi.org/tokyo11/2016年5月28日に秋葉原コンベンションホールで開催されたTokyo RubyKaigi 11に行ってきた。満足度の高い勉強会だったので簡単に感想を残しておく。 発表一覧1. Streem2. mruby/c3. Rubyに型があると便利か4. 最速ウェブサーバの作り方5. アプリケーションへのR</description><pubDate>Sun, 29 May 2016 00:00:00 GMT</pubDate></item><item><title>心労業務</title><link>https://h3pei.tech/articles/2016-01-21-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-01-21-01/</guid><description>最近やっているプロジェクトで最高に心労の高まりを感じたギョームについて書く。 v2移行時のDB構成変更に失敗。残ってしまった不要なレコードを手動で削除するv2移行時にDB構成を結構変えた。特に大きな変更が、論理削除から物理削除に変更した部分だった。これ、物理削除に移行するタイミングで削除フラグが立っているレコードを削除しないといけなかったんだけどすっかり忘れてました。こ</description><pubDate>Thu, 21 Jan 2016 00:00:00 GMT</pubDate></item><item><title>2015年の振り返り</title><link>https://h3pei.tech/articles/2016-01-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-01-11-01/</guid><description>少し時間が経ってしまったが、以前自分が書いた振り返りブログを見返すと当時のことを鮮明に思い出せて「ああ、こんなこともあったなぁ。こんな感想持っていたのかー。」という感じになっておもしろかったので、2015年分の振り返りも書くことにした。時系列に沿いつつ、特に印象に残ったテーマ単位で振り返る。 古くなり手を付けられなくなったレガシーコードの大幅リファクタリング開発から年数が経ち、日に</description><pubDate>Mon, 11 Jan 2016 00:00:00 GMT</pubDate></item><item><title>DBとかパフォーマンスとか</title><link>https://h3pei.tech/articles/2016-01-09-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-01-09-01/</guid><description>チラ裏です。 そのカラムにインデックスを張るべきか否か、そしてそれはどう判断すべきなのか- かなり頻繁にwhere句として使われる- カーディナリティは極端に小さい（現状2パターンしか無い。直近増える予定もない）...というカラムがあった。時間が無いなりに調べた結果、このカラムにはindex不要だと思い貼らないことにした。これを、理論からだけじゃなくて実際の測定値から判断した</description><pubDate>Sat, 09 Jan 2016 00:00:00 GMT</pubDate></item><item><title>詰まったことリスト2</title><link>https://h3pei.tech/articles/2016-01-07-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-01-07-01/</guid><description>前回(/articles/2016-01-06-01/) の続き。よくもまあここまで詰まりポイントがボンボン出てくるもんだと自分の無能っぷりに呆れてきたところです。この無能感を越え、強くなりたい。 activerecord-importの罠activerecord-importはINSERTのクエリを1SQLにまとめて実行してくれるGem。「Rails insert 高速化</description><pubDate>Thu, 07 Jan 2016 00:00:00 GMT</pubDate></item><item><title>詰まったことリスト</title><link>https://h3pei.tech/articles/2016-01-06-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-01-06-01/</guid><description>最近、業務でRailsアプリケーション開発をしている。が！Railsに限らずだが何かと行き詰まってばかりなので忘れないうちにこの怒りと苦しみの元となったネタどもをリストアップしておきたいと思う。※ ほとんど単なる調査不足・知識不足が原因だと思います ActiveRecord関連① パフォーマンス改善のため、User.where(type:1)のようにして取得したUserオブ</description><pubDate>Wed, 06 Jan 2016 00:00:00 GMT</pubDate></item><item><title>ブログのデザインを変更した</title><link>https://h3pei.tech/articles/2016-01-03-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2016-01-03-01/</guid><description>新年なのでなんとなく変えてみた。公式テーマを使いつつ、font-familyだけカスタマイズした。</description><pubDate>Sun, 03 Jan 2016 00:00:00 GMT</pubDate></item><item><title>YAPC::Asia Tokyo 2015に行ってきた</title><link>https://h3pei.tech/articles/2015-08-31-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2015-08-31-01/</guid><description>8/22(Fri)、8/23(Stu)の2日間、YAPC::Asia Tokyoに参加してきた。YAPCについては、一昨年・昨年とはてブやTwitterで盛り上がっているのを見ていて、一度は行ってみたいなぁと思っていたら今年が最後らしいという情報を聞きつけて勢いで申し込んだ。なので、このYAPC::Asia Tokyo 2015が自分にとっては最初で最後のYAPC（になりそう）。参加レポー</description><pubDate>Mon, 31 Aug 2015 00:00:00 GMT</pubDate></item><item><title>pgrep、pkill</title><link>https://h3pei.tech/articles/2015-03-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2015-03-14-01/</guid><description>pgrep- 現在実行中のプロセスからパターンにマッチするプロセスのプロセスIDを標準出力にリストする- pgrep pattern- fオプションでマッチさせる範囲をコマンドライン全体にする- lオプションで結果にプロセス名も表示させる- uオプションで実行ユーザIDを指定する 使ってみる以下のようにrubyプロセスが3つ存在したとする。$ ps</description><pubDate>Sat, 14 Mar 2015 00:00:00 GMT</pubDate></item><item><title>TCPひとめぐり</title><link>https://h3pei.tech/articles/2014-07-12-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-07-12-01/</guid><description>業務でTCPの知識が無いことで困ることが増えてきたので、『マスタリングTCP/IP』を中心にTCPの概要をひとさらいした。今回はなんとなくでスライド形式でまとめてみたけれど、単純なテキストよりも知識の整理にはなっているような気がした。https://speakerdeck.com/mogulla3/tcphitomeguri次はTCPコネクションの状態遷移について知りたい。</description><pubDate>Sat, 12 Jul 2014 00:00:00 GMT</pubDate></item><item><title>HomebrewでVim7.4をluaオプション付きでインストールする</title><link>https://h3pei.tech/articles/2014-06-29-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-06-29-01/</guid><description>単純に7.4をインストールするだけなら以下のコマンドでOK。brew install vim  ただし、上のコマンドでインストールするとluaオプションがついていないため、neocomplete(https://github.com/Shougo/neocomplete.vim)が使えない。  neocompleteをインストールしてvimを起動すると、以下のようなメ</description><pubDate>Sun, 29 Jun 2014 00:00:00 GMT</pubDate></item><item><title>Linuxにおけるメモリ管理</title><link>https://h3pei.tech/articles/2014-06-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-06-14-01/</guid><description>DBサーバ上でおもむろにfree、sar、topコマンド等でメモリの使用率を見てみたところ、メモリの空きがほとんど無くなっていることに気がついて（正確にはそう見えて）、焦りながら色々調べた結果をまとめる。 Linuxのページキャッシュの仕組みまず、メモリの使用率を正しく見るためには、Linuxのページキャッシュという機能について知らないといけなかった。 ページキャッシュとは</description><pubDate>Sat, 14 Jun 2014 00:00:00 GMT</pubDate></item><item><title>RSpec + Guardで自動テスト実行環境を作る</title><link>https://h3pei.tech/articles/2014-05-24-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-05-24-01/</guid><description>タイトル通り。  TDDのお試し環境として自動でテストが実行される環境を作りたかったので、構築した。１．作業ディレクトリを作るbashmkdir fizzbuzzcd fizzbuzz２．Gemfileを作るbundle init３．Gemfileを編集するruby A sample Gemfileso</description><pubDate>Sat, 24 May 2014 00:00:00 GMT</pubDate></item><item><title>【Chef】ローカルのクックブックを削除する</title><link>https://h3pei.tech/articles/2014-03-23-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-03-23-01/</guid><description>※ 環境MacOS 10.7.5  Chef 11.10.4結論：-zオプションをつけてknife cookbook deleteを実行すれば削除できるおもむろに$ knife cookbook create &lt;cookbook-nameと打ってクックブックを作ったんだけど、cookbook-nameを間違えて作成してしまった。削除したかったので、</description><pubDate>Sun, 23 Mar 2014 00:00:00 GMT</pubDate></item><item><title>新卒で入社してからの1年間を振り返ってみる</title><link>https://h3pei.tech/articles/2014-03-21-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-03-21-01/</guid><description>2013年4月に新卒で入社してから大体1年くらい経ったので1年間を振り返ってみる。殆ど技術的な仕事の話。  今ではできるようになっていることもあるけど、その時その時は初めて知ることで、理解するので精一杯だったことなどを思い出している。 1. WebAPI開発研修を終えて、一番最初に担当したのは新規サービスのWebAPI開発だった。  これを、同じチームに配属された新卒メンバー4人</description><pubDate>Fri, 21 Mar 2014 00:00:00 GMT</pubDate></item><item><title>【Ruby】requireメソッドの使い方メモ</title><link>https://h3pei.tech/articles/2014-02-23-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-02-23-01/</guid><description>sinatraとかnokogiriのような外部ライブラリを読み込みたい時と、同じプロジェクト内にある自身が作ったファイル等を読み込みたい時の２パターンがあって、その時にrequireをどう使い分ければいいか調べたのでメモ。環境：ruby 2.0.0p247 (2013-06-27 revision 41674) x86_64-darwin11.4.2 requireメソッドの挙動</description><pubDate>Sun, 23 Feb 2014 00:00:00 GMT</pubDate></item><item><title>apt-get/apt-cacheとaptitudeの違い</title><link>https://h3pei.tech/articles/2014-02-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-02-11-01/</guid><description>Ubuntuの情報を調べていると、apt-getとaptitudeの両方を見かけることが多いので気になって調べてみた。 全体 apt-get/apt-cacheはコマンドラインのユーザーインターフェースのみを提供する aptitudeはコマンドラインユーザーインターフェースに加え、フルスクリーンのインタラクティブなテキストユーザーインターフェースを提供する→ aptitu</description><pubDate>Tue, 11 Feb 2014 00:00:00 GMT</pubDate></item><item><title>Google Chromeのinput要素にborder-radiusをつけると現れる影を消す方法</title><link>https://h3pei.tech/articles/2014-02-08-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-02-08-01/</guid><description>結論適当なborderをつけると消える 記録動作環境 MacOS X 10.7.5 Google Chrome バージョン 31.0.1650.63タイトル通り、Google Chromeのinput要素（type属性はtext）にborder-radiusをつけると謎の影のようなものが現れたのでこれを消す方法について。これが普通の状態のinput要素。</description><pubDate>Sat, 08 Feb 2014 00:00:00 GMT</pubDate></item><item><title>HTTPリファラについて</title><link>https://h3pei.tech/articles/2014-02-02-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-02-02-01/</guid><description>リファラとは何かhttp://e-words.jp/w/E383AAE38395E382A1E383A9.html あるWebページのリンクをクリックして別のページに移動した時の、リンク元のページのこと。Webサーバーのアクセスログに記録される項目の1つ。   これを辿っていくと閲覧者がどこのサイトから訪問したのか、また、サイト内でどのような軌跡をたどったのかなどを調べることがで</description><pubDate>Sun, 02 Feb 2014 00:00:00 GMT</pubDate></item><item><title>PHPのビルド? Phing?</title><link>https://h3pei.tech/articles/2014-02-01-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-02-01-01/</guid><description>ビルドまわりについては 過去に調べた(/articles/2013-08-11-02/) ことがある。しかし、PHPに対してビルドという言葉が使われている記事などを見かけたり、聞いたりすることが多くなって、意味がわからなくなってきた。(PHPそのものに対してであればわかるけど、多分そうではない)ビルド=コンパイル+リンクだと思っている。けど、PHPコードをコンパイルとかリンクする意味</description><pubDate>Sat, 01 Feb 2014 00:00:00 GMT</pubDate></item><item><title>cocos2d-xの概要</title><link>https://h3pei.tech/articles/2014-01-20-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2014-01-20-01/</guid><description>最近は自分用のWikiにメモやtipsをとることが多くなって、ブログの更新をしていなかった。でもどんなに些細な内容でもどこかの誰かに役立つ可能性があると思ったので、メモでも作業ログでも何でもwikiとブログの両方に残していきたいと思った。「スキルなし・実績なし」 32歳窓際エンジニアがシリコンバレーで働くようになるまでhttp://www.slideshare.net/t26v07</description><pubDate>Mon, 20 Jan 2014 00:00:00 GMT</pubDate></item><item><title>ポートベースのバーチャルホストを設定する</title><link>https://h3pei.tech/articles/2013-09-22-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-09-22-01/</guid><description>ポートベースのバーチャルホストの設定をした時の作業メモ。IPアドレスは同じに、ポート番号だけでリクエストを振り分けて表示するページを切り替える。今回は、- 192.168.56.101:5000- 192.168.56.101:7000- 192.168.56.101:9000のようなURLにリクエストをしたときに、それぞれ異なるレスポンスを返すようにする。apacheの設定フ</description><pubDate>Sun, 22 Sep 2013 00:00:00 GMT</pubDate></item><item><title>mod_rewriteを使って、リクエスト時の拡張子を消す on Apache2.2 -Ubuntu12.04</title><link>https://h3pei.tech/articles/2013-09-17-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-09-17-01/</guid><description>mod_rewriteを使ってリクエストを制御する練習。とりあえずよく使いそうな「ファイルの拡張子を消す」処理を実現してみる。今回対象とするのは「html」拡張子。 必要なモジュールの確認をする(1) rewrite_modulebash$sudo apache2ctl -M | grep rewrite→ 見つからない インストールをする前に、組み</description><pubDate>Tue, 17 Sep 2013 00:00:00 GMT</pubDate></item><item><title>Ubuntu12.04環境のApache2.2にWebDAVのインストール</title><link>https://h3pei.tech/articles/2013-09-16-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-09-16-02/</guid><description>Digest認証に続いて、WebDAVのインストールと設定を行った。設定までのメモ。 WebDAV（Web-based Distributed Authoring and Versioning）とはWebDAVはHTTP1.1の拡張プロトコルで、Webサーバー上のコンテンツを管理できるよう、リモートファイルのアップデートや削除といった操作が行える。WebDAVに対応したWebサーバーな</description><pubDate>Mon, 16 Sep 2013 00:00:00 GMT</pubDate></item><item><title>Ubuntu12.04環境のApache2.2にDigest認証を設定する</title><link>https://h3pei.tech/articles/2013-09-16-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-09-16-01/</guid><description>Digest認証を設定するまでのメモ。今までRedHat系しか触ったことが無かったので色々新鮮だった。 Basic認証とDigest認証の違いBasic認証とDigest認証の違いは、「認証情報を暗号化するか否か」という点にある。Basic認証はプレインテキストで書かれた認証情報をMIMEエンコードしただけで、デコードが簡単に行える。Digest認証はMD5で暗号化され、かつチャレ</description><pubDate>Mon, 16 Sep 2013 00:00:00 GMT</pubDate></item><item><title>surround.vimことはじめ</title><link>https://h3pei.tech/articles/2013-08-17-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-08-17-01/</guid><description>surround.vimを導入した。  とりあえず、基本的な使い方をいくつかのブログ記事を参考にまとめておいた。 surround.vim概要テキストを囲うモノを編集するプラグイン。テキストオブジェクトの操作を強化する感じ。 インストールNeoBundleを使った場合のインストール方法。以下の1行を.vimrcに追記。vimNeoBundle &apos;tpope/</description><pubDate>Sat, 17 Aug 2013 00:00:00 GMT</pubDate></item><item><title>ビルドとかコンパイルとかリンクとか</title><link>https://h3pei.tech/articles/2013-08-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-08-11-01/</guid><description>「ビルド」という言葉がどんな意味を指すのか、しっかりと理解していなかった。コンパイルと何が違うのかもよくわかってなかったし、人に聞かれたら確実に答えらないと思った。というわけで、調べてみた。まずは定義から調べた。安定のe-words.jp様から拝借。 ビルド (build) ソースコードのコンパイルやライブラリのリンクなどを行い、最終的な実行可能ファイルを作成すること。また、</description><pubDate>Sun, 11 Aug 2013 00:00:00 GMT</pubDate></item><item><title>sudoについて勘違いしていたこと</title><link>https://h3pei.tech/articles/2013-08-03-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-08-03-01/</guid><description>root権限を得てコマンドを実行するときの動作を通して、勘違いに気がついた。  sudoは 「指定したユーザーでコマンドを実行する」 ものであり、 「指定したユーザーの権限を得て、コマンド実行する」 ものでは無かった。ここを混同していても問題ない場合もあるけれど、問題が生じる場合もあることもある。  例えば、fooユーザーでログインしている状態で、sudoでroot権限を得</description><pubDate>Sat, 03 Aug 2013 00:00:00 GMT</pubDate></item><item><title>【Linux】ハードリンクとシンボリックリンク</title><link>https://h3pei.tech/articles/2013-07-28-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-07-28-01/</guid><description>リンク機能についておさらいをしたのでまとめておく リンク機能とはファイルやディレクトリをコピーせずに、別のファイルまたはディレクトリのように扱うことができる機能のこと ２種類のリンクリンクにはハードリンクとシンボリックリンクの２つがある。 １．ハードリンクオリジナルファイルと新規ファイルは、同じファイル実体を指す。オリジナルファイルも新規ファイルもファイル格</description><pubDate>Sun, 28 Jul 2013 00:00:00 GMT</pubDate></item><item><title>TextViewのclickイベントを、タップした箇所によって振り分ける</title><link>https://h3pei.tech/articles/2013-07-09-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-07-09-02/</guid><description>Android4.2にて。具体的に言うと、1つのTextViewにおいて、左半分をタップした時と右半分をタップした時とでイベントを振り分けたかった。その時の実装手順メモ。!2013-07-09-02-01.png(/assets/2013-07-09-02-01.png)FrameLayoutを利用して、透明のビューを左半分、右半分と配置し、その上にTextViewを重ねることで実装</description><pubDate>Tue, 09 Jul 2013 00:00:00 GMT</pubDate></item><item><title>【Android】TextViewにonClickイベントを付与する</title><link>https://h3pei.tech/articles/2013-07-09-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-07-09-01/</guid><description>Android4.2にて。TextView属性にXMLファイルからonClick属性を付与したもののクリックイベントが発動しなかった。Buttonなどでは普通に動いていたので、TextViewに原因があるようだった。xml&lt;TextView    android:layout_width=&quot;match_parent&quot;    android:layout_height=&quot;match</description><pubDate>Tue, 09 Jul 2013 00:00:00 GMT</pubDate></item><item><title>【Android】可変の文字列リソースを定義する</title><link>https://h3pei.tech/articles/2013-07-07-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-07-07-02/</guid><description>Android4.2にて。可変の文字列リソースを定義する方法は以下。１．文字列リソースファイル（strings.xmlなど）に記述する各要素の値に、出力フォーマット指定子を含める２．文字列を呼び出すときにgetString()メソッドを用い、第一引数に文字列リソース、第二引数以降にバインドする値を書く（getString()はContextクラスのメソッドであるので、Contextから呼び出</description><pubDate>Sun, 07 Jul 2013 00:00:00 GMT</pubDate></item><item><title>AndroidのListViewの区切り線を消す方法と要素ごとのスペースを設定する方法</title><link>https://h3pei.tech/articles/2013-07-07-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-07-07-01/</guid><description>Android4.2系にて。ListViewの各アイテムごとの区切り線を消すには、ListView要素の「android:divider」属性に「@null」を与えることで実現できる。各ListViewの各アイテムごとのスペースを設定するには、ListView要素の「android:dividerHeight」属性に高さを与えることで実現できる。dividerHeight属性は区切り線の高さ（</description><pubDate>Sun, 07 Jul 2013 00:00:00 GMT</pubDate></item><item><title>AndroidのListViewのタップ時の反応を無効化する</title><link>https://h3pei.tech/articles/2013-07-04-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-07-04-01/</guid><description>Android4.2系にて。ListViewの各要素をタップした時に、画面がうす青く光るのを無効化するにはBaseAdapterクラスのisEnabled(int position)をオーバーライドして、返り値としてfalseを返すことで実現できる。javapublic class CustomeListAdapter extends SimpleAdapter {     /</description><pubDate>Thu, 04 Jul 2013 00:00:00 GMT</pubDate></item><item><title>Android Studioでのアプリ開発時の文字化け対策メモ</title><link>https://h3pei.tech/articles/2013-06-29-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-06-29-01/</guid><description>Android Studioを使って開発をしていたところ、logcatやアプリ内で日本語が文字化けしていることに気がついたので、それの対応までのメモ。 １．LogCat上に出力した日本語の文字化けこれに関しては以下の記事どおりに実行したら治った  http://thjap.org/android/android-software/android-studio/1454.html</description><pubDate>Sat, 29 Jun 2013 00:00:00 GMT</pubDate></item><item><title>Permission denied (publickey). fatal: The remote end hung up unexpectedly.</title><link>https://h3pei.tech/articles/2013-06-09-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-06-09-01/</guid><description>公開鍵をセットしたのに、bitbucketからgit pullできない。以下のエラーが吐かれてしまう。Permission denied (publickey).fatal: The remote end hung up unexpectedly.公開鍵はbitbucket上にセットした。秘密鍵もちゃんと.sshディレクトリ上にある。sshdも再起動した。sshg_co</description><pubDate>Sun, 09 Jun 2013 00:00:00 GMT</pubDate></item><item><title>CentOS6.3にApache2.4.4をソースファイルからインストールした時の手順メモ</title><link>https://h3pei.tech/articles/2013-05-23-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-05-23-01/</guid><description>タイトルどおり、CentOS6.3にApache2.4.4をソースファイルからインストールした際の手順を記録しておく。バイナリパッケージからのインストールでは2.2系しかインストールできないようなので、ソースファイルからインストールをした。主に参考にしたのは 『サーバ構築の実際がわかる Apache 実践 運用／管理』 という書籍。その他参考サイト- http://httpd.apa</description><pubDate>Thu, 23 May 2013 00:00:00 GMT</pubDate></item><item><title>技術情報をすばやく検索する方法</title><link>https://h3pei.tech/articles/2013-05-21-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-05-21-01/</guid><description>結論から言うと、はてなブックマークを使って検索をするってだけ。はてなには技術系の人々が多いようなので、技術系の情報が充実している。単純にGoogleやYahooで検索するよりも、はてブ数で信頼度がよくわかるのですばやく求めている情報に辿り着ける。特に、基礎よりも少し発展的なtipsやノウハウ系については良い記事が見つかると感じている。やり方を一言でまとめると以下。『Alfredを</description><pubDate>Tue, 21 May 2013 00:00:00 GMT</pubDate></item><item><title>.vimrc、vimプラグイン管理の見直し</title><link>https://h3pei.tech/articles/2013-05-20-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-05-20-01/</guid><description>エディタにvimを使い始めてかれこれ１年半くらい経った。にも関わらず.vimrcの設定とかプラグイン等、よくわからないままなんとなくで使っていた。このままではいけないと思い、.vimrcの設定やプラグインを見直し始めた（今さら）。 .vimrcの整理まず、コピペでぐちゃぐちゃになっている.vimrcを整理した。それぞれのオプションの効果を確認しつつ、カテゴライズした。はてな</description><pubDate>Mon, 20 May 2013 00:00:00 GMT</pubDate></item><item><title>java.lang.String#charAt()</title><link>https://h3pei.tech/articles/2013-03-24-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-03-24-01/</guid><description>概要指定されたインデックス位置にあるchar値を返す。 定義インターフェース「CharSequence」内のcharAt パラメータindex - char値のインデックス 戻り値文字列内の指定されたインデックス位置にあるchar値 ソースコードjavapublic char charAt(int index) {     //</description><pubDate>Sun, 24 Mar 2013 00:00:00 GMT</pubDate></item><item><title>java.lang.Stringクラスのequalsメソッドのソースコードを読んでみた</title><link>https://h3pei.tech/articles/2013-03-19-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-03-19-01/</guid><description>ソースコードバージョンは1.6。ソースコードを読むのは初めてなので、間違いは多分いっぱいある。java  public boolean equals(Object anObject) {    // (1)    if (this == anObject) {      return true;    }    // (2)    if (anObject in</description><pubDate>Tue, 19 Mar 2013 00:00:00 GMT</pubDate></item><item><title>【Git】リモートブランチ・ローカルブランチの削除方法</title><link>https://h3pei.tech/articles/2013-03-12-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-03-12-01/</guid><description>リモートブランチ- git push --delete リポジトリ名 ブランチ名- git push リポジトリ名 :ブランチ名 例 : originリポジトリのdevelopmentブランチを削除するgit push --delete origin development 例 : または、git push origin :developm</description><pubDate>Tue, 12 Mar 2013 00:00:00 GMT</pubDate></item><item><title>『アルゴリズムとデータ構造』学習ノート：バイナリサーチ</title><link>https://h3pei.tech/articles/2013-02-14-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-14-02/</guid><description>書籍にはJavaで書かれていたのでrubyでバイナリサーチを実装しなおしてみた。ruby -- coding: utf-8 -- numbersは昇順にソート済みであることを前提とするdef binary_search(target, numbers)  left = 0                    左端  right = numbers.length -</description><pubDate>Thu, 14 Feb 2013 00:00:00 GMT</pubDate></item><item><title>『アルゴリズムとデータ構造』学習ノート：リニアサーチ</title><link>https://h3pei.tech/articles/2013-02-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-14-01/</guid><description>書籍にはJavaで書かれていたのでrubyでリニアサーチを実装しなおしてみた。ruby -- coding: utf-8 --def linear_search(numbers, target)  i = 1   リニアサーチの実行。対象が見つかった場合にはそのインデックスを返す  numbers.each do |number|    if number == ta</description><pubDate>Thu, 14 Feb 2013 00:00:00 GMT</pubDate></item><item><title>MySQLのユーザー作成や権限まわりのおさらいをした</title><link>https://h3pei.tech/articles/2013-02-10-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-10-01/</guid><description>MySQLのユーザーの作成方法や権限の設定方法がわからなかったので、おさらいをした。その時のメモというかノート。 パスワードを設定するrootでログインする必要があるsqlSET PASSWORD FOR ユーザー名@ホスト名=PASSWORD(&quot;パスワード&quot;); 具体例SET PASSWORD FOR root@localhost=PASSWORD(&quot;&quot;</description><pubDate>Sun, 10 Feb 2013 00:00:00 GMT</pubDate></item><item><title>Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.</title><link>https://h3pei.tech/articles/2013-02-09-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-09-02/</guid><description>Railsで「mysql2」を利用する際、bundle installをするとタイトルのようなエラーが出力された。かなりの時間これに悩まされた。具体的には以下のようなエラー。Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension./Users/★★★/.rvm/rubies/</description><pubDate>Sat, 09 Feb 2013 00:00:00 GMT</pubDate></item><item><title>最近のWebアプリ開発で利用したフロントエンド関係のあれこれ</title><link>https://h3pei.tech/articles/2013-02-09-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-09-01/</guid><description>Railsを利用したWebアプリ開発をするときにフロントエンドまわりで利用したライブラリやフレームワーク,Tipsなどをまとめて、簡単に感想を書く。 CSSフレームワーク僕のCSSフレームワークの使途は基本的にパーツのデザインや装飾だけだった。ボタンやフォーム、ラベルやアイコンなどをかっこ良くするために使った。グリッドシステムなどによる全体のレイアウトの構成には使わなかった。正確</description><pubDate>Sat, 09 Feb 2013 00:00:00 GMT</pubDate></item><item><title>ブロック要素の枠をテキストがはみ出す現象への対処方法</title><link>https://h3pei.tech/articles/2013-02-03-03/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-03-03/</guid><description>divやarticleなどのブロック要素で囲まれてる枠を、テキストがはみ出して表示されてしまう現象への対処方法について。具体的には以下の画像のような現象のこと。!2013-02-03-03-01.png(/assets/2013-02-03-03-01.png)原因は調べていないが、特に英字で起こるようである。これを防ぐには、テキストを囲んでいるブロック要素に対してCSSで「wor</description><pubDate>Sun, 03 Feb 2013 00:00:00 GMT</pubDate></item><item><title>Railsのtextareaの幅を設定する方法</title><link>https://h3pei.tech/articles/2013-02-03-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-03-02/</guid><description>form_forヘルパーの内部で生成したtextareaタグのサイズを設定する方法が、他のフィールドタグと違うような感じがしたのでメモを残しておく。erb これはダメ&lt;%= f.text_area :description, :cols = 10, :rows = 60 % これは平気&lt;%= f.text_area :description, :size = &quot;60</description><pubDate>Sun, 03 Feb 2013 00:00:00 GMT</pubDate></item><item><title>Jqtransformを使ってみた感想</title><link>https://h3pei.tech/articles/2013-02-03-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-03-01/</guid><description>フォームの見栄えを手っ取り早く、良くしたくて、「Jqtransform」というプラグインを利用してみた。使い方がとても簡単で、formタグに指定したクラスに対してjqTransform()関数を適用させるだけ。デザインも十分に良い。しかし、少しカスタマイズしようとするとソースコードを直接いじる必要があるようだった。例えば、textフィールドのサイズはあらかじめきめられた比率でのサイズにしか</description><pubDate>Sun, 03 Feb 2013 00:00:00 GMT</pubDate></item><item><title>HomeBrewの導入</title><link>https://h3pei.tech/articles/2013-02-02-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-02-02-01/</guid><description>以前HomeBrewをインストールしようとして、なんだかエラーがたくさん出てるけど一応インストールできたみたいな謎な感じになっていて、放ったらかしにしていた。今回再び、HomeBrewが必要になるときがあったのでインストールを行った。  メモを残そうと思ったが、以下2つの記事にしたがって操作したら問題なくできた。なので、その記事について残しておく。- http://blog.hifumi</description><pubDate>Sat, 02 Feb 2013 00:00:00 GMT</pubDate></item><item><title>Railsのlink_toにパラメータを付与する</title><link>https://h3pei.tech/articles/2013-01-27-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-01-27-01/</guid><description>link_toにパラメータを付ける書き方をよく忘れる。ググるとたくさんの書き方が出てくるし、書き方は１つではないと思われるが、個人的に一番直感的だったものをメモしておく。erb hoge_index_pathのパラメータ「para」に123、「para2」に&apos;abc&apos;を渡す&lt;%= link_to &apos;ほげほげ&apos;, hoge_index_path(:para = 123, :pa</description><pubDate>Sun, 27 Jan 2013 00:00:00 GMT</pubDate></item><item><title>『アルゴリズムとデータ構造』学習ノート：バブルソート</title><link>https://h3pei.tech/articles/2013-01-23-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-01-23-01/</guid><description>バブルソート隣り合う２つのデータを比較して、前の要素の方が大きかった場合、後ろの要素と交換する。このアクションを先頭から順に繰り返すことで、要素を整列させるソート方法。小さい要素が泡のように上がってくることから、こう名付けられた。バブルソートは要素の数が小さいときは良いが、要素の数が大きくなればなるほど処理速度が遅くなる性質を持つ。（例）2,3,1,5,4　→</description><pubDate>Wed, 23 Jan 2013 00:00:00 GMT</pubDate></item><item><title>iTerm上で起動したvimのテキストをマウスカーソルでコピーする方法</title><link>https://h3pei.tech/articles/2013-01-22-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-01-22-01/</guid><description>iTerm上でvimを起動して、そこに書かれているテキストをマウスカーソルを使ってコピーしたかったのだけど、どうしてもできなかった。右クリックでコピーしたり、ツールバーからコピーしたりと色々な方法を試したけど、そもそもコピーすることが不可になっていた様子。!2013-01-22-01.png(/assets/2013-01-22-01.png)!2013-01-22-02.png</description><pubDate>Tue, 22 Jan 2013 00:00:00 GMT</pubDate></item><item><title>MySQLのコマンド履歴を見る方法</title><link>https://h3pei.tech/articles/2013-01-20-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-01-20-01/</guid><description>MySQLのコンソール上でカーソルの上下キーを押せば、コマンド履歴が閲覧できるが、Linuxのhistoryコマンドのように一覧で表示したかった。mysqlでこれを実現するには .mysql_history というファイルをvimやemacsなどのテキストエディタで開けばOK。自分の場合 .mysql_hitory は $HOME 直下にあった。</description><pubDate>Sun, 20 Jan 2013 00:00:00 GMT</pubDate></item><item><title>【Rails】カラムの型がboolean（tinyint）のカラムを条件にデータをモデルから取得する際の注意</title><link>https://h3pei.tech/articles/2013-01-09-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-01-09-02/</guid><description>マイグレーションファイルにて、カラムの型をbooleanにしたレコードを条件にしてデータを取得する際、データベース上では「0」と「1」で表現されているが、実際には「true」「false」を使わないと意図通りにデータが取得できない。DB| active_flg | tinyint(1)   | YES | NULL    |         |※mysqlのコンソール画</description><pubDate>Wed, 09 Jan 2013 00:00:00 GMT</pubDate></item><item><title>【Rails】サブディレクトリ以下のコントローラを作成する方法</title><link>https://h3pei.tech/articles/2013-01-09-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2013-01-09-01/</guid><description>例えば、「customize」というサブディレクトリを利用していたとする。routes.rbは以下のような感じになるかと思う。rubynamespace &apos;customize&apos; do  resources :user  resources :itemendルーティング設定まで終えて、customize以下に実際にuserコントローラ等を作成するには、ra</description><pubDate>Wed, 09 Jan 2013 00:00:00 GMT</pubDate></item><item><title>rails consoleのtips</title><link>https://h3pei.tech/articles/2012-12-29-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-12-29-01/</guid><description>あるモデルのメソッドの挙動を確認したくて、 rails consle でコンソールを立ち上げたとする。そして、立ち上げたあとにモデルのメソッドに修正を加えたとする。  この場合、コンソールを再起動しないと加えた修正が反映されない（と思っていた）。しかし、そんな面倒なことをしなくても reload! コマンドでコンソールの再起動と同様の効果を得ることができた。https://a</description><pubDate>Sat, 29 Dec 2012 00:00:00 GMT</pubDate></item><item><title>vimプラグイン「neocomplcache」と「molokai」のインストール方法</title><link>https://h3pei.tech/articles/2012-12-26-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-12-26-01/</guid><description>補完プラグインのneocomplcacheと、カラースキーマのmolokaiをインストールした際のメモ。vimの仕組みよくわかってない。 neocomplcacheのインストール(1) githubからcloneするbashgit clone git://github.com/Shougo/neocomplcache.git(2) 各種ディレクトリを.vimディ</description><pubDate>Wed, 26 Dec 2012 00:00:00 GMT</pubDate></item><item><title>Macでテキストの変換を決定したあとに再変換処理をしたい</title><link>https://h3pei.tech/articles/2012-12-18-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-12-18-01/</guid><description>テキストを変換して、Enterを押したあとに変換ミスに気づいて打ちなおしてしまったということはないだろうか？そういった場合には、 Control + Shift + r もしくは Control + delete をすぐに押すことで、再変換処理ができる。わざわざ、変換ミスを削除して新しく打ち直す必要はない。参考：http://inforati.jp/apple/mac-tips-</description><pubDate>Tue, 18 Dec 2012 00:00:00 GMT</pubDate></item><item><title>「su」コマンドについてメモ</title><link>https://h3pei.tech/articles/2012-12-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-12-14-01/</guid><description>なんだかんだで使いながらも、しっかりと意味を理解していないコマンドだったので調べ直した。■「su」は何の略称なのかまず、「su = super user」ではないよう。「su = switch user」、つまりユーザーの切替え（switch）だった。ただしややこしいのが、suを引数無しで使うと、super userに切り替わるということ。suに引数をつけると、そのユーザーに切り替わる</description><pubDate>Fri, 14 Dec 2012 00:00:00 GMT</pubDate></item><item><title>今後しばらく力を入れて学習したいと思っていることリスト</title><link>https://h3pei.tech/articles/2012-12-11-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-12-11-01/</guid><description>1. UNIX、Linuxまわり色々（シェルプログラミングとか、サーバ運用・構築とか）2. ネットワーク技術3. アルゴリズム4. フレームワーク・言語自体のソースコードやベストプラクティスを読むこと5. コンピューターの仕組みやらなくてはいけないことは腐るほどあるけれど、欲張りすぎても破綻してしまう。なので、今後力を入れて学んでいきたいと思っていることを整理した（といってもかなり欲</description><pubDate>Tue, 11 Dec 2012 00:00:00 GMT</pubDate></item><item><title>jQueryの&quot;next&quot;メソッドについて</title><link>https://h3pei.tech/articles/2012-11-30-03/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-11-30-03/</guid><description>jQueryのnextメソッドの使いかたについて勘違いをしていて、数時間無駄にした。  「指定した要素の次の値を取得する」という表現方法に惑わされた。HTMLhtml&lt;div id=&apos;hoge&apos;fuga&lt;/div&lt;pfoo&lt;/p&lt;spanbar&lt;/spanjQueryjavascript$(&apos;hoge&apos;).next(&apos;span&apos;); //</description><pubDate>Fri, 30 Nov 2012 00:00:00 GMT</pubDate></item><item><title>jQueryでselectタグの値を取得する</title><link>https://h3pei.tech/articles/2012-11-30-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-11-30-02/</guid><description>HTMLhtml&lt;select id=&apos;hoge&apos;    &lt;option1&lt;/option    &lt;option2&lt;/option    &lt;option3&lt;/option&lt;/selectjQueryjavascript$(&quot;hoge&quot;).val();これで、選択されたoptionタグのvalueが取得できる。selectと</description><pubDate>Fri, 30 Nov 2012 00:00:00 GMT</pubDate></item><item><title>Rails3.2.8のform_forヘルパー利用下のselectタグにクラスを付与する方法</title><link>https://h3pei.tech/articles/2012-11-30-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-11-30-01/</guid><description>erb BAD&lt;%= f.select &apos;from_time&apos;, TIME, selected: &apos;9:00&apos;, class: &apos;from_time&apos; % GOOD&lt;%= f.select(:from_time, TIME, {selected: &apos;9:00&apos;}, {class: &apos;from_time&apos;}) %※ 第2引数の TIME は定数で、時刻が配列に</description><pubDate>Fri, 30 Nov 2012 00:00:00 GMT</pubDate></item><item><title>ローカルのディレクトリをgit管理下に置き、かつgithub上にリモートリポジトリを作成するまでの手順</title><link>https://h3pei.tech/articles/2012-11-26-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-11-26-01/</guid><description>ローカル上のあるディレクトリのファイルをgitとgithubで管理する際の手順。管理対象にしたいローカル上のディレクトリをlocal_dirとして行う。 まずgithub上でリポジトリを作成するトップ画面の右の方にある、「New repository」と書かれているボタン。!2012-11-26-01.png(/assets/2012-11-26-01.png) 次に作</description><pubDate>Mon, 26 Nov 2012 00:00:00 GMT</pubDate></item><item><title>Rails3.2系、マイグレーションを利用してインデックスを追加する手順</title><link>https://h3pei.tech/articles/2012-10-17-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-10-17-01/</guid><description>bashrails generate migration マイグレーションファイル名名前の基本は「実行したい処理＋テーブル名」だとか。というわけで、bashrails genereate migration AddIndexTweetsというふうにした。すると、db/migrate/以下に、マイグレーションファイルが生成される。  以下のように</description><pubDate>Wed, 17 Oct 2012 00:00:00 GMT</pubDate></item><item><title>Nokogiriのインストールに失敗した時のメモ</title><link>https://h3pei.tech/articles/2012-10-14-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-10-14-01/</guid><description>以下のサイトに載っていた通りの対処法で解決した。  http://mukaer.com/archives/2012/04/17/rubynokogirihtm/bashyum -y install libxml2-devel libxslt-develgem install nokogiri -- --with-xml2-lib=/usr/local/lib --with-xml2</description><pubDate>Sun, 14 Oct 2012 00:00:00 GMT</pubDate></item><item><title>「バイナリ」という言葉について調べたことを箇条書きにする</title><link>https://h3pei.tech/articles/2012-10-06-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-10-06-01/</guid><description>バイナリという言葉がよくわからなかったので、色々なソースから調べたことを箇条書きにする。なんとなくイメージはつかめたと思う。- テキスト形式以外のデータ全般を指す。- テキストデータの対義語として用いられる事が多い（厳密にはテキストデータもバイナリデータではあるが）。- 実行可能形式のコンピュータプログラム（つまりコンパイル済み）はバイナリデータにあたる。- コンピュータが直接解釈して</description><pubDate>Sat, 06 Oct 2012 00:00:00 GMT</pubDate></item><item><title>Railsでkaminariを使ってページネーションを実装する</title><link>https://h3pei.tech/articles/2012-09-30-07/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-07/</guid><description>Railsでのページネーションの導入に関して とても丁寧に手順が書かれたサイト(http://memo.yomukaku.net/entries/238) があったので、それを見ながら実装するまで。 インストールKaminariというgemがページネーションの実装に利用できるよう。  Gemfileに「gem &apos;kaminari&apos;」と追加記述し、「bundle install」。</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item><item><title>mysqlで、datetimeのカラムの年と月だけを利用する</title><link>https://h3pei.tech/articles/2012-09-30-06/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-06/</guid><description>datetime型のカラムには例えば 2012-09-30 12:00:00 のように値が格納されているとし、ここから 201209 のように、年と月だけを対象にして検索をかける方法のメモ。mysqlの DATE_FORMAT 関数を利用することで、アプリケーション側でごにょごにょする必要なく検索をかけることができる。sql-- 例 : created_atカラムの値が</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item><item><title>RailsのアソシエーションまわりでNoMethodErrorが起こった時に思い出したいこと</title><link>https://h3pei.tech/articles/2012-09-30-05/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-05/</guid><description>1週間くらい前にも全く同じ所で30分くらい詰まっていたのに、また同じ所で15分くらい詰まっていたので自分用にメモをしておく。- 外部キーの設定もしっかりやった- モデルへのリレーションの設定もやった「これでアソシエーションの設定は整った」と思いきや、いざ動かしてみると NoMethodError が起こった。  以下モデルとビューのソースコードの抜粋。ruby モデル</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item><item><title>Rails3のActiveRecordでOR検索をする</title><link>https://h3pei.tech/articles/2012-09-30-04/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-04/</guid><description>単純にwhereメソッドをメソッドチェインでつないでいくとAND検索になってしまう。rubyUser.where(:owner_flg = true).where(:manager_flg = true) = SELECT users. FROM users WHERE users.owner_flg = 1 AND users.manager_flg</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item><item><title>RailsのActiveRecordでLIKEを使う</title><link>https://h3pei.tech/articles/2012-09-30-03/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-03/</guid><description>LIKEの使いかたのメモ。ruby &apos;Bob&apos; をnameに含むUserを検索User.where(&apos;name LIKE ?&apos;, &apos;%Bob%&apos;)</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item><item><title>RailsでURLにパラメータを追加してリンクを生成する方法</title><link>https://h3pei.tech/articles/2012-09-30-02/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-02/</guid><description>mergeメソッドを利用することで、元々URLについていたパラメータ情報を消さずに、追加していくことができる。例えば、現在のURLが https://example.com?param1=fuga の時に、ruby&lt;%= link_to &apos;URL&apos;, params.merge(param2: &apos;hoge&apos;) %上記のようにして出力されたリンクをクリックすると.</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item><item><title>MySQLのカラム名を「from」にしてしまってちょっと困った件</title><link>https://h3pei.tech/articles/2012-09-30-01/</link><guid isPermaLink="true">https://h3pei.tech/articles/2012-09-30-01/</guid><description>MySQLのカラム名を「from」にして作成してしまった（Railsのマイグレーション経由で作成した）。Eメールの送り主という意味で、fromというカラム名にしたのだけれど、これはMySQLの予約語に相当するため、データを扱う上で色々と不具合が生じた。※MySQLの予約語一覧 http://dev.mysql.com/doc/refman/4.1/ja/reserved-words.htm</description><pubDate>Sun, 30 Sep 2012 00:00:00 GMT</pubDate></item></channel></rss>