Category: Tips and Tricks

Microsoft Excel – Turn a “1” into “001”

To convert numbers like 1, 10, 100 to 001,010, and 100 within a Microsoft Excel spreadsheet, there are a couople of ways to accomplish this. Format–>Cells, Number tab, Choose Custom and type 000 into the short box at the right. In Excel 2007: From the Home tab, go to Cells, select Format, then Format Cells. Go to the Number tab,…

Read More »

Useful DOS Commands

From time to time a DOS batch (“bat” or “cmd”) file needs to be written to perform some task or series of tasks. There are various commands that I seem to consistantly search for on the Internet. Here is a list of some of those useful DOS batch commands. How to delete files equal to zero bytes in size. Delete…

Read More »

How to use multiple blockquotes in WordPress using CSS

There was a need to use blockquotes for different uses. Warning, Informational, Stop, Go, or as a blockquote. The possibilities are endless. This is possible by giving the blockquote element a class attribute within your (X)HTML or post, and define the class in the style.css file of your theme. This technique was found here. In this example, where the following…

Read More »

Delete Files and Subfolders from Folder but not that Folder Itself

If you would ever want to use a command line delete all the files and folders from within a folder without deleting the folder itself, a batch file can be constructed. Warning: There are a few things that I discovered while testing this script. Firstly, the CD command, which is part of this script will accept a / character as…

Read More »

How to search and replace text from a very large XML file

There are many ‘solutions’ that exist that will parse through a text file and other utilities that have specific functions designed to parse through an XML file. After trying several applications only one was capable of effeciently search and replace text within (in this case) an XML file that is over 300 MB in size. The whole process took less…

Read More »

How to wipe a Blackberry 9530 and unlock it to prep for sale

There are several steps to preparing the BlackBerry 9530 phone prior to resale. Remove the old phone number from the phone, factory reset, wipe, unlock, remove the SIM and SD cards. After reviewing many resources, YouTube videos, and finally a couple of interesting utilities, this is all possible. Requirements 9530EastAsia_v5.0.0.1041_P4.2.0.456 Operating System (optional) BlackBerry Swiss Army Knife (“BBSAK”) BlackBerry Reader…

Read More »

Use DOS Batch to show last month date with the date command

Use a DOS script to automate a process where by using the date /T command would return the previous month, rather than the current month. This actually sounds easier than it is. For the desired results, a couple of conditions were considered. Firstly, if in the month of January or one, then the subtracted value of one minus one equals…

Read More »

WordPress SQL Queries for database cleanup

With time your WordPress database may grow out of control. A couple contibuting factors are post revisions, RSS feeds fed through the dashboard. There are plugins that handle basic database optimizations, however, the command line is a quick and dirty way to handle some of these. I have always been aware of the transient RSS entries in the wp_options of…

Read More »

Delete with wildcards from FTP server

Most FTP users use an FTP client to access their FTP server. While there may be a client that is capable of deleting files with wildcards, FileZilla Client does not. After a little research, there is a command available to Windows and Linux users accessible via command line. The command is simply called FTP. Windows / Linux usersAside from some…

Read More »
Linux Logo

Linux server with incorrect date [FIXED]

Every now and again, a server may lose its date and time. One pesky server is continuously using the incorrect date and time. If there was only a way to change the system date. There is, and the easiest way to correct this is by using a simple little command called – date. There are a couple of ways to…

Read More »

How to uninstall Java for LInux

If the native Java for Linux has been installed and the goal is to remove it from the system and install the Oracle Java JDK. Here are the steps to do just that. This is here for reference, I have not fully tested this, in that the installation I was verifying did not have JRE as indicated in the original…

Read More »

How to mount a Windows share from Linux

To access a Microsoft Windows share from a CentOS Linux server there are a few commands that worked for this configuration: Microsoft Windows Server 2003 and CentOS 5.8. This is a quick and dirty guide assumes that a Windows share already exists and uses root. In a production environment, an alternate user would be more appropriate. From the Linux server….

Read More »

Use forefiles.exe and 7zip to archive files older than X number of days

On a Microsoft Windows server, there is a folder that contains 1000s of logfiles. Each logfile varies by name and size. I wanted a script that would compress all logfiles into a single zip file that were older than seven days. After the compression is completed and the zip file is created, all logs older than seven days will be…

Read More »

Install Java JDK on CentOS without prompts using an automated script!

If you have ever installed Java Development Kit (“JDK”) on a Red Hat Enterprise Linux (“RHEL”) 5.x or CentOS 5.x operating system (“OS”), then you are aware of how manual the installation can be. Prompt after prompt to install. After a lot of research and testing, here is a completely automated script to install JDK on a CentOS or RHEL…

Read More »

Map a drive or access a CentOS Samba Share from Windows

The goal is to create a network share on a Linux server using Samba that will be available to a Windows workstation with the ability to map a drive to that Linux share. There are many, many articles with a procedure, most are dated and incomplete, however, here is a procedure that worked for this test using CentOS 5.7 and…

Read More »

Hack the Nook Color

There are many different approaches to hacking the Nook Color, some are quite elaborate, some only detailing Linux or Windows procedures from one degree to another. This approach, from what I have read, should not void the warranty of the product. It will allow for either booting into the the original Nook or booting into the Android OS. This is…

Read More »

Change a Linux Network Configuration from DHCP to Static IP Address

If you CentOS network configuration is set at DHCP and you want to change your network configuration to a static IP address, then read on. The network configuration settings are generatlly found and edited in two places. Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 to resemble the following (replace the network addresses with your own). Edit the /etc/sysconfig/network to resemble the following (replace the…

Read More »