ホーム » 2018 » 12月

月別アーカイブ: 12月 2018

2018年12月
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,632 アクセス



Synology NAS で whois …

今まで,ログに残る変な IP を調べる時「IP 検索」のサイトを利用していた.
が,もう少し手軽に利用できないものかと…


検索すると,wiki WHOIS
さらに,【 whois 】コマンド――ドメイン情報を表示する


Linux のコマンドであれば,Synology NAS でも可能と思い試してみることに.

Iwao@DS116:~$ sudo -i
Password:
root@DS116:~# opkg update
-ash: opkg: command not found
root@DS116:~# cd /var/services/homes/Iwao/
root@DS116:/var/services/homes/Iwao# source ./set_ds_inc.sh
root@DS116:/var/services/homes/Iwao# opkg -v
opkg version 0.1.8
root@DS116:/var/services/homes/Iwao# opkg update
Downloading http://pkg.entware.net/binaries/armv7/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/packages
root@DS116:/var/services/homes/Iwao# opkg install whois
Installing whois (5.2.19-1) to root...
Downloading http://pkg.entware.net/binaries/armv7/whois_5.2.19-1_armv7soft.ipk
Installing libidn (1.33-2) to root...
Downloading http://pkg.entware.net/binaries/armv7/libidn_1.33-2_armv7soft.ipk
Configuring libidn.
Configuring whois.
root@DS116:/var/services/homes/Iwao# whois
Usage: whois [OPTION]... OBJECT...

-h HOST, --host HOST   connect to server HOST
-p PORT, --port PORT   connect to PORT
-H                     hide legal disclaimers
      --verbose        explain what is being done
      --help           display this help and exit
      --version        output version information and exit

These flags are supported by whois.ripe.net and some RIPE-like servers:
-l                     find the one level less specific match
-L                     find all levels less specific matches
-m                     find all one level more specific matches
-M                     find all levels of more specific matches
-c                     find the smallest match containing a mnt-irt attribute
-x                     exact match
-b                     return brief IP address ranges with abuse contact
-B                     turn off object filtering (show email addresses)
-G                     turn off grouping of associated objects
-d                     return DNS reverse delegation objects too
-i ATTR[,ATTR]...      do an inverse look-up for specified ATTRibutes
-T TYPE[,TYPE]...      only look for objects of TYPE
-K                     only primary keys are returned
-r                     turn off recursive look-ups for contact information
-R                     force to show local copy of the domain object even
                       if it contains referral
-a                     also search all the mirrored databases
-s SOURCE[,SOURCE]...  search the database mirrored from SOURCE
-g SOURCE:FIRST-LAST   find updates from SOURCE from serial FIRST to LAST
-t TYPE                request template for object of TYPE
-v TYPE                request verbose template for object of TYPE
-q [version|sources|types]  query specified server info
root@DS116:/var/services/homes/Iwao#


そのままでは Cannot open /opt/etc/whois.conf: Permission denied となる.

Iwao@DS116:~$ whois 27.92.169.109
Cannot open /opt/etc/whois.conf: Permission denied
Iwao@DS116:~$ sudo -i
Password:
root@DS116:~# cd /opt/etc/
root@DS116:/opt/etc# ll
total 28
drwxr-xr-x  3 root root 4096 Dec 28 10:55 .
drwxr-xr-x 11 root root 4096 Jan  4  2018 ..
drwxr-xr-x  2 root root 4096 Sep 25  2017 init.d
-rw-r--r--  1 root root    0 May 31  2017 ld.so.conf
-rw-r--r--  1 root root  282 May 31  2017 nsswitch.conf
-rw-r--r--  1 root root  142 Aug 16  2016 opkg.conf
-rwxr-xr-x  1 root root  471 May 31  2017 profile
-rw-------  1 root root  526 Jan  4  2018 whois.conf
root@DS116:/opt/etc# chmod 644 whois.conf
root@DS116:/opt/etc# exit
logout
Iwao@DS116:~$ whois 27.92.169.109
% [whois.apnic.net]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html

% Information related to '27.80.0.0 - 27.95.255.255'

% Abuse contact for '27.80.0.0 - 27.95.255.255' is 'hostmaster@nic.ad.jp'

inetnum:        27.80.0.0 - 27.95.255.255

...

last-modified:  2011-03-01T18:11:04Z
source:         JPNIC

% This query was served by the APNIC Whois Service version 1.88.15-46 (WHOIS-JP4)


Iwao@DS116:~$
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

T5400 また青くなってしまった…

昼休みから戻ってくると,

T5400 ブルースクリーン
T5400 ブルースクリーン

最近は安定していたのに…
C ドライブの空きが少なくなってきた影響か?
取りあえず「ディスク クリーンアップ」を行って様子見.


