How to SSH to a server using Ruby – Part I

ruby on rails

Welcome to Part I of how to SSH to a Linux, Windows, etc. server using Ruby. This post will give you a complete code example to get you up and running right away! The code below will connect to the server specific and run the ls -al command. Be sure to change the values in … Read more

4 Free Ways to Convert a PDF to a Plain Text File on Linux

In the vast landscape of digital content management, the need to convert PDF files to text is a common task for professionals, students, and casual users alike. PDFs are widely used for their portability and consistency across different platforms but aren’t as easy to edit or search as plain text files. Fortunately, for Linux users, … Read more

How to Create Thousands/Millions Files in Linux

bash, command-line, linux

Do you need an ultra fast way to create a large number of files in Linux? Perhaps, you are doing some load testing for an application and you need to create 1000 or even 1,000,000 files in the matter of seconds. Well, here is how to do it! There are two parts to creating these … Read more

PostgreSQL: How to reload config settings without restarting database

postgresql show tables

Reloading the PostgreSQL configuration without restarting the entire database can be efficiently achieved using the pg_ctl reload command. Performing Postgres reload config is a simple one-liner and should be part of your toolbox. Why is Postgres Reload Config Important? If you are making modifications to the Postgres configuration file postgresql.conf (or similar), and you want … Read more

How to view table/row locks in PostgreSQL?

postgresql show tables

This article will show you how to see a list view a list of locks that are currently open (or waiting) on your database rows and tables. This information is beneficial when debugging timing-related errors and data inconsistencies. Login to the PostgresSQL command-line interface psql -U [username] [database_name] Run the following query: select t.relname,l.locktype,page,virtualtransaction,pid,mode,granted from … Read more

How to see active SQL queries and open connections in Postgres?

This article will show you how to see a list of open database connections as well as all active queries that are running on a PostgresSQL 8.x database. This information can be very beneficial when profiling your application and determining queries that have “gone wild” and are eating CPU cycles. Login to the PostgresSQL command-line … Read more

How to find when PostgreSQL Vacuum and Analyze were run?

postgresql vaccuum, postgres autovacuum, postgres vacuum

This article will show you how to determine when your database tables were last vacuumed, auto-vacuumed, analyzed, and auto-analyzed on a PostgresSQL database. Performing these operations are critical in keeping the database optimized and performant. What is the purpose of PostgreSQL Vacuum? PostgreSQL’s “VACUUM” is a maintenance operation designed to reclaim storage occupied by expired … Read more

Examples of Linux ‘head’ Command to Preview a File

linux, shell bash, ubuntu

This article will show you how to use the head command in Linux. head is used to print out the beginning of a file. For example, this is useful when you have a giant text file and you want to preview the contents without attempting to open the entire file. Here are some common examples … Read more

How to add “Run…” option to Windows 7 Start menu

If you recently upgraded from Windows XP to Windows 7, you may be wondering where the Run… option in the Start menu went. I use this option in XP regularly to quickly launch programs like Notepad and the Command Prompt, so it was annoying when I tried doing this in Windows 7 only to find … Read more

How to add a Windows/Linux network printer in Ubuntu 9.10

add a printer, install a printer, ubuntu, printer

This article will show you how to add a network printer on a Ubuntu 9.10 system. Let’s go ahead and get started… Navigate to System –> Administration –> Printing Then choose Server –> New –> Printer from the Printer configuration window The New Printer wizard will be displayed. Here you can add either local or … Read more

How to Kill All Processes in Linux with a Single Command

kill processes linux, stop script execution

Managing processes in Linux can sometimes feel overwhelming, especially when you need to terminate several processes at once. Whether you’re dealing with multiple instances of a script, a misbehaving application, or background jobs running wild, there’s a simple way to handle it all. In this guide, I’ll walk you through various methods to quickly kill … Read more

How to change screen/display resolution in Ubuntu 9.10

This article will show you how to change your monitor resolution in Ubuntu 9.10. Most of us are long-time Windows users and we are very used to the interface and how to do a simple task like this. But for Linux newbies, it can get frustrating to navigate all the menu options to find the … Read more

How to disable the annoying Aero Snap in Windows 7

Do you find yourself rearranging your application windows and then all of a sudden it maximizes to full-screen? Or how about moving the window to the left- or right-edge of the screen only to find it resize to take up half of your screen? This is a new “feature” in Windows 7 called Aero snap. … Read more

Download & Read Kindle books for free on your PC – Part 1/2

Everyone by now knows about Amazon’s uber-popular Book reader, Kindle. This featherweight 10 ounce device allows you to wirelessly purchase books online without requiring an internet connection. Until now, books purchased for the Kindle could only be used on the device. However, Amazon.com just released a PC version of the Kindle book reader – and … Read more

Free Photoshop Alternative for Windows – Paint.NET

Adobe Photoshop, a household name in the realm of image editing, has been setting the standard for photo manipulation and digital artistry since its inception. Its unrivaled suite of features, coupled with a robust and flexible workspace, has made it a go-to choice for professionals across the graphic design, photography, and digital marketing industries. Photoshop’s … Read more

Capture screenshots in Windows 7 using the Snipping Tool

The Snipping Tool is a cool “new” utility that is included with Windows 7. You might be wondering why I put the word new in quotes. That is because this program was actually introduced in Windows Vista but went unnoticed by the vast majority. The reason for this is because it was not installed by … Read more

How to disable password prompts (UAC) in Ubuntu

This article will show you are to disable UAC (User Access Controls) aka those pesky popup dialogs where you must enter your password in Ubuntu Linux! As many of you know, this feature was implemented in Windows Vista but went horribly wrong and is the reason it has been removed in Windows 7. Linux, which … Read more

How to Install SSHD service on Ubuntu Linux in Seconds

The Secure Shell Daemon (SSHD) is a critical service for Linux users and administrators, providing a secure method to access remote machines over an insecure network. This service encrypts the connection between the client and the server, ensuring that sensitive information, such as passwords and user data, is transmitted securely. This comprehensive guide will walk … Read more

How to Open & Edit .PSD Files for Free Without Adobe Photoshop

Adobe Photoshop is the industry standard for graphic design, widely known for its powerful features and capabilities. However, its cost can be a barrier for hobbyists, students, or small businesses. Fortunately, there are several free alternatives available that allow you to open, view, and edit PSD (Photoshop Document) files without the need for a Photoshop … Read more

How to reset password on Brocade Silkworm switches

This article will show you how to reset the passwords for all accounts (root, admin, etc) on a Brocade Silkworm switch. This method has been successfully tested on a Silkworm 3800. But before you go through these steps, first try these passwords for the ‘root’ and ‘admin’ accounts: fibranne fibreanne password default If none of … Read more

How to call JavaScript function from PHP

This article will show you how to call a JavaScript function from within PHP code. It is quite simple actually! echo “<script language=javascript>myfunction();</script>”;

Categories PHP

How to Delete/Drop a Constraint In PostgresSQL

postgresql show tables

This article will show you how to drop a constraint, such as a foreign key constraint, on a PostgresSQL database. There are several different types of constraints and we’ll show you examples of each. Sure, here are the same instructions with headers and sub-headers: Dropping a PRIMARY KEY Constraint in PostgreSQL To remove a primary … Read more

How to compare 2 files using ‘diff’ in Linux

This article will introduce you to the diff command on Linux which is used to compare two files and display the “differences” between the two. I will also provide you with a Bash shell script to compare two files and simply output if they are the same or not. Lets begin with the basic usage … Read more