2018年4月17日火曜日

githubの基本用語

ある仕事でGithubをちゃんと使うようになって、いろんな基本用語(知識)があやふやなことに気付いたのでメモ。

リポジトリ

ファイルやディレクトリの状態を保存する場所。
手元の端末にある「ローカルリポジトリ」とサーバなどネットワーク上にある「リモートリポジトリ」の2箇所がある。
基本的にローカルリポジトリで作業を行い、その作業内容をリモートポジトリへアップロードする流れ。

コミット(commit) 

ファイルの追加や変更の履歴をリポジトリに保存すること。

プッシュ(push) 

ファイルの追加や変更の履歴をリモートリポジトリにアップロードするための操作のこと。

ブランチ(branch)

履歴の流れを分岐して記録していくもの。分岐したブランチは他のブランチの影響を受けないため、同じリポジトリ内でいくつかバージョンの開発を行っていくことができる。

2018年4月12日木曜日

macportsでパッケージがインストールができない

参考URL
macportsでインストールができない -macportsはインストール済みです。- その他(OS) | 教えて!goo https://oshiete.goo.ne.jp/qa/7598217.html

$ port search gcc
Warning: Can't open index file for source: rsync://rsync.macports.org/macports/release/tarballs/ports.tar 
Error: search for name gcc failed: No index(es) found! Have you synced your port definitions? Try running 'port selfupdate'. 
No match for gcc found

と出てしまった。
参考URL先にならって

$sudo vi /opt/local/etc/macports/sources.conf 

#rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
 http://www.macports.org/files/ports.tar.gz [default]

最下部のrsyncの行をコメントアウトし、新たに赤字の部分を加筆する。
そのあとポートをアップデートする。

$ sudo port -d sync 
DEBUG: Copying /Users/yoshioka-hiroaki/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences 
--->  Updating the ports tree 
Synchronizing local ports tree from http://www.macports.org/files/ports.tar.gz 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current 
                                 Dload  Upload   Total   Spent    Left  Speed 
100   178  100   178    0     0    679      0 --:--:-- --:--:-- --:--:--   679 
100 32.7M  100 32.7M    0     0  3239k      0  0:00:10  0:00:10 --:--:-- 4352k 
(以下略)
このように更新されれば、OK。

2017年9月6日水曜日

nclでlibgfortran.3.dylibが無いとエラーが出る。

$ ncl hakohige_v8_all_gray_hikaku.ncl 
dyld: Library not loaded: /opt/local/lib/libgcc/libgfortran.3.dylib
Referenced from: /opt/local/bin/ncl
Reason: image not found
Abort trap: 6

と出てしまった。

$ ls /opt/local/lib/libgcc/libgfortran.4.dylib 
/opt/local/lib/libgcc/libgfortran.4.dylib

と4はあるのでリンクを貼って走らせ直してみる。
$ sudo ln -sf /opt/local/lib/libgcc/libgfortran.4.dylib /opt/local/lib/libgcc/libgfortran.3.dylib

hakohige 11:40:34 $ ncl hakohige_v8_all_gray_hikaku.ncl 
 Copyright (C) 1995-2017 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.4.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:asciiread: Unable to open input file (/Volumes/HDD01/research/analysis/tcdetect3/result05_00-v5-3rd/20004/T1304-wrf-20004-d01-ALERA001-hPa.csv)
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 46 in file hakohige_v8_all_gray_hikaku.ncl




走った。違うエラーが出たけど。笑

2017年8月4日金曜日

Mac上のパワーポイントでプレゼンする時iPhoneをリモコンにする

参考URL
【Remote】MacのPowerPointをリモートコントロールするiPhoneアプリがすごい! | スキルアクセラレータ インク http://amile.jp/wp/archives/701

詳細は追って。

2017年7月25日火曜日

Google Apps Scriptでメールを送ろうとした時に権限が無いと怒られた時

参考URL
GAS で「一部のスコープへのアクセス権限がありません」と怒られたときの対処法 - Qiita http://qiita.com/zk_phi/items/7220b67afa84c58cc160

URL先通り手順を踏めば、パス出来た。

2017年6月21日水曜日

ncviewが使えなくなった問題

参考URL
Tracking Note: macportsでncl6.4.0にアップデートできない問題【解決した】 https://trackingnote-yoshi.blogspot.jp/2017/06/macportsncl640.html

リンク先の作業を済ませたあと、ncviewを実行すると
$ ncview
dyld: Library not loaded: /opt/local/lib/libhdf5.100.dylib
Referenced from: /opt/local/bin/ncview
Reason: image not found
Abort trap: 6

libraryが無いとエラーが。
今度はhdf5のlibraryらしいので、確認してみると
$ ls /opt/local/lib/libhdf5.
libhdf5.101.dylib libhdf5.a libhdf5.dylib libhdf5.settings

だったので、101を100にしてシンボリックリンクを貼ってみた。
$ sudo ln -sf  /opt/local/lib/libhdf5.101.dylib  /opt/local/lib/libhdf5.100.dylib
Password:

この後は、無事にncviewが実行できた。
安心安心。

macvimで「上書きするには 'fenc' を空にしてください」というエラーが出たら

参考URL
'上書きするには 'fenc' を空にしてください' みたいなエラーが出たら. - Log4jpnLog http://d.hatena.ne.jp/yellowpepper/20120701/1341133457

タイトルのようなエラーが出たら

:set fenc=

のように打ち込む。
 escapeを打ち込んでからね!

githubの基本用語

ある仕事でGithubをちゃんと使うようになって、いろんな基本用語(知識)があやふやなことに気付いたのでメモ。 リポジトリ ファイルやディレクトリの状態を保存する場所。 手元の端末 にある「ローカルリポジトリ」とサーバなどネットワーク上にある「リモートリポジトリ」の...