pruneの作業日記

転職してエンジニアになった人がカタカタやった簡単なことを記録します。

Omnibus GitLab13.0.0にUpdateしようと思ったらちょっとだけコケた

自動Update

バックアップなどは公式サイト通りにcrontabで深夜にやっております。
その後、Updateも自動化したかったのでスクリプトを作成しました。
omnibusのgitlab-eeを使用して運用しております。
うちは、シングルノードで動いているので、公式サイト通りにゼロダウンタイムの手順でやっております。
公式サイトにも書かれている通り、シングルノードの場合は100%ゼロダウンタイムになるわけではありません。
Update完了後は会社のSoftwareチャンネルでアナウンスしております。
適当に書いたスクリプトなのでVersionとかは表示せず、リンクで対応しております。 RHEL用のものになります。

github.com

GitLab13.0.0に自動Updateされなかった

途中でエラーが起きた場合もUpdateしたと通知が入っていましたが、実際にはUpdateされていませんでした。 (ハンドリングできてない)
GitLab13以降はPostgres11以上が必要なようです。
GitLab 13 specific changes | GitLab

環境をしらべて見るとどうやら10.12のままでした。

f:id:chikesomnia:20200603222720p:plain
Components
自動でUpdateされているものだと思っていましたが、version 11には手動でUpdateしないといけないようです。

Automatically during package upgrades (unless opted out) and when user manually runs gitlab-ctl pg-upgrade, omnibus-gitlab will still be attempting to upgrade the database only to 10.x, while 11.x will be available for users to manually upgrade to. To manually update PostgreSQL to version 11.x , the pg-upgrade command has to be passed with a version argument (-V or --target-version) Database settings | GitLab

GitLabのversionが12.8以降だと-Vオプションが使えるようなので、使えない方はまずまず12.8以降にUpdateする必要がありそうです。
-Vオプションが使えるようになったら下記のコマンドを叩きます。

$ sudo gitlab-ctl pg-upgrade -V 11

これでUpdateできるようになったはずです。

$ sudo gitlab-ctl stop
$ sudo yum -y install gitlab-ee 

これで起動すればOKなはずだと思っていたのですが、Postgresのversionを上げたので下記のコマンドを叩く必要があります。 これはOmnibus GitLabの再設定をするものです。

$ sudo gitlab-ctl reconfigure

再設定しないと起動は成功するのですが、issueが見れなかったりmerge requestで500番が帰ってくるので注意です。

f:id:chikesomnia:20200603223817p:plain
error500

Heartache / ONE OK ROCKのコード

おひさしぶりです

1ヶ月以上ぶりのブログです.今回はパソコン関係ではなく音楽関係の記事になります.ONE OK ROCKのニューアルバムが発売されました.ここでリンク張って儲かろうとかはめんどくさいのでしませんw

Heartache

最近は静かな曲が好きなのですがHeartacheがシンプルでいいなぁと思いましたので弾き語りのコードをコピーしたので載せたいの思います.
コピーとか全然しないし,めんどくさいこと嫌いだし,ググればなんか出てきたのですが,なんか音が気にくわないのでコピーすることにしました.コードはめっちゃシンプルだったので.
Studio Jam Sessionのコピーをしてます. まぁベースとして各自アレンジしてください.ストロークは感覚でお願いします. あってるとかあってないとかは保証しません.違うと思ったら各自修正お願いします.

Code

書き忘れた… ハーフダウンチューニングです。
D/F#: 200232 Asus4: ×02230 Em7: 022030 G: 320033

Aメロ: D/F# | Asus4 | Em7 | G × 2
So they say that time ~ But I'm still the same
And they say that I ~ That can't be true

Bメロ: Em7 | G | D/F# | Asus4
Why didn’t I realize? ~ Yeah I wish that I could do it again
Turnin’ back the time ~ were mine (all mine)

サビ: D/F# | G | Em7 | Asus7 × 2
So this is heartache? ~ 涙へとかわりoh baby
So this is heartache? ~ 思い出に変わる
I miss you

