Showing posts from 2019

Solution: More Posts & Posts Links not working with Adsense Anchor ads on Touch screen mobiles in blogger

Problem Statement: Whenever anchor ads are loading in mobile More Posts link is becoming dead and also other links such as Title of posts in feed along with the Keep Reading link is becoming unresponsive to touch and thus users are unable to browse site properly. So coming straight to solution: I have seen this happening only when something is having z-index more than the other elements on the page in this case when anchor ads were loading it seems like the z-index for the anchor ads was overriding the z-index of page elements itself leaving them unresponsive to touch though they are working completely fine on clicks over computer system ,so to fix this I added a small piece of CSS style="z-index:1000!important;"  to the element or More Posts link so that in the page DOM layer it comes just at place where both Anchor ads and More Posts remains clickable without clashing with each other. Please find the screenshots below for your reference to find where the changes

Fixed: Wordpress Visual Post editor not working issue

Hi everyone as always I will cut the crap and come straight to point. I got the task to fix a site and for that I created a new user from backend using phpmyadmin using the following command as the owner of site had forgotten the password for wp-admin: INSERT INTO `wpdatabasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('2', 'Shivam', MD5('demopass'), 'Shivam', '', '', '2019-05-16 00:00:00', '', '0', 'Shivam'); INSERT INTO `wpdatabasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '2', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); INSERT INTO `wpdatabasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '2'

Powershell script to automatically send HTML emails using gmail smtp

Hi please find the script/code below which can be used (as a example  use case) for sending automated reminders for filling time-sheets  to all employees on every Friday(can be any day depending on when you schedule it to run using windows task scheduler as per your requirements) using gmail gsuite or any other email providers: Things Required: SMTP outgoing port(587) allowed through firewalls No-reply email which will be used for sending emails Application password (as gmail blocks sending emails from scripts if direct credentials(username & normal password) are used and sends warning alerts and notifications to owner and eventually blocks the account if not rectified thus application password needs to be created and used to prevent that from happening,steps for creating same are given below) Server which runs 24x7 where we will place and schedule our scripts to run at specific time.(You can use your local PC systems and execute script manually by double clicking if requir

Script to delete the files older then 2 days from All Available Drives On Servers:\AnyDirectory

Script below can be used to delete the files which are older then 2 days from All Available Drives On Servers:\AnyDirectory. If you want to filter files with some particular extension please add the following handle to the script : /m (searchmask) Searches files according to the specified search mask. The default search mask is *.\*. More information about parameters and variables available can be found here @ECHO off Rem=================================================================================================================== Rem AUTHOR: SHIVAM KUMAR | Rem VERSION: 1.0 Rem DESCRIPTION: Script to delete the files which are older then 2 days from "All_Available_Drives_On_Servers:\AnyDirectory" directory Rem How to use: Select the servers from hpsa and right click and run script,no user input is required. Rem Disclaimer: The script has to be run on proper timings after the backup or what ever patching activity else you m

Adding a new table to Replication in MSSQL Server without reinitializing the Snapshot

There are some prerequisites for Tables to be a part of replication: It should have a PRIMARY KEY It should have IDENTITY NOT FOR REPLICATION NOT NULL: If prerequisites are not met for Primary key you will see the following error: Msg 14088, Level 16, State 1, Procedure sp_MSrepl_addarticle, Line 1539 [Batch Start Line 0] The table '[dbo].[T_YourTableNameHere]' must have a primary key to be published using the transaction-based method. Though NOT FOR REPLICATION FOR IDENTITY will not throw any error during the time you are adding the table to replication but it will start throwing errors once you will start inserting rows or data into the table and I am guessing you must have heard this earlier "prevention is better than cure" . Alright once prerequisites has been taken care of  this tasks can be accomplished using the following steps : Create table in Publisher Node. Create table in all Subscriber Nodes. Use sp_addarticle to add and publish the new