IT分からんわ~_~;

IT色々お勉強中のブログ

git

GitHub draft使う

git

PR出すとき、WIPを使うことがあると思うがそれの互換機能 いつものPR作成時のプルダウンに新しく「Create draft pull request」ていうのが出てくる draftのバッチがつく 「ready for review」ボタン押すと普通のPRになる 普通のPRもreviewerのとこの「Conver…

zshでブランチ名を表示する

.zshrcに以下を追加 # ブランチ名を色付きで表示させるメソッド function rprompt-git-current-branch { local branch_name st branch_status if [ ! -e ".git" ]; then # gitで管理されていないディレクトリは何も返さない return fi branch_name=`git rev-…

swift Codableの使い方

swift Codableの使い方 こういうJSONがあった場合 import Foundation let hoge = "{\"id\":1,\"family_id\":12345,\"user\":{\"id\":20,\"display_name\":\"hoge\",\"name\":\"hoge\",\"text\":\"自己紹介文\",\"mail_address\":\"user@hoge.jp\",\"auth\":\…

git alias設定

git

git alias設定 global設定 vim ~.gitconfig [alias] st = status co = checkout br = branch ci = commit 特定のブランチだけには そのブランチ配下で vim .git/config [user] name = hoge email= hoge@gmail.com

Rail5.2.3アップグレードでArgumentError: wrong number of argumentsエラー発生

Rspec流して出たエラーはこれ from /hogehoge/gems/will_paginate-3.1.6/lib/will_paginate/active_record.rb:140:in `select_for_count'``` will_paginateでエラー出てるっぽいから、PR調べてると、それっぽいの発見 ArgumentError: wrong number of argume…

複数Githubアカウントでssh接続設定(config)を使い分ける手順

cd ~/.ssh ssh-keygen -t rsa -C {Githubメールアドレス} -f {作成する鍵の名前} Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: vim ~/.ssh/config Host github.sub # サブアカウント…

go入門

brew install go package main import "fmt" func main() { fmt.Println("Go言語はじめました!") } go run hello.go go build hello.go

neovimを使ってみるぜ

neovimインストール brew install neovim 設定変更 nvim .config/nvim/init.vim 先ずは、色から set termguicolors qiita.com 行数表示 set number クリップボードの共有 set clipboard=unnamed プラグイン導入dein # ディレクトリ作成 $ mkdir -p ~/.cache/…

git フックを使ってみた

git フックとは 特定のgitアクションが行われた時に、スクリプトを実行する 1. それぞれがフックが動くタイミングは? docs.google.com 2. フックをインストール プロジェクトのディレクトリへ移動 .git/hooks/pre-push.sampleのサンプルをhookスクリプトをg…

ISUCONに向けてalpをインストールしたい

kazuki229.hatenablog.com wget https://github.com/tkuchiki/alp/releases/download/v0.3.1/alp_linux_amd64.zip wgetしようとしたらいきなりmac wgetないやんけ homebrewでインストール 入れてなかったんだね brew install wget wget -h 気を取り直してwge…

rails dm 覚書

service mesh 組織が大きくなっても速いサイクルで開発できる kurbanetesと関係あり サービス同士を繋げる 型と実践 観察できるのは結果だけ こうゆう型をやって結果が出たと説明すると良い 具体的題材があると良い 定量評価大事 fintech 少人数、リモートワ…

macにgit補完、branch表示を追加

brew install git .bashrc or .bash_profileに追加 source /usr/local/etc/bash_completion.d/git-prompt.sh source /usr/local/etc/bash_completion.d/git-completion.bash 下記も追加 GIT_PS1_SHOWDIRTYSTATE=true export PS1='\h\[\033[00m\]:\W\[\033[31…

Capistrano エラーが出てデプロイ出来ない

bundle exec cap production deployすると以下のエラーが出る 実行bundle exec cap production deploy 01 $HOME/.rbenv/bin/rbenv exec bundle install --path /var/www/zen/shared/bundle --without development test --deployment --quiet 01 rbenv: bundl…

cap stage deployを実行するとPermission denied (publickey)というエラー

cap stage deployを実行するとエラーになる [git][* hoge-hoge-hoge]:~/projects/hoge/ bundle exec cap stage deploy 00:00 git:wrapper 01 mkdir -p /tmp/hoge/ ✔ 01 deployer@hoge.poge.me 0.226s Uploading /tmp/hoge/git-ssh.sh 100.0% 02 chmod +rx /t…

新規railsアプリ作成 postgres編

hogehogeアプリを作成 mkdir hogehoge cd hogehoge echo 2.2.4 > .ruby-version ruby -v rbenv local 2.2.4 ll -a rbenv versions gem install bundler rbenv gemset list rbenv gemset create 2.2.4 hoge echo >.rbenv-gemsets hoge ll -a bundle init vim …

gitにコミット、push

git

branch作成 git branch aabranch branchの移動 git checkout aabranch commit git status #違いが在れば git add . git commit -m 'add file' push git push origin aabranch merge masterにマージしてpush % git co master % git merge aabranch % git push…

githubで管理する

git

ディレクトリを作成 mkdir hogehoge cd hogehoge githubに作成+初期化 git init ファイル作成、コミット echo "# hoge" >> README.md git add . git ci -m 'First commit.' githubにpushする git remote add origin https://github.com/POGEPOGE/hogehoge.g…