2019/01/08
T5400 blue screen
今回は DS116 上の VHD を開いたままだったため,仮想マシンを起動しようとするとエラー.
vmc が壊れたためかと思い,新しく仮想マシンを作成してもダメ.
VHD を移動しようと操作すると,どこかで開いた状態になっているみたいで動かせない.
DS116 を再起動してうまく動作する様になった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

PHP 5.6 から 7.0 へ

以前調べた時,何かうまくない部分があったように思うが…
php.net PHP 5.6.x から PHP 7.0.x への移行
Synology NAS では簡単に戻せるので,7.0 に変更してみた.
設定は,DSM の「Web Station」.
ついでに,Apache も 2.4 に.

PHP 7 への設定
PHP 7 への設定

簡単に動作を確認していると,QR コードが表示されなくなっている.
この時と同じ現象,原因.
GD が動作していなかった.
gd を有効に
gd を有効に


2018/12/26
「Apache HTTP Server 2.4」では一部 500 となってしまうものがあり.
ちょっと調べる時間が取れないので 2.2 に戻すことに.
一部の .htaccess の中身がうまくなかった様で修正.
IndexIgnore となっていて,IndexIgnore * の様にファイルが指定されていなかった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Joomla! インストール

ブログ形式ではなく,仕様書などマニュアルの様な構成の記述ができないかと調べてみた.
今までは,次の様な感じて記述している.
http://itl.mydns.jp/Iwao/Doc/spec/3d/iges/iges.html
WEBマニュアルをワードプレスと無料テーマで作る方法」を見つけたが,ちょっと違う?気がする.


以前 WD Cloud に入れていた Joomla を思い出し,検索してみた.
Joomla!の道しるべ」を参考にさせてもらっていじってみた.
WD Cloud の Joomla は外からアクセスできなさそう.wordpress も同様だった.


Synology NAS に Joomla! をインストール.
「パッケージ センター」から「Joomla」を選択して「インストール」.

「パッケージ センター」-「Joomla」
「パッケージ センター」-「Joomla」


サイトの設定.

サイトの設定
サイトの設定

データベースの設定.
データベースの設定
データベースの設定

確認が入るので「_Joomla….txt」を削除.
データベースの設定-エラー
データベースの設定-エラー

インストール終了.
インストール終了
インストール終了

instllation ディレクトリを削除.


このインストール方法では,サンプルデータの「日本語(JP)デフォルト」がなくインストールできなかった.
インストール先は https://itl.mydns.jp/joomla/

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

ジブン専用パソコンキット2 追加

KoKaジブン専用パソコンキット2 が届いた.

KoKaジブン専用パソコンキット2
KoKaジブン専用パソコンキット2

箱は 2つ.
ジブン専用パソコンキット2 本体
ジブン専用パソコンキット2 本体

今日は組み立てまで.
パイケース組立マニュアル」の手順通りやれば難しくはないが,カバーを外すのが少しわかり難い?
赤い所に突起がある.
パイケース組立 3
パイケース組立 3

小さい方のヒートシンクは,大人は指が大きいので取り付けが難しい.


2018/12/25
はじめようジブン専用パソコン」連載のバックナンバーから,組み立てと設定.
組み立てて OS 起動直後はシステム日付が正しくない.
ネットワークの設定を行うと自動的に設定される?


2018/12/26
そのままでは使い勝手が悪いので,リモート接続を可能にするための設定.
Windowsパソコンからraspberrypi3にリモートデスクトップで接続する」を参考にさせてもらい設定.
実際に入力したのは,
$ sudo apt-get update
$ sudo apt-get install xrdp
「日本語キーボードの配列を追加」はやっていない.
他に「Raspberry Pi の設定」で「SSH」を「有効」に.

リモート接続と SSH 接続
リモート接続と SSH 接続


DS116 とは違い,zip と unzip があることは確認.7z はない.
以前調べて知ってはいたが gcc はちゃんと入っている.


2018/12/28
今日起動すると,
SSH is enabled and the default password for the ‘pi’ user has not been changed .
This is a seurity risk – please login as the ‘pi’ user and run Raspberry Pi Configuration to set a new passowrd .

pi SSH warning
pi SSH warning

自分でしか使わないので,そのままに.


WebGL で作成したページを表示すると,あまり綺麗に表示できない.

WebGL のページの表示
WebGL のページの表示


あると便利かも?

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

include ファイルの大文字

Windows 上で動作しているコンソール AP の Synology NAS 上での動作テスト.
NAS 上でコンパイルすると include ファイルがないエラー.
今まで include する時,大文字と小文字を正しく指定できていた.
が,今回タイプミスで小文字となってしまっていたためのエラー.


