リモートで働くプログラマーの検索結果

リモ太がググったことの覚書

2020-06-01から1ヶ月間の記事一覧

Railsで外部キー制約を削除する

Rai

qiita.com 上記の通りだけど class RemoveUserKeyFromPlans < ActiveRecord::Migration[5.2] def change remove_foreign_key :plans, :users end end remove_foreign_keyで外部キー制約を削除

javascriptでiOSかどうかの判定をする

const userAgent = window.navigator.userAgent.toLowerCase(); const isiOS = userAgent.indexOf('iphone') > -1 || userAgent.indexOf('ipad') > -1 || userAgent.indexOf('macintosh') > -1 && 'ontouchend' in document; iPadOSの場合は、ユーザーエージ…

rubyでeach_with_indexみたいなことをmapでもやりたい

with_indexをmapにつなげて書けばよいようだ array = ['apple', 'peach', 'orange'] p array.map.with_index{|v, index| index > 1 ? 'hoge' : v} => ["apple", "peach", "hoge"]

gitの名前とメールアドレスを設定する

git

git-scm.com git config --global user.name "John Doe" git config --global user.email johndoe@example.com

Heroku CLIをインストールする

devcenter.heroku.com 公式の手順通りにMacへHeroku CLIをインストールする brew tap heroku/brew && brew install heroku Heroku CLI Autocomplete をインストール heroku autocomplete 実行するとHerokuへのログインが求められてブラウザが起動するのでロ…

「Module compiled with Swift 5.1.3 cannot be imported by the Swift 5.2.4 」というエラーが出てコンパイルが失敗する

iOS

note.com ググってみると carthage update --platform iOS を実行すれば良いとのこと zsh: command not found: carthage carthageがないと言われたので homebrewでインストール brew install carthage インストール後に再度以下を実行 carthage update --pla…

Firebase CLIをインストールする

firebase.google.com curl -sL firebase.tools | bash インストールが完了したらログインする firebase login

git logを見やすくするツール tigをインストールする

jonas.github.io brew install tig

Visual Studio Codeをインストールする

code.visualstudio.com 公式からDLしてzipを展開してVisual Stuido Code.appをアプリケーションフォルダに移動 terminalで codeコマンドでVSCodeを起動するために以下の設定を行う VSCodeを起動 Command Palette (⇧⌘P)を開いて 'shell command' を入力 "Shel…

Yarnをインストールする

classic.yarnpkg.com brew install yarn

homebrewでpostgresqlをインストールする

brew install postgresql brew services start postgresql

nodenvをインストールする

github.com brew install nodenv ~/.zshrcに以下を追記する eval "$(nodenv init -)" 何かnodeをインストール nodenv install 14.4.0

rbenvをインストールする

github.com brew install rbenv rbenv init ~/.zshrcに以下を追記する eval "$(rbenv init -)" 何かしらrubyをinstallしてglobalなrubyを変更する rbenv install 2.6.3 rbenv global 2.6.3 .zshrcを読み込み直す source ~/.zshrc これをやらないとbundlerをi…

Zinitをインストールする

Zinit(旧Zplugin)をインストールする github.com README通りにインストールをする sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" Powerlevel10kを設定 github.com zinit ice depth=1; zinit light romkatv/…

MacbookにHomebrewをインストールする

brew.sh 公式サイトの手順通りに作業する ターミナルで以下のコマンドを叩く /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" 最初にパスワードの入力を求めらた上に実行するか一度確認があるのでエン…

gitで直前のmergeコミットをなかったことにする

git

git reset --hard ORIG_HEAD

bootstrapVueのb-modalを使ってる時にmodalより上フォームを重ねたい

z-indexをmodalより数値大きくしたら基本的には表示されるんだけど、なぜかinput要素にだけfocusが当たらなかった b-modalのオプションでno-enforce-focus をtrueにしたら解決した bootstrap-vue.org

配列の同じ値の件数をカウントする

javascriptで配列の中に同じ値のものが何個あるのかカウントするいい方法が思いつかなかった シンプルに配列をぐるぐる回しながらオブジェクトに入れていってカウントすると以下のようになる const targetArray = [1, 1, 2, 2, 3, 4, 1, 2, 3, 2, 5, 6, 6, 4…

bundle installで「An error occurred while installing rmagick (2.16.0), and Bundler cannot continue.」とでてrmagickがインストールできない

下記を参照にimagemagickのバージョンを下げたらインストール出来た www.tweeeety.blog

bundle install で「An error occurred while installing mysql2 (0.4.10), and Bundler cannot continue.」とでてmysql gemがインストールできない

下記参照して bundle configを設定すれば無事にインストールできた qiita.com

firestoreのindexのjsonファイルをローカルにエクスポートする

以下のコマンドで firestore.indexes.json が作成 or 上書きされる firebase firestore:indexes > firestore.indexes.json