間奏: D/F# | Asus4 | Em7 | G

Aメロ: D/F# | Asus4 | Em7 | G × 2
僕の心を唯一満たして去ってゆく君が
僕の心に 唯一触れられる事ができた君はOh baby

Bメロ: Em7 | G | D/F# | Asus4
もういないよもう何もないよ ~ that I could do it again
Turnin’back the time back when you were mine (all mine)

サビ: D/F# | G | Em7 | Asus7 × 2
So this is heartache? ~ 涙へとかわりoh baby
So this is heartache? ~ 思い出に変わる
I miss you

Cメロ: G | D/F# | Asus4 | Em7 × 3 (※変則ストローク)
It’s so hard to forget ~ 解けなくなって離れれなくなった

G | D/F# | G | Asus4
今は辛いよ それが辛いよ すぐ忘れたいよ 君を

サビ: D/F# | G | Em7 | Asus7 × 3
So this is heartache? ~ 涙へとかわりoh baby
So this is heartache? ~ 思い出に変わる
I miss you I miss you

D/F#
I miss you

(iOS)え?まだ電子辞書使ってるの?日本人に本気でお勧めする英語辞書

Background

こんにちは.pruneです.今回は日本語のみの更新になります.
実はこの記事は昔書いたものとかぶります.
さて,英語を勉強する際に辞書はほとんどの人にとって必要なものです.
もちろん人によっては英英辞書,英和辞書,和英辞書と必要になるものが違います. カナダで勉強している身の私にとっては,英英辞書と英和辞書が必要です.

日本人の特徴

こちらにきてすごい気になることがあります.
ほぼほぼ日本人だけ電子辞書を使います. 他の国の方はGoogle翻訳や各国の辞書アプリをダウンロードして携帯上で辞書を使っています. (もちろん紙の辞書使うときもあります.)

Google翻訳

ブラジル人とかがよく使うのにGoogle翻訳の辞書があります. でも,正直アジア人にとってこれはかなりわかりづらいものです. なんでアジア人に悪いかというと,文法がまずちがうこと,文字自体が違う事が上げられます.
スペイン語やポルトガル語は英語ににているところがあるので,彼らに取っては問題はないとは言えませんが,まぁ使える辞書だと思います.
アジア人にとってはそもそもアルファベットのようなものを使ってないので意味を知ったところで,使えません.

おすすめな辞書アプリケーション

もちろん有料版の辞書使うと良いでしょう.
でも結構高いですよね…
さて,ここでお勧めしたいのがSerach Tab
実はiOSにはデフォルトでNew Oxford American Dictionary, Oxford Dictionary of English, ウィズダム英和/和英辞書などなど計18種類の辞書が利用可能です.

使い方

アプリケーションダウンロードしてください.
設定から辞書を使用するように設定してください.(Wikiなどのページも使用可)
そして適当な単語を入力してください.
左下に辞書の設定があるので,それをタップして辞書の設定を行ってください.

この辞書を使うメリット

なんでこの辞書を使うか説明します.
英語を勉強してて思ったこと.英英辞書使いたい,でもたまに理解できない……そんなときは英和辞書を引く……時間かかる……二度手間……
一回で英語と日本語の辞書引けたらいいのに!!Why not?
Appの辞書は複数設定できるので一回の検索で複数の辞書を引けます!!
辞書のQualityはもちろん有料版と等しいです.

「えーアプリケーションの辞書ネット必要じゃん,海外にいるから,携帯が…」
これデフォルトの機能ですよ?そうインターネット接続いらないんです.もちろんWikiとか他のサイトの辞書設定したら必要ですけど,デフォルトのやつはいりません!!

電子辞書

電子辞書も同時に引けますが,ちょっと遅い,電池必要,邪魔.


バグ

アップルの辞書を設定する場合,その設定が消えることがあります.
そういう時はアプリケーションのメモを開いて,適当な単語をノートに打ってください.
それから単語を選択すると[辞書]というのが出てくるのでそれを押すと,アプリと同じ画面の辞書がでてきます.そこから必要な辞書を再インストールしてください.
(たまに二回くらいやらないといけない)

