Showing posts with label static. Show all posts
Showing posts with label static. Show all posts

November 27, 2024

Create static website using ChatGPT Website Generator Plugin

Hi Everyone,

Here we are where ChatGPT is gathering the required services under one roof.

Click on "Explore GPTs"

Search for "Website Generator"

Prompt the website with the name and major product/service offerings.

It will redirect to the B12 domain with a template. You can update each section with the B12 editor.

For reference, you can visit my website https://psr-and-apps.b12sites.com/index#home

Feel free to send your comments and opinions to psrdotcom@gmail.com


November 01, 2018

Microsoft Visual Studio Code with Debugger for Chrome for Static Website Pages

Hi all,

Have you used the Microsoft's free VS Code editor for you web development. I think, you should try it.

Today I'll discuss about how to debug from the VS Code without placing breakpoints on Chrome browser.

Pre-requisites


  1. VS Code should be installed
  2. Debugger for Chrome extension in VS Code


Configuring the debugger

  • Once you open your website in the VS Code
  • In the activity bar, you will find the debugger icon OR you can use the keyboard shortcut Ctrl+Shift+D
  • Now, we will "Add Configuration" to our project
  • On top of the debug sidebar, you will find an option "Add Configuration"
  • Click on "Add Configuration"
  • It will prompt you to select out of box provided options like "Chrome, NodeJS"
  • Choose Chrome
  • Now, launch.json file will be created
  • Configure the launch.json file by specifying URL with port number
  • Since, our project is of static webpages type, instead of webRoot, we will use "file"


Here is the sample launch.json file

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome for my website",
"url": "http://localhost:3001",
"file": "${workspaceFolder}/index.html"
}
]
}

Debug

  • Click on the "Start Debugging" button OR press F5
  • A new chrome window with debugging enabled will be launched
  • Place your breakpoints in VS Code, just by clicking left to the line number in the editor
  • Perform the action and your debug will be hit
  • Note: You can add conditional debugging by editing the break point


Happy debugging.

Please send your review and comments to psrdotcom@gmail.com

October 31, 2014

Change IP Address and DNS from static to DHCP and vice versa in Windows Command Line Dynamically using Batch file script

Hi friends,

I was frequently changing my system network from static to dynamic.

I was fed-up with the manual changes by entering the static IP address and changing it to dynamic.

I though of creating a batch file, which requests user to select options and proceed further.

 

I found something on Internet, just modified it for my purpose and thought of sharing with you all.

 

  • Check your network name
    • cmd> netsh interface show interface
  • It will list all the network interfaces connected to your system
    • Select the network which you want to change the settings
  • Modify the below code with appropriate network name, IP address, subnet, gateway and DNS server

@echo off

set NETWORK="Local Area Connection"
set IP=10.9.40.95
set SUBNET=255.255.255.0
set GATEWAY=10.9.40.47
set DNSSERVER=192.168.178.1

echo Choose:
echo [S] Set Static IP
echo [D] Set DHCP
echo.

:choice
SET /P C=[S,D]?
for %%? in (S) do if /I "%C%"=="%%?" goto S
for %%? in (D) do if /I "%C%"=="%%?" goto D
goto choice

:S
@echo off
echo "Setting Static IP Address, Subnet Mask and DNS Server"
netsh interface ip set address %NETWORK% static %IP% %SUBNET% %GATEWAY% 1
netsh interface ip set dnsservers %NETWORK% static %DNSSERVER% primary
netsh interface ip show config
pause
goto end

:D
@echo off
echo "Resetting IP Address, Subnet Mask and DNS server For DHCP"
netsh interface ip set address name=%NETWORK% dhcp
netsh interface ip set dns %NETWORK% dhcp
ipconfig /renew

echo "New IP Address, Subnet Mast and DNS Server for %computername%:"
netsh interface ip show config
pause
goto end

:end

Now enjoy the feature of changing IP address with 3 clicks

 

Please send your feedback and comments to psrdotcom@gmail.com

Blogger Labels: Change,DHCP,vice,Windows,Command,Line,Batch,script,system,user,options,Internet,purpose,Check,interface,interfaces,Select,settings,Modify,gateway,server,NETWORK,Local,Area,Connection,SUBNET,DNSSERVER,Choose,Static,Mask,Mast,feedback,netsh,goto,config

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com