Category: Tips and Tricks

SQL substring replacement

Naveen Nayak May 14, 2018 No Comments MySQL, Tips and Tricks

There are times when you need to replace only a part of the string in the database column. You can use the stuff() function in MSSQL or insert() function in MySQL MSSQL Definition: STUFF ( string , start , length , replaceWith ) Example: select stuff(‘My Original String’, 4, 8, ‘Replaced’); Output: My Replaced String […]

PHP Remote CLI Script Debugging with PHPStorm

Naveen Nayak February 9, 2016 No Comments LAMP, Tips and Tricks , , ,

PHPStorm is one of the best IDE’s to develop in PHP. I recently came across tons complex php cli scripts and needed a way to debug them. Follow this PHPStorm Docs post first to set up php storm and the server. Most important things to configure are Set up xdebug correctly on the remote server. Dont use […]

Better Putty Color Scheme for existing Sessions on Windows

Naveen Nayak December 18, 2015 No Comments Tips and Tricks ,

Putty is a versatile tool for remote SSH access – however the color schemes are not too impressive. The blue especially is really bad. You can change the blue color in the settings but what if you already have a ton of putty Saved Sessions. You will have to painfully modify each. There is a […]

Linux Cron not running ?

Naveen Nayak April 13, 2015 No Comments Linux, Tips and Tricks

There are 2 ways to set up periodic cron jobs in linux Put them directly in the crontab Put them in one of the cron directories – below are available /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly So you can create a script and put it in one of the directories and they will run according to schedule […]

Clear Screen for MySQL Command Prompt – Linux

Naveen Nayak June 18, 2014 No Comments MySQL, Tips and Tricks ,

On Linux, if you have logged into mysql on the command prompt  and want to clear all text on screen you can use mysql> \! clear \! system-command is the command format \! tells mysql to pass the command to the system Example [naveen@localhost ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. […]

Page 1 of 4