Skip to content

Instantly share code, notes, and snippets.

@jagveerdev
jagveerdev / change-domain.sh
Created September 3, 2024 07:33
Update domain on an existing wordpress db
#!/bin/bash
# Prompt for MySQL credentials
read -p "Enter MySQL username: " MYSQL_USER
read -sp "Enter MySQL password: " MYSQL_PASS
echo
read -p "Enter MySQL database name: " DB_NAME
read -p "Enter old domain (e.g., old.example.com): " OLD_DOMAIN
read -p "Enter new domain (e.g., new.example.com): " NEW_DOMAIN

Startup steps for AWS Cloud9

These are the startup steps for AWS Cloud9. The Platform should be set to Ubuntu Server 18.04 LTS.

Git Config and global .gitignore file

  • Setup the git configuration variables
     git config --global user.name "Jagveer Singh"
     git config --global user.email "[email protected]"
     git config --global core.excludesfile "~/.gitignore"
     git config --global color.ui true
.flex-caption {
zoom:0;
color: #fff;
margin: 0 auto;
padding: 1px;
position: absolute;
vertical-align: bottom;
text-align: center;
background-color: rgba(0, 0, 0, 0.06);
bottom: 9%;
<!DOCTYPE html>
<html>
<body>
<script>
var z =["Jaspal","Amanpreet","Gurinder","Jagveer","Pritpal","Preet","rwerwere","yrtyfdvdf"];
document.write('<table border="5" cellpadding="15" cellspacing="10"><tr style="background-color:grey; color:white"><th>Roll No</th><th>Names</th></tr>');
for( var a=0; a<z.length; a++){
var j=a+1;
if(j%2==0){
document.write('<tr style="color:green; background-color:blue"><td>'+j+'</td><td>'+z[a]+'</td></tr>');
<!doctype html>
<html>
<head>
<title>switch</title>
</head>
<body>
<script type="text/javascript">
var week=prompt("Enter Day Name");
switch(week)
{
<!doctype html>
<html>
<head><title>Twitter Login</title></head>
<body style="background-color:#E6ECF0">
<div>
<header style="height:50px; border:; background-color:white">
<section style="width:50%; height:50px; float:left; text-align:center">
<ul style="list-style-type:none">
<li style="display:inline;margin:0px;padding:0px; "><img src="1.png" height="20px"></li>
<li style="display:inline"><a href="#">Home</a></li>
<!doctype html>
<html>
<head>
<title>twitter signup</title>
</head>
<body>
<div>
<header style="height:50px; width=100%; background-color:#1da1f2; padding-top:15px">
<aside style="height:50px; width=50%; float:left; padding-left:700px">
<img src="1.png" height="27px" />