アプリ

このアプリは入力された単語をただ単にAppleのデフォルト辞書に投げているだけです.
なので辞書の設定のバグとかはAppleのバグです.

Androidの人

ごめんなさい

Adware Removal Tool for Mac/Windows

Do you know what adware is?

Adware is software that displays advertisements and is integrated into another program offered at no charge or at low cost or a type of spyware that gathers information about an Internet user's browsing habits and displays targeted or contextual advertisements, that is, it looks like a virus. My friends said "Please help me!! I got a virus on my laptop!!", but it was not virus, it's adware actually. I repaired laptops which are infected adware. Maybe, 3 to 5 of them. Something like this. This pic from Vilmatech.com

f:id:chikesomnia:20141130081431j:plain

Becoming popular

Four month ago, I got adware. It was first time to infect something on my laptop because I can recognize that how we get a virus or adware. For example, something looks like hazardous software or has a virus, but I did. (I wanted to watch 24 season 9, so I downloaded a software usually I do not download. At the time also my brain warned me:"Do not download it." You know, 24 is so magnetic TV show...)
Anyway, it was difficult to find information about adware for Mac OS X. I could not look it up, besides, there are lots of ineffective information. It made me confused more, so that's why I wrote how to remove adware on this blog in Japanese. Then, only in this month, I got over 2000 hits on the article. But I thought it was only for Japanese, and I repaired my friends laptops, they are not Japanese, so I think I should write this article.

How to remove adware for Windows

