2020/10/21

GitHub 二段階認証 token

毎回やりかを忘れ。。 

Personal access tokens

-->https://github.com/settings/tokens

$ git clone https://github.com/private-organization/repository.git
Cloning into 'repository'...
Username for 'https://github.com': xxx
Password for 'https://xxx@github.com': {ここでGitHubのパスワードでなくtokenを入力する}

2020/10/17

fatal error: 'libpq-fe.h' file not found

 libpq-fe.h が見当たらないらしい。

次のコマンドで postgresql をインストールすることで解決。

libpqはpostgresqlのことだね

brew install postgresql

2020/10/16

golang sha256

 package main

import (

"fmt"
        "crypto/sha256"
)


func main() {

        //saltで値変わるね

       salt:="test"
       hash := hmac.New(sha256.New, []byte("1"))

hash.Write([]byte(salt))
        fmt.Printf("%x\n", hash.Sum(nil))

}


mac のshasumで無理かな?
goplaygroud でやりました。

2020/10/13

rbenv nodenv

// 1.初期化設定
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
// 2.初期化設定の反映(既存のRubyはこれで無視される)
$ source ~/.bash_profile
// 3.rbenvのインストール:
$ brew install rbenv ruby-build
// 4.インストール可能なRubyのバージョン一覧の表示
$ rbenv install -l
// 5.指定したRubyのバージョンをインストール
$ rbenv install 2.3.5
// 6.インストールしたRubyを使用可能な状態にする⇒shimsへの反映
$ rbenv rehash


全く同じ手順で nodenvをインストールできる