2024年5月13日星期一

[VS CODE]HTMLをリアルタイムでプレビューする方法

Web制作の過程でリアルタイムプレビューを使いたい場合、Visual Studio Code(VS Code)の利用をおすすめです。

Visual Studio Code(VS Code)はマイクロソフトが提供している無料のコードエディタです。昔はAdobeのDreamWeaverを利用し、非常に高機能で使いやすかったが、MACのOSアップデートで、一括支払いバージョンからSaaSになって、高額で諦めました。

「コードエディタを使ってリアルタイムプレビューの環境を作る」と聞くと難しそうな印象を受けるかもしれませんが、実際は非常に簡単で3分ほどで完了します。

「VS CodeのUI上でプレビューする方法」があります。まずはVS Codeが必要なので、下記のページからダウンロードしてPCにインストールしましょう。



https://code.visualstudio.com/download

VS CodeのUI上でプレビューできる拡張機能もあります。ExtensionsからHTML Previewと検索し、下記が表示されたらインストールしてください。

ファイルに戻り、command + Shift + P(Windows:Ctrl + Shift + P)を押すと上に表示される検索窓から、HTML: Open Preview the the Sideを選択します。そうすると、右にプレビュー画面が出てきて、所見既所得....

DreamWeaverのような高機能ではありませんが、基本的なHTML、CSS、Javascriptについて、問題がありません。ただし、Pluginの開発は2018からすでに停滞しているので、いつかに使えなくなるのが心配です。

まだ、問題となりのがリンクです。プレビュー画面からリンクを経由でNext Pageの確認が不可です。全てAzureに誘導され、Azureの共有リンクから探しているようです。設定不備かエンジンのバグだと思います。

2024年5月10日星期五

[youtube-dl]Blocked?

 Just want to confirm if there is any newer version for YouTube-dl, unfortunately, it was blocked by de court...


It was shown that [Access denied] to yt-dl.org due to a ruling of the Hamburg Regional Court.

Access to this website is blocked.


So, we still have another way.

https://github.com/ytdl-org/youtube-dl

But it seems that it stopped development since 2021.

ーーーーーーーーーーーーーーーSuper beautiful seperate lineーーーーーーーーーーーー

After asked Google, I found the below repository.

yt_dlp

We can make some change on script to work on yt_dlp rather than Youtube_DL.

2024年5月6日星期一

[Panasonic]CF-SZ6 Fixed a SZ6 LCD Screen

Fixed a Panasonic CF-SZ6 LCD Screen, but found that although it passed the selftest, but failed on startup beep.

Why?

Changed the module board, but it can not work fine yet.

Maybe motherboard connecter broken.



2024年4月25日星期四

[LINUX]Install CentOS on VMWare can not enable network connection

 Tested install CentOS7 on an old VMWare with ESXi 5.5.

After change VM resource memory more than 2 GB, installed CentOS7 successfully.

But anyway, I can not get the network work.

I checked any possible reason, including but not limited to VM resource, VM network, Device on CentOS, etc., everything is working fine. But CentOS will have no network.

BTW, configure on CentOS also setup properly like below: (let's suppose that you have the interface as enp0s3 with the static ip 192.168.1.11/24)

nmcli d  ## to check which interface you are using.

nmcli c modify enp0s3 ipv4.address 192.168.1.11/24  ## setup ip

nmcli c modify enp0s3 ipv4.gateway 192.168.1.1 ## setup default gateway 

nmcli c modify enp0s3 ipv4.method manual  ## static ip

It will change [BOOTPROTO=dhcp→none]

sudo systemctl restart networkmanager

Does it seem fine?

No, there is a very important thing.

You have to enable the network interface first via below:

nmcli c m enp0s3 connection.autoconnect yes 

It will change [ONBOOT=no→yes], or the interface will not work as you expected. 


You may also need below step to confirm the network to see if it can working fine.

Show network configuration.

nmcli d show enp0s3

Edit host file to obtain your host name with your ip.

192.168.1.1 your_router_name #router

192.168.1.11 your_hostname #

Confirm [/etc/resov.conf], it should show something as below:

nameserver 192.168.1.1

Then ping local and remote URL to see if the DNS can resolve the domain name and get ICMP traffic from them. 

 

[MacOS]Add auto log function to terminal.app

Boring with Mac terminal color of white and black?

Ok, you can change the theme.

I like the homebrew theme, but it has too bright color for text.

OK, that is not my point.

For some reason, I need to add a function for terminal.app on Mac to record the command and screen output as what I can see.

You can go to the menu, [Terminal] -> [Configuration] -> Click the theme you are using [Shell]. Then you will see a startup shell command input.

 now=`date +%Y%m%d%H%M%S`;logpath=~/scriptlogs/script_${now}.txt;script ${logpath}

Just copy and paste above. It will add auto execute script when terminal.app start up and execute it with script command of unix.

You also can change the following path to where you want to keep your log. "~/scriptlogs/"  

Then check the execute in shell. You need shutdown terminal.app and start it again.

Now you have an auto log for Mac terminal.app.

But most people will ignore one thing...

If you try to execute the command [cat the log] in the terminal.app, you will get into a loop...and a fast increased size log file till your system crash. 

Because the screen out put will be written to log imediately and it was also shown as standard output then it will be recorded to log again and again. 


2024年4月24日星期三

[CentOS]When trying to install CentOS stream on VMware, it got [kernal error] error

Just want to try new CentOS stream, so reopen the VMware machine.

It is running on a very old ESXi 5.5 via a vSphere center 5.5 from about 10 years ago.

After mounted the OS, it showed below [Kernal panic] error.


Considered it is a very old system, then I tested CentOS7. Same error occurred.

So it should be a something else.

Noticed that I created the VM machine based on ESXi default configuration. It was set the memory as 384MB as a template for CentOS 4/5/6 or any Linux version. That is it.

CentOS 7 run in a necessary requirement at least 1GB memory. Sorry, no any official document link, just got advices from many sites...

In fact, I set it as 512MB, it is also running.

2024年4月18日星期四

[LinkedIn]How to enable #OpenToWork Tag in LinkedIn

This is nothing related to technic, just for the feature of LinkedIn.

It is really hard to find it....

 

To enable the #OpenToWork feature:

  1. Click the Me icon at the top of your LinkedIn homepage.
  2. Click View profile.
  3. Click the Open to button.
  4. Click Finding a new job.
  5. Provide the requested information in the pop-up window that appears. ...
  6. Click Add to profile.