GIT – Change author or committer

If you want to change author’s and/or committer’s name and/or email in given GIT revisions, you can use the following script:

git filter-branch -f --commit-filter '
  if [ "$GIT_AUTHOR_NAME" = "Old Author" ];
  then
    export GIT_AUTHOR_NAME    = "New Author";
    export GIT_AUTHOR_EMAIL   = "new_author@example.com";
    export GIT_COMMITTER_NAME  = "New Author";
    export GIT_COMMITTER_EMAIL = "new_author@example.com";
  fi;
  git commit-tree "$@"'

Now update the remote (bare) repository

git push --force --tags origin 'refs/heads/*'

Secured FTP – ProFTP + TLS in Ubuntu

FTP is considered as very insecure protocol because all data transferred using this protocol is passed between client and server in clear text and can be hacked by someone listening on your line. But you can easily encrypt the whole communication by enabling/forcing TLS and make FTP much more secure. This article explains how to set up ProFTPd with TLS on an Ubuntu server. Continue reading

LFTP – Backup website over FTP

LinuxI was facing task how to schedule an automatic backup/mirror of a website which allows connecting over FTP. PHP command exec was forbidden by the provider so it was not possible to run OS commands. PHP script execution time was set to quite short time so it was neither possible to zip using PHP functions and send the whole backup file somewhere easily. Continue reading

How to check which process is listening on which port

Here’s a few built-in commands and how to guide that can help users to find out and identify which application or process that is already using, opening and listening on port 80 or 443 on the Winodws operating system such as Windows Vista, Windows XP, Windows 7, Windows Server 2003 and 2008. Continue reading