Chromeのブラウザアクセス時に、ipアドレスを変更することができるChrome Extension.
ユーザー数が100万人って、思ったより少ない気がしますが、まず入れてみましょう。
Chromeに追加したら、接続します。
うーん、なんか上手くいかないな。
随机应变 ABCD: Always Be Coding and … : хороший
Chromeのブラウザアクセス時に、ipアドレスを変更することができるChrome Extension.
ユーザー数が100万人って、思ったより少ない気がしますが、まず入れてみましょう。
Chromeに追加したら、接続します。
うーん、なんか上手くいかないな。
The env command sets an environment variable and executes a program.
option
– 0 : Make the end of the displayed line not a new line but a byte with a value of 0.
– i : Run the program without envrionment variables.
– u : variable name if the specified variable name is in the list of environment variables, delete it.
[vagrant@localhost ~]$ env HOSTNAME=localhost.localdomain NVM_CD_FLAGS= PYENV_ROOT=/home/vagrant/.pyenv TERM=xterm SHELL=/bin/bash HISTSIZE=1000 SSH_CLIENT=192.168.35.1 63549 22 SSH_TTY=/dev/pts/0 NVM_DIR=/home/vagrant/.nvm USER=vagrant LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: PYENV_VIRTUALENV_INIT=1 MAIL=/var/spool/mail/vagrant PATH=/home/vagrant/.nvm/versions/node/v10.12.0/bin:/home/vagrant/.pyenv/plugins/pyenv-virtualenv/shims:/home/vagrant/.pyenv/shims:/home/vagrant/.pyenv/bin:/home/vagrant/.rbenv/shims:/home/vagrant/.rbenv/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/vagrant/bin PWD=/home/vagrant LANG=ja_JP.UTF-8 RBENV_SHELL=bash HISTCONTROL=ignoredups PYENV_SHELL=bash SHLVL=1 HOME=/home/vagrant LOGNAME=vagrant SSH_CONNECTION=192.168.35.1 63549 192.168.35.10 22 NVM_BIN=/home/vagrant/.nvm/versions/node/v10.12.0/bin LESSOPEN=||/usr/bin/lesspipe.sh %s G_BROKEN_FILENAMES=1 _=/bin/env
$ npm install –save puppeteer
main.js
const puppeteer = require('puppeteer'); const url = 'http://www.google.co.jp'; (async function(){ const browser = await puppeteer.launch(); const page = await browser.newPage(); const response = await page.goto(url); await browser.close(); })();
[vagrant@localhost ~]$ node main.js
(node:9969) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
/home/vagrant/node_modules/puppeteer/.local-chromium/linux-662092/chrome-linux/chrome: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/home/vagrant/node_modules/puppeteer/lib/Launcher.js:342:14)
at Interface.helper.addEventListener (/home/vagrant/node_modules/puppeteer/lib/Launcher.js:331:50)
at Interface.emit (events.js:187:15)
at Interface.close (readline.js:379:8)
at Socket.onend (readline.js:157:10)
at Socket.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
(node:9969) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9969) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
あれれ
[vagrant@localhost ~]$ nvm install v10.12.0
Downloading and installing node v10.12.0…
Downloading https://nodejs.org/dist/v10.12.0/node-v10.12.0-linux-x64.tar.xz…
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v10.12.0 (npm v6.4.1)
[vagrant@localhost ~]$ nvm use v10.12.0
Now using node v10.12.0 (npm v6.4.1)
[vagrant@localhost ~]$ node -v
v10.12.0
[vagrant@localhost ~]$ npm -v
6.4.1
The DNS name server holds the correspondence bewteen domain names and host names and IP addresses as a databases. The data processed by this database is called a “resource record”.
The structure and format of this database and resource record depend on the DNS server. The most famous DNS server software “BIND” holds a database called “zone file” as a text file. In BIND, resource records such as correspondence between host name and IP addresses are described in zone files.
– A
– CNAME
– MX (mail exchange)
– NS (name server)
– SOA (start of authority)
The correspondence bewteen domain names and IP addresses does not have to be one to one. Multiple IP addresses can be associated with one domain name. In this case, plurality of IP addresses will be described in one A record.
AWS Route 53
AWSの場合、Aレコードがipアドレスではありませんね。Name Serverも.org, .net, co.uk, comの4つが登録されています。
EtherVPNってなに?
> SoftEther VPN (“SoftEther” は 「ソフトウェアによるイーサネット」を意味します) は、世界中で最も強力で使用が簡単な、複数 VPN プロトコルに対応した VPN ソフトウェアの 1 つです。SoftEther VPN は Windows、Linux、Mac、FreeBSD および Solaris 上で動作します。
>リモートアクセス VPN と 拠点間接続 VPN を簡単に構築できます。
>HTTP プロトコルを用いて SSL-VPN を伝送するため、NAT やファイアウォールを通過 できます。
>大変画期的な VPN over ICMP および VPN over DNS 機能。
なるほど、VPN接続ってことか。よりセキュアな接続をしたい時などに使いたいってことかしらね。
$(document).on('dragover dragenter dragend drag drop', function(e){ e.stopPropagation(); e.preventDefault(); });
> stopPropagation
> 親要素への伝播をキャンセルする。
ん?
<head> <meta charset="utf-8"> <title>Document</title> <style> .dd { line-height:300px; text-align:center; font-size:12px; color:#ccc; width:300px; height:300px; border:1px dotted #ccc; } </style> </head> <body> <div class="dd">ファイルをドラッグ&ドロップしてください</div> <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <script> $(".dd").on("drop", function(e){ e.preventDefault(); console.log(e.originalEvent.dataTransfer.files); }); $(".dd").on("dragover",function(e){ e.preventDefault(); }); </script> </body>
うん。
>ベントが明示的に処理されない場合に user agent に、そのデフォルトアクションを通常どおりに行うべきではないと伝えます。
え?何を言ってるのかさっぱりわからない。
デフォルトの操作をさせないって意味?
drag系のイベントに以下があるが、dragとdrop, dragenterは解るが、、、
dragover dragenter dragend drag drop
あ、mozillaに書いてありますね。
https://developer.mozilla.org/ja/docs/Web/API/HTML_Drag_and_Drop_API
> dragenter
ドラッグ中に、マウスポインタが要素の上に乗った最初の時点で発行されます。
> dragover
このイベントは、ドラッグ中にマウスポインタが要素の上で動いた時に発行されます。
> drag
このイベントは、ドラッグ操作が行われている間、ドラッグ元の要素(※ dragstart イベントが発行された要素)において定期的に発行されます。
> drop
drop イベントは、ドラッグ操作の最後に、ドロップされた位置の要素において発行されます。
> dragend
ドラッグ元の要素は、ドロップに成功したかどうかに関わらず、ドラッグ操作が完了した時に dragend イベントを受け取ります。
なんだこれ、”drag”って、定期的に発行されるって、意味不明だな。
Githubより、qdmail.phpとqdsmtp.phpをダウンロードします。
Github QdmailをPHP7.0に対応させる
require_once('vendor/qdmail.php'); require_once('vendor/qdsmtp.php'); $mail = new Qdmail(); $mail -> errorDisplay(false); $mail -> smtp(true); $param = array( 'host' => 'xxxxx.xsrv.jp', 'port' => 587, 'from' => 'hoge@foo.xsrv.jp', 'protocol' => 'SMTP_AUTH', 'user' => 'username', 'pass' => 'password' ); $mail -> smtpServer($param);
なんか、本家のサイトがあるようなんだが、更新が2008年で止まっている模様。なんだこれは。。
http://hal456.net/qdsmtp/download
qdはあまりニーズがないのかな。
/rosources/views/layouts/app.blade.php
<li class="nav-item"> <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a> </li>
この{{ __(‘Login’) }}を変えると。
/rosources/lang/en/login.php
return [ 'Login' => 'ログイン2', ];
/rosources/views/layouts/app.blade.php
<li class="nav-item"> <a class="nav-link" href="{{ route('login') }}">{{ __('login.Login') }}</a> <!-- <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a> --> </li>
なるほど、{{ __(‘${hoge}’) }}は、ローカルのヘルパーのようですね。
参考:https://laravel.com/docs/5.6/localization#retrieving-translation-strings
サクッといきます。このあたりは、面倒ですな。