2019/10/29

How to make a Windows To Go USB disk

1.Press start menu button and type cmd to open it
2.Type "diskpart" to open disk tool
3.Type "list disk" to find your target disk
4.Type "select disk 8" to use target disk
5.Type "clean" to wipe target disk
6.Type "create partition primary" to create new partition
7.Type "format fs=ntfs quick" to quick format new partition
8.Type "assign"
9.Type "active"
10.Type "exit" to leave disk tool
11.Type "dism /apply-image /imagefile:Z:\sources\install.wim /index:1 /applydir:X:\" to install Windows in your disk
12.Type "bcdboot X:\Windows /f all /s X:\" to create bootable file in your disk

2019/09/03

Web Browser Driver (for automation test) Download Link

Microsoft Internet Explorer 11
https://www.microsoft.com/en-us/download/details.aspx?id=44069

Mozilla Firefox
https://github.com/mozilla/geckodriver/releases

Google Chrome
https://chromedriver.chromium.org/downloads

How to install Selenium by Python on CentOS 7

Installation
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo yum -y update
sudo yum -y install epel-release
sudo yum -y install python
sudo yum -y install python-pip
sudo pip install selenium

Check version

python
import selenium
print selenium.__version__

2019/08/28

How to open Google Chrome while remote login by SSH session on Windows 10

1.Download Xming X Server for Windows and install
2.Download putty.exe
3.Open XLaunch
4.Set display settings and click Next

How to use MRTG to generate network traffic report

1.Download ActivePerl and install
2.Download mrtg-2.17.7.zip
3.Extract mrtg-2.17.7.zip to E:\
4.Go to E:\mrtg-2.17.7\bin
5.Open cmd.exe
6.Type E: then press Enter to go E partition
7.Type cd mrtg-2.17.7\bin then press Enter to go this path
8.Type perl cfgmaker public@IP --global "WorkDir: E:\mrtg-2.17.7\bin" --output lan.cfg to create lan.cfg
9.Type perl mrtg lan.cfg to generate network traffic logs and pictures
10.Type perl indexmaker --output E:\mrtg-2.17.7\bin\lan.html --title=mrtg lan.cfg to generate summary report

2019/07/31

How to enable SNMP Service on Windows 10 Build 1809

1. Open PowerShell as administrator
2. Type and execute Get-WindowsCapability  -Online -Name "SNMP*" to check SNMP service didn't install
3. Type and execute Add-WindowsCapability  -Online -Name "SNMP.Client~~~~0.0.1.0" to install SNMP service
4. Type and execute  Get-Service -Name snmp* to check SNMP service is running now


2019/07/26

How to find largest files or directories on Linux system

sudo cd /
sudo find . -type f -print0 | xargs -0 du | sort -nr | head -20 | cut -f2 | xargs -I{} du -sh {}
or
sudo find . -type d -print0 | xargs -0 du | sort -nr | head -20 | cut -f2 | xargs -I{} du -sh {}

2019/07/25

How to make VMware ESXi image with NIC driver

1.Download and install VMware PowerCLI
https://my.vmware.com/web/vmware/details?downloadGroup=PCLI650R1&productId=614

2.Download NIC drivers(.vib) for VMware ESXi
https://vibsdepot.v-front.de/wiki/index.php/List_of_currently_available_ESXi_packages

3.Download ESXi-Customizer-PS
https://www.v-front.de/p/esxi-customizer-ps.html#download

4.Set the PowerShell Execution Policy
(a)Select Start > All Programs > Windows PowerShell version > Windows PowerShell   
(b)Type "Set-ExecutionPolicy RemoteSigned" and run for Remote Signed
(c)Type "Set-ExecutionPolicy Unrestricted" and run for Unrestricted

5.Execute ESXi-Customizer-PS-v2.6.0.ps1 to make a VMeware ESXi 6.7 customized iso file
(a)Open VMware PowerCLI
(b)Type .\ESXi-Customizer-PS-v2.6.0.ps1 -v67 -vft -load net-e1000e,net55-r8168 -pkgDir 'E:\VMwareESXi\NIC_Driver_ESXi' -outDir 'E:\VMwareESXi\customized_iso' and run
(c)Go to E:\VMwareESXi\customized_iso path and you'll find the ESXi-6.7.0-20190604001-standard-customized.iso file

2019/06/26

How to generate date and time log in Windows batch script


for /f "skip=1 delims=" %%z in ('wmic os get localdatetime') do if not defined Z set Z=%%z
set DATE=%Z:~0,4%-%Z:~4,2%-%Z:~6,2%
set TIME=%Z:~8,2%-%Z:~10,2%-%Z:~12,2%
set timestamp=%DATE%_%TIME%.log

or

set timestamp=%DATE:/=-%@%TIME::=-%
set timestamp=%timestamp: =%
set timestamp=%timestamp:,=.%.log

or

set timestamp=%date:~0,4%%date:~5,2%%date:~8,2%@%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%
set timestamp=%timestamp:,=.%.log

2019/06/14

How to install SonarQube 7.x on Ubuntu 18.04

Install required package
apt update && sudo apt upgrade -y
apt install -y unzip curl openjdk-8-jdk-headless mysql-server

Create Database
mysql -uroot -p
CREATE DATABASE sonarqube;
CREATE USER sonarqube@'localhost' IDENTIFIED BY 'sonarqube';
GRANT ALL ON sonarqube.* to sonarqube@'localhost';
FLUSH PRIVILEGES;
\q

2019/05/20

How to install Matomo on Ubuntu 18.04

apt update && sudo apt upgrade -y
apt install -y curl wget git unzip

MySQL Installation
apt install -y mysql-server
mysql_secure_installation
Would you like to setup VALIDATE PASSWORD plugin? N
New password: your_secure_password
Re-enter new password: your_secure_password
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

mysql -u root -p
mysql> CREATE DATABASE dbname;
mysql> GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> exit

2019/02/15

My Grub2 boot menu for Ubuntu USB bootable drive (compatible with macOS machine)

insmod png
set timeout=9

if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi

if background_image /Tokyo.png ; then
set color_normal=white/black
set menu_color_normal=white/black
set menu_color_highlight=yellow/black
else
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
fi