べすとえふぉーと

プログラミング等のノート 

Apache2で443を待ち受けるようにする

以下コマンドを実行

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 restart

/etc/apache2/ssl.confの443の部分を

Listen 443

に変更

もう一回Restart

sudo service apache2 restart

ポートが開いてるかは他のPCからnmapで確認可能

空いてない場合は

sudo ufw enable
sudo ufw allow 443/tcp
sudo ufw reload

MacにJupyter Notebookをインストールして起動

sudo pip3 install jupyter

mkdir jupyter

cd jupyter

jupyter notebook --generate-config

jupyter notebook password

jupyter notebook

localhost:8888/で開く
パスワードのファイル jupyter_notebook_config.json は /Users/$ユーザー/.jupyter/ に保存される

gitのログから変更したファイルを抽出してcsvに出力

git log  $starthash...$endhash --name-only \ 
| grep -e "src"   -e "config" \ 
| grep -v "exclude_string_1" \ 
| grep -v "exclude_string_2" \ 
| sort \ 
| uniq \ 
| xargs find > ../pathlist.txt 2>/dev/null ; cat ../pathlist.txt \ 
| awk -F "/" '{ print $NF }' > ../filenames.txt \ 
 && paste -d , ../pathlist.txt ../filenames.txt > ../filenameandpath.csv \ 
 && rm ../pathlist.txt ../filenames.txt  

$starthash から$endhashまでを抽出
grep -e のオプションでディレクトリ指定
exclude_string_1、exclude_string_2で除外したい文字を指定
filenameandpath.csvが出力されるcsv