I put a cronjob in /etc/cron.{hourly,daily,weekly,monthly} and it does not run and how can I troubleshoot it?

Posted on in Categories Cloud Computing, Howto, Open Source, Web Developer last updated August 27, 2017

Recently I created a simple shell script called backup.sh in /root/scripts directory to just backup MySQL database and dumped it to /nfs/mysql/ directory. I put a file (more like used the ln command to create a soft link ) in /etc/cron.hourly/ and it doesn’t run. There was no error in systemd log or cron log. Why is my cron job was not working, and here is how I troubleshoot it.

Secure Password Hashing for Python Developers

Posted on in Categories Programming, Python, Security, Web Developer last updated July 22, 2014

It is important to store the passwords of user accounts in a secure fashion. There have been many high profile incidents where a security breach resulted in hackers obtaining database dumps of user passwords. The 2012 LinkedIn hack and the recent Adobe hack are two out of many similar cases. Due to the fact that the passwords were stored in an inappropriate fashion, the hackers (read as crackers) were able to recover the passwords of many user accounts and publish them on the Internet, resulting in an embarrassing PR fiasco for the companies.

Apache / Nginx: Visualize Web Server Access Log In Real Time

Posted on in Categories Debian Linux, Open Source, Web Developer last updated May 5, 2013

Logstalgia (also known as ApachePong) is a very powerful and handy app. It is a website access log visualization tool. It is an extremely useful tool to give you look at your web server traffic. I often use this kind of software to justify and convince my clients and/or boss that we need more servers to handle traffic. It streams Apache / Lighttpd / Nginx web-server access logs as a pong-like battle between the web server and a never ending torrent of requests.

Linux / Unix: Install and Use Geany Integrated Development Environment

Posted on in Categories Howto, Open Source, Programming, Reviews, Web Developer last updated January 13, 2013

Geany is a great and light weight cross-platform integrated development environment for Linux and Unix based systems. It supports C, C++, Java, PHP, Python and 50+ other programming languages. Geany is known to run under Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, AIX v5.3, Solaris Express and Windows. Geany more closely resembles programming editors available for Microsoft Windows such as Notepad++. So if, you are switching from MS-Windows to Ubuntu/Debian/Fedora/Mint or BSD/OS X/Unix like platform try geany IDE.

diff Command: Colorize Output On The Unix / Linux Command Line

Posted on in Categories Command Line Hacks, Programming, Web Developer last updated November 26, 2012

The diff command compare files line by line and displays a list of changes between two file. You can use diff command to:

  1. See the changes between one version of a file.
  2. Compare two configuration or program files.
  3. Create a patch file which can be applied with the Linux / Unix program patch.

Say hello to colordiff

colordiff is a wrapper for diff and produces the same output as diff but with coloured syntax highlighting at the command line to improve readability. colordiff has been tested on various flavours of Linux and under OpenBSD, but should be broadly portable to other systems.

Testing HTTP Status: 206 Partial Content and Range Requests

Posted on in Categories Cloud Computing, Command Line Hacks, Howto, Networking, Web Developer last updated November 17, 2012

The HTTP 2xx class of status codes indicates the action requested by the client was received, and processed successfully. HTTP/1.1 200 OK is the standard response for successful HTTP requests. When you type www.cyberciti.biz in the browser you will get this status code. The HTTP/1.1 206 status code allows the client to grab only part of the resource by sending a range header. This is useful for:

  1. Understanding http headers and protocol.
  2. Troubleshooting network problems.
  3. Troubleshooting large download problems.
  4. Troubleshooting CDN and origin HTTP server problems.
  5. Test resuming interrupted downloads using tools like lftp or wget or telnet.
  6. Test and split a large file size into multiple simultaneous streams i.e. download a large file in parts.

Linux Firefox X11: Turn On 3D View Button

Posted on in Categories Open Source, Web Developer last updated August 18, 2012

Mozilla Firefox version 11.x+ has support for 3D view. It is a WebGL based website visualization tool that highlights page structure. You can see relationship between your code and the page output by stacking elements as they are nested in the DOM and lets you see elements that are hidden or off the page. You can zoom in and out, rotate and pan the view to see the page from any angle that is helpful to you. In this blog post I will explain how to enable 3D view on X11. Please note that the 3D view is not for your daily browsing needs. It is useful for finding out bugs such as nesting issues or even XSS vulnerabilities. Personally, I use 3D view as a tool to understand divs, spans, and other elements on the page.