g++ 時に大文字,小文字を無視する方法がないか調べたがわからず.
いろいろ考えたが,Linux 環境などでも互換性が取れるコードは小文字のファイル名とすれば都合が良さそう.
MFC や Windows.h を使用している時は,今まで通り大文字が混在するファイル名とする.

インクルードしているファイル

関連するファイルを全て編集するのは時間がかかるし間違いも増えそう.
そこで,新規のファイルと変更するファイルなどから徐々に修正することにする.
新規や変更時,include する所で lowname.hxx などとする.
LowName.hxx となっているファイルは,gcc でのみインクルードするディレクトリにコピー.
元のファイルは lowname.hxx にリネーム.
gcc にコピーした LowName.hxx は #include “lowname.hxx” の様に間接的にインクルードする様に変更する.
これでうまく機能することは確認した.
が,robocopy や Dropbox を使用している関係で lowname.hxx にならないことがある.


2019/04/16 追記
robocopy で lowname.hxx にならないことに関しては,一度コピー先を削除(実際は移動)して対応.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

送信された URL に noindex タグ…

先日 All in One SEO の設定を変更して「送信された URL に noindex タグが追加されています」となってしまった.

URL に noindex タグが追加されています

All in One SEO の「XML サイトマップ」の「日別アーカイブページを含める」のチェックを外した状態に変更.
日別アーカイブページを含める

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Wi-Fi と Bluetooth

以前に比べると T90Chi 付属のキーボードが反応しなくなることが増えた.
Bluetooth が途切れているみたいで,マウスも同様.
今年の 4 月,RT-AC86U などを追加したのでその影響と思われる.

2G帯のチャンネルの状態

T90Chi の Wi-Fi 設定で,2G での接続を止めてみた.
少しは良くなったので,この状態で様子見.


http://kiyosu.cs.chubu.ac.jp/JapanOpen2012/wireless_03_JOpen2011.pdf

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

マネタイズの…,日経Linux2019.1

Google AdSense マネタイズの教科書[完全版]と日経Linux 2019年1月号を購入.


Google AdSense マネタイズの教科書[完全版]

まだ半分くらいしか読めていないが,内容は濃いと思う.
ただ,自分でそこまでできるかとなるとかなり疑問が…
一先ず,「元を取ることを目標に」と思う.


日経Linux 2019年1月号

何年か前から,gcc が使える環境を探している.
以前は mac 上でやったり,仮想環境に Linux を入れたりしていた.
最近は Synology NAS 上が増えてきたが,あまり使い勝手がよくない.
いろいろと調べていると Raspberry Pi が使えそう.

今狙っているのは「ジブン専用パソコンキット2」.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

AMP for WordPress に AdSense

AMP for WordPress が更新されていた.
暫く気付かず…


html_start.php

<head>
    <!--	...	-->
    <script async custom-element="amp-auto-ads"  src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" > </script>
    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"> </script>
    <script async custom-element="amp-iframe"    src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"   > </script>
</head>
<body class="<?php echo esc_attr( $this->get( 'body_class' ) ); ?>">
    <amp-auto-ads type="adsense"
        data-ad-client="ca-pub-????????????????">
    </amp-auto-ads>

    <amp-analytics type="googleanalytics">
        <script type="application/json">
        {
            "vars": {
                "account": "UA-????????-?"
                },
            "triggers": {
                "trackPageview": {
                    "on": "visible",
                    "request": "pageview"
                    }
                }
            }
        </script>
    </amp-analytics>

html_end.php

    <div style="text-align: center;">
        <amp-iframe src='//itl.mydns.jp/f_index.html' sandbox="allow-scripts" width='250px' height='250px'> </amp-iframe>
    </div>

</body>
</html>
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Firefox 64 と Vivaldi

今日 Firefox の起動時に,バージョン 64.0 に更新された.
最初,タブを「新しいウィンドウへ移動」する方法がわからなかった.
タブを「右クリック」して表示されるメニューの「Move Tab」の下になった.

「タブ」を「新しいウィンドウへ移動」

他に気になる動作としては,
target=”_blank” と記述している所が「新しいウィンドウ」で開かれる.
以前は「新しいタブ」だった?


DS116 へのアクセスログを見ていた時,Vivaldi/2…. となっているのがあった.
wiki によるとシェアは高くない.
Vivaldi日本語公式ブログによると「動作がサクサク」とあるので,インストールしてみた.
まだ少ししか使ってないが,よく使う機能での不満は「レスポンシブデザインモード」.
それとも単に使い方がわかってないだけ?


2018/12/18
target=_”blank” となっている時,新しいウィンドウを開く様になってしまっていた.
初期値が変わったのか,間違って変更してしまったのかは不明.
設定場所は,メニューの「ツール」-「オプション」-「一般」-「タブグループ」にあった.

