how to empty recyclebin through command prompt?

You can effectively “empty” the Recycle Bin from the command line by permanently deleting the Recycle Bin directory on the drive that contains the system files. (In most cases, this will be the C: drive, but you shouldn’t hardcode that value because it won’t always be true. Instead, use the %systemdrive% environment variable.) The reason that this tactic works … Read more

What’s a good (free) visual merge tool for Git? (on windows)

On Windows, a good 3-way diff/merge tool remains kdiff3 (WinMerge, for now, is still 2-way based, pending WinMerge3) See “How do you merge in GIT on Windows?” and this config. Update 7 years later (Aug. 2018): Artur Kędzior mentions in the comments: If you guys happen to use Visual Studio (Community Edition is free), try the tool that is shipped with it: vsDiffMerge.exe. It’s … Read more

What does ‘bash -c’ do?

Quoting from man bash: -c string If the -c option is present, then commands are read from string.If there are arguments after the string, they are assigned to the positional parameters, starting with $0. The command quoted by you would append the text in heredoc (i.e. the text in VirtualHost tag) to the file /etc/apache2/sites-available/magento-store.com.

CronJob not running

Finally I found the solution. Following is the solution:- Never use relative path in python scripts to be executed via crontab. I did something like this instead:-import os import sys import time, datetime CLASS_PATH = ‘/srv/www/live/mainapp/classes’ SETTINGS_PATH = ‘/srv/www/live/foodtrade’ sys.path.insert(0, CLASS_PATH) sys.path.insert(1,SETTINGS_PATH) import other_py_files Never supress the crontab code instead use mailserver and check the … Read more

How to use dos2unix?

You should be able to get dos2unix from your package manager on Linux. If you are using a Debian-based distro, you should be able to do sudo apt-get install dos2unix. If you are using a RH-like distro, you should be able to do sudo yum install dos2unix. Once it is installed, you can just give the target file as … Read more

Best practice for exiting batch file?

Personally I use exit. The normal exit command simply terminates the current script, and the parent (for example if you were running a script from command line, or calling it from another batch file) exit /b is used to terminate the current script, but leaves the parent window/script/calling label open. With exit, you can also add an error level … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)