Actually, if you know what "Adware" is, you can search by your self.
1. You HAVE TO remove the application which is the origin of bringing adware.
[Windows start menu]->[Control Panel]->[Programs and features]->Find application program you installed]->deleted If you could not understand go this page
2. Download Adware removal tool, AdwareCleaner 4.101(on Nov 29, 2014)
Download and install Adware removal tool, Adware Cleaner 4.101 on your desktop(because it's easy to find the tool, sometimes my friends lost it where it is.)
3. Execute the tool
Probably, you can see like this picture.
4. Scan
Just click Scan.
5. Clean
Then, click Clean!! You will be fine!! If you are still in trouble, it's not adware so ask someone good at computers or go to shop or google...

f:id:chikesomnia:20141130080840j:plain

How to remove adware for Mac

For Japanese
1. Delete the Application which brought adware.
I used AppCleaner to delete app. If you want, you can install it from App Store.
2. Go to this site.
Then, download TSM Adware Removal Tool
3. You have to kill a browser you are using now.
Before you execute this tool, you have to stop a browser.
4. Execute TSM Adware Removal Tool.app
When you carry out this app, click the right mouse button to open it, then you can see "Open."
5. Tha app asks you some questions.
Just click "OK."
6. Open a browser, then check you still have adware or not.
You will be fine, won't you?

Incidentally...

I found a lot of sites which said use Adblock Plus, but it just stops displaying advertisements. I mean it is not a solution to remove adware.

The reason why I do not recommend a purchase Mac if someone who asks me "Mac is good?." / こんな人には個人的にMacをお勧めしない理由

English and Japanese

日本語で読みたい人は続きを読むから.

First of all

"Do you think Mac is good?" my friends always ask me. At the time, I can't understand why they ask me the question because the answer depends, and if the question point is on the quality, in my opinion, it's better than Windows, but just remember, it's for me. Actually, I can't answer it because I do not know how you usually use your laptop. If I know that, probably I will answer the question for you or I can give you advice.

There is some reason that if you ask me the question, I will say "NO" FOR YOU.

  1. You have to memorize how to use new OS for you again.
    Do you know how to use Windows? You don't have any problem with Windows? Can you look it up by yourself when you are in trouble with computers? If you can say "Yes." maybe you can use apple products, but still I don't know it's good for you or not.
  2. Do you have the environment you can ask about Mac.
    Maybe, they will help you when you have problems with Apple products, but you don't have it, don't buy it.
  3. If you are in companies, you should use Windows.
    If you can cope with interchangeability between Windows and OSX, nobody criticize you for using Apple products. If you do not understand what interchangeability is, don't buy it. Otherwise, I think you will say "Sorry."
  4. You cannot use OSX like windows.
    "Why I can't reload the page when I push the F5!?" "Why I can't close this application? I clicked the ×!!" "How can I eject this USB!?" Something like this. You should understand what OS is. OSX is not alternative OS to Windows.
  5. "I cannot find the free software such as Windows!!"
    USE WINDOWS.
  6. I want to be COOL!!
    "You know, if I buy Mac and go to Starbucks then I will use Mac!! Sooo cool!! I will do that!!" If someone who is using Mac in Starbucks, then he/she is programming, maybe it's cool.(Again, maybe) But I mean it depends on the user. The reality is different and merciless. (Come on cute girls!!)

I don't know why people who are using OSX can use Windows also.

Even thought they've used OSX, they can answer that how to use Windows. I think because they can find the solutions on Google. So I think if you find something you want to know about computers, you can use OSX anyway.

続きを読む

Use default dictionary function on Apple device(Apple端末でdefaultの辞書を使う)

This article was written in English and Japanese.
If you want to read in Japanese, please scroll down. 日本語で読みたい人は続きを読むから
Sorry, there are many mistakes in English, but I hope you understand it.

first

hi, I'm prune. i have studied English in Canada. There are many opportunities to use dictionary. Japanese students usually bring an electronic dictionary, but other country students use dictionary on a phone. What are you using application for dictionary? If you have Apple's terminals, you can use default dictionaries.

Default dictionaries

Apple devices actually have many dictionaries. The reason why almost people doesn't recognize default dictionaries is there is no application.

How to use those

When you touch and hold on word you don't know, "Define" is show up on your screen.

f:id:chikesomnia:20140707041150p:plain

You can touch "Define" then there are defined dictionaries on your phone. No dictionaries? All right, you can download dictionaries you want. Touch at the lower left "Manage". You can define new dictionaries.

f:id:chikesomnia:20140707041700p:plain

f:id:chikesomnia:20140707041713p:plain

Use for application

When you want to look up, you have to type a word. Default dictionary doesn't have the function, but you can do it. You should download. Download Quick Define

f:id:chikesomnia:20140707051049p:plain

The reason why I recommend this app is

When you want to look up a word on plural dictionaries, usually, you must type two times and different applications. It is so uncomfortable for us and it takes long time because you have to use some applications.
This application doesn't need it because you can use many dictionaries, and it is free! Then, you can save 100words as history.
And this application does't need internet connection ,so you can search any time.
Download now if you want!

f:id:chikesomnia:20140707051017p:plain

Thanks
日本語

続きを読む

Mac OSX 10.9.3でブラウザ広告にやられた

お久しぶりです

どうもpruneです.
パソコンをやり始めてから初めてうっとうしい広告のアドウェア(Adware)的なものに引っかかりました.
大学時代の研究室のLineで相談したところ解決策をmoominが見つけてくれました!
ありがとう!危うくクリーンするところだったよww

Adwareとは?

software that automatically displays or downloads advertising material (often unwanted) when a user is online. -Google
つまり簡単に言うとソフトウェアの一種で画面に広告(アドバタイズメント)を大量に出してくれるみたいです.とても余計なお世話だ.パソコンに詳しくない人は「うわ!ウイルス!」とか「なんだこのポップアップたちは!」って思うはずです.セキュリティ会社によってはトロイの木馬の一種として扱われていることもあると思います.

症状

  1. google検索結果画面右側と一番下に広告
  2. googleのtextboxをクリックする度にMackeeperの広告が新しいタブで開かれる
  3. どこのページを訪れても小さい広告が出てる
  4. Wikiなどの特定のページに行くと右, 下, 左にでかい広告
  5. 特定の英文字が緑色に変化しカーソルを載せると広告を表示
    直す前にスクショ撮るの忘れちゃったごめんなさい.

試した解決策(一応全部やってみた方が安心)

  1. 原因となったApplicationの削除(from AppCleaner.app)
    自分の場合はMPlayerXとかいうやつです.結果ダメでした
  2. ブラウザのキャッシュやcookieなどの削除
    使っている全てのブラウザのcookieなどを削除しました.自分の場合はChrome, Safari, FireFox, Operaです.結果ダメでした.
  3. アドオンなどの確認
    調べたところ,アドオンが追加されることもあるので確認してください.自分の場合なにもありませんでした.
  4. Magicanでスキャン
    このApplicationはトロイの木馬などをスキャンしてくれるものです.自分の場合なにも見つかりませんでした.
  5. ClamXavによるスキャン
    あるブログで同じような広告問題をこれで直したというのを見つけました.このブログでも4番までの手順を踏んで全て自分と同じ結果だったようです.このブログではClamXavで解決していました.僕の場合は解決しませんでしたが複数の警告ファイルを見つけたので削除しました.
  6. TSM Adware Removal Toolの実行
    ついに来た!moominが解決したURLだけ投げてくれましたww
  7. Flashbackの確認
    Flashbackとは個人情報を盗む目的のMacを標的にしたマルウェアです.今回Flashbackの可能性も含めてコマンドで一応確認しました.
% defaults read /Applications/[Browser name].app/Contents/Info LSEnvironment

Browser nameの場所にBrowserの名前を入力してください.FirefoxならFirefox.appですし,ChromeならGoogle Chorome.appですね.結果に

% The domain/default pair of (/Applications/[Browser name].app/Contents/Info, LSEnvironment) does not exist

が帰ってきたら大丈夫です.ただしタイプ1とタイプ2があり,上記の手順はタイプ1を調べるものです.タイプ2を調べる為には下記のコマンドを入力してください.

% defaults read ~/.MacOSX/environment DYLD_INSERT_LIBRARIES

これがタイプ2を調べるコマンドです.結果に

% The domain/default pair of (/Users/joe/.MacOSX/environment, DYLD_INSERT_LIBRARIES) does not exist

が帰ってきたら感染していません.感染していた場合下記のコマンドを実行してください.

# タイプ1に感染していた場合
% sudo defaults delete /Applications/[Browser name].app/Contents/Info LSEnvironment
% sudo chmod 644 /Applications/[Browser name].app/Contents/Info.plist

# タイプ2に感染していた場合
% defaults delete ~/.MacOSX/environment DYLD_INSERT_LIBRARIES
% launchctl unsetenv DYLD_INSERT_LIBRARIES

自分のケースでは感染していませんでした.

直し方(TSM Adware Removal Tool)

  1. Download
    もう見れば分かりますけどTSM Adware Removal Toolに飛んでTSMART.zipをダウンロードしてください.
  2. 解凍
    そして解凍してください.
  3. ブラウザの終了
    実行する前にブラウザを終了してください.
  4. TSM Adware Removal Tool.appの実行
    そしてTSM Adware Removal Tool.appを実行してください.実行する際には右クリックして[開く]を実行します.
    いくつか確認の質問やらがでるので[OK]を押していって終わったら終了です!
  5. ブラウザの確認
    ブラウザを開いて広告が出ないことを確認してください.

  1. ゴミ箱を空にする(12月9日追記)
    ゴミ箱にzipファイルとしてadwareをまとめて捨てられるみたいです.なので,スクリプトを実行した後はゴミ箱をねんの為に空にするといいと思います.

余談

一番多い解決策にAdblock Plusが提案されていましたが,これはただ単にその名の通りブロックしてるだけなので,根本的な解決にはなっていません.


結構文献があったので悩んでる人は多いと思います.どれもが違った解決策だったのでこうやってまたブログを書くことによって目に触れやすくなるので,一人でも役に立てば幸いです. 英語の日記時間があるときにまた書きたいと思います.

大学時代の仲間も頑張ってるので自分もがんばります.
moominありがとね!