target=”_blank” を「タブ」で開く設定

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

All in One SEO の設定

Web で検索した時,ここの日付別アーカイブが列挙されることが多い気がする.
検索結果に表示されるページ内容の一部では,飛んだ先が判断できないものもあり.
All in One SEO の設定で「日付別アーカイブに noindex を使用」にチェックを入れて様子見.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Google アナリティクスの設定

analytics.js と gtag.js .


index.html など,エディタで書いた html .
Google アナリティクスに関して,次の 2 つの書き方が混在していた.

    <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

        ga('create', 'UA-TRACKING_ID', 'auto');
        ga('send', 'pageview');
    </script>

    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-TRACKING_ID"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-TRACING_ID');
    </script>

検索すると,上の analytics.js は古い形式みたい.

 Google アナリティクスの設定
 最新!?Google Analyticsの「Global Site Tag」(gtag.js)

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Synology NAS で zip

Synology NAS 内(SSH 接続)で,zip ファイルを扱えないかと…
検索すると,Linux 環境では zip や unzip があるらしい.
SSH で接続して確認すると,zip はあるが unzip は command not found .
さらに検索すると Synology Forum に情報があった.
 Unzip?
7z コマンドが利用できるみたい.

Iwao@DS116:~$ zip
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th 2008). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
  The default action is to add or replace zipfile entries from list, which
  can include the special name - to compress standard input.
  If zipfile and list are omitted, zip compresses stdin to stdout.
  -f   freshen: only changed files  -u   update: only changed or new files
  -d   delete entries in zipfile    -m   move into zipfile (delete OS files)
  -r   recurse into directories     -j   junk (don't record) directory names
  -0   store only                   -l   convert LF to CR LF (-ll CR LF to LF)
  -1   compress faster              -9   compress better
  -q   quiet operation              -v   verbose operation/print version info
  -c   add one-line comments        -z   add zipfile comment
  -@   read names from stdin        -o   make zipfile as old as latest entry
  -x   exclude the following names  -i   include only the following names
  -F   fix zipfile (-FF try harder) -D   do not add directory entries
  -A   adjust self-extracting exe   -J   junk zipfile prefix (unzipsfx)
  -T   test zipfile integrity       -X   eXclude eXtra file attributes
  -y   store symbolic links as the link instead of the referenced file
  -e   encrypt                      -n   don't compress these suffixes
  -h2  show more help
  -yf  store files/directories that symbolic links point to in an archive
  -cp  codepage, ex: fre,ger,ita,spn,cht,chs,jpn,krn,ptb,rus,dan,nor,sve,nld,plk,ptg,hun,trk,csy

Iwao@DS116:~$ unzip
-sh: unzip: command not found
Iwao@DS116:~$ 7z

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.utf8,Utf16=on,HugeFiles=on,2 CPUs)

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]

<Commands>
  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
<Switches>
  -ai[r[-|0]]{@listfile|!wildcard}: Include archives
  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
  -bd: Disable percentage indicator
  -i[r[-|0]]{@listfile|!wildcard}: Include filenames
  -m{Parameters}: set compression Method
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  -scs{UTF-8 | WIN | DOS}: set charset for list files
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout
  -ssc[-]: set sensitive case mode
  -t{Type}: Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
  -v{Size}[b|k|m|g]: Create volumes
  -w[{path}]: assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
  -y: assume Yes on all queries
Iwao@DS116:~$    


Synology NAS で zip , unzip , 7z
Linux での zip コマンド


NAS で zip コマンドを使用したページ
https://itl.mydns.jp/i_Tools/up_bg_s/
up_bg_s
http://jml.mish.work/i-tools/360-panorama.html
http://jml.mish.work/i-tools/how-to-up-bg.html

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

カメラ座標からワールドに

{
    Prj ctow ;
    {   //  Prj の逆行列を求める
        Matrix pm ;
        Prj    prj(GetEyeChg().Get()) ;
        prj.Get(&pm) ;
        pm.Inv() ;	//  逆行列
        ctow.Set(pm) ;
        }
    for (size_t index=0 ; index<pnts.size() ; index++) {
        Vd3 pnt = pnts[index] ;
        for (size_t index3=0 ; index3<pntsXzY.size() ; index3++) {
            Vd3 pt3 = pntsXzY[index3] ;
            pt3.y = 0 ;
            if (::V3_is_near(pnt,pt3)) {
                Vd3 pntc = pntsXzY[index3] ;
                Vd3 pntw = ::ToVd3(ctow.P3to3(::ToP3(pntc))) ;  //  逆行列を掛けている
                pnts[index] = pntw ;
                break ;
                }
            }
        }
    }


Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.