Archive

Archive for the ‘Computers’ Category

Spam_Killer MySQL StoreProc for WordPress

July 20th, 2011 No comments

My latest solution to WordPress comment spam:

The basics:
1. Create a table (spam_words) with 1 field (word) containing your master back list, so to speak, of all spam words.
2. Create a stored procedure (Spam_Killer) that can easily be executed at will or via a script to iterate through your spam list and mark all comments as spam that match.

Spam_Words table:

CREATE TABLE spam_words (
word VARCHAR (20), PRIMARY KEY (word))

Set the field (word) to be the primary key, thus minimizing duplicate entrees.

Spam_Killer stored procedure:

CREATE PROCEDURE Spam_Killer()
BEGIN
DECLARE record_not_found INTEGER DEFAULT 0;
DECLARE spam_word VARCHAR(50) DEFAULT “”;
DECLARE spam_cursor CURSOR FOR SELECT word FROM spam_words;
OPEN spam_cursor;
the_loop: LOOP
FETCH spam_cursor INTO spam_word;
IF record_not_found THEN
LEAVE the_loop;
END IF;
UPDATE wp_comments SET comment_approved = ‘SPAM’ WHERE comment_author LIKE CONCAT(“%”,spam_word,”%”);
UPDATE wp_comments SET comment_approved = ‘SPAM’ WHERE comment_content LIKE CONCAT(“%”,spam_word,”%”);
END LOOP the_loop;
CLOSE spam_cursor;
END

Executing a MySQL StoredProc:

Call Spam_Killer

Notes:

I call the stored procedure in a master script file that runs every night automatically. The master script not only cleans spam but also optimizes tables, deletes post revisions and performs other various database tasks.

Netgear Router Issues With iPhone/iPad Wifi Resolved

May 23rd, 2011 No comments

In earlier post you may have noticed that I fought and fought with my wireless connection on my iPad and iPhone. No matter what I tried, I just could not keep either connected to my Belkin Netgear F5D8236 v2 wireless router. I recently bought a Cisco Linksys E1000 router and just like that, the problem is gone. Let me just go ahead and state that I did not have any wifi problems with anything other than my apple device. Netgear is great if you don’t have any apple devices but if you do, Cisco is the way to go.

Change The Format Of New User Registration Emails In WordPress

January 11th, 2011 No comments

The default registration email that wordpress sends when a new user registers looks similar to the following:

From: WordPress [wordpress@stappsplace.com]
Subject: [StappsPlace.com] Your username and password
Body:
  Username: Stapper
  Password: ******
  http://www.stappsplace.com/wp-login.php

You can change this by modifying the pluggable.php file in wp-includes.

Look for the Send mail (wp_mail) section, more specifically:

$from_name = ‘Admin’;
$from_email = ‘admin@’. $sitename;

Comment Moderation Tips For WordPress

December 23rd, 2010 No comments

Recently I posted on Removing the website entry box on the comments page in WordPress. My thought was that this would significantly reduce the amount of spam comments, but in doing so I discovered a whole new issue regarding comments. What I found is that even after the website entry box was removed from the comments page, comments were somehow still being left with a website entry in the database. Without looking into too much, I simply decided that basically comment entry was somehow being scripted and auto generated by spammers.

So my new policy, and added to my automated maintenance routine, is to simply mark all comments where a website is entered as spam. This has actually worked out to my benefit because most spam is now easily identifiable which has greatly reduced spam all together on my site.

Right now with 1k subscribers and my blog being open to non subscription comments, I delete approximately 14k spam comments and approve approximately 200 comments every week.

Anyway, happy moderation.

WordPress – Remove Website Entry Box Under Comment Section

December 1st, 2010 34 comments

Moderating comments gets old fast! 1 thing spammers love is to leave a url so that is easily accessible to others, helps generate traffic. I did some digging around in WordPress and figured out how to remove the Website entry box under the Comments section. Hopefully this will help reduce spam. Here’s how:

Open up the comments.php file located in wp-content\themes\”your current theme” .

Search for and delete:

<div>
<!-input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”24″ tabindex=”3″ />
<!-label for=”url”><?php _e(‘Website’, ‘inove’); ?></label>
</div>

Small Business\Network Admin Tips for Windows 7

November 27th, 2010 19 comments

Here are a  few tips to help secure your windows 7 machines on a small network environment:

1. Use Group Policy to deny the execution of certain apps, such as regedit, command prompt, firefox, etc.. You can even go as far as only allowing certain apps to be executed.

Click on start and type gpedit.msc into the search box or run tool.  These policies can be found in User Configuration > Administrative Tools > System.

GPEdit

Don’t run specified Windows Applications such as:
firefox.exe
chrome.exe
safari.exe

Prevent access to the command prompt

Prevent access to registry editing tools

Enable\Disable Windows Automatic Updates

2. Install Windows Live Essentials 2011 to filter web content, restrict downloads, monitor web usage, monitor application usage, set game and time restrictions, etc..

Windows Live Essentials

Windows Live Essentials is a free tool that can make your life as an admin much easier when it comes to implementing web filtering, activity monitoring, etc.. You can find out more and download Essentials at the link below:

http://explore.live.com/windows-live-essentials?os=other

3. Take advantage of UAC, User Account Control

UAC makes it much simpler to not only restrict standard users from altering system files and settings but it also meshes admin and limited\standard accounts in a way that makes administration much easier. Instead of switching back and for between accounts, you can now basically become an admin while using a standard account, which minimizes the number of time you will have to switch accounts to accomplish an administrative task.

UAC Admin Message

Windows Folder Tricks

October 27th, 2010 5 comments

A Truly Hidden Folder:
ALT + 0160
Change icon to blank icon.

Folder Named 1/4:
ALT + 0188

Folder Named 1/2:
ALT + 0189

Folder Named 3/4:
ALT + 0190

Try to name a folder con, aux or nul.

Just some fun tricks with folders I have come across. The sequence of keys above involves actually hitting the plus key, not simply ALT and then the numbers following the plus symbol.

Windows Vista\7 God Folder

October 26th, 2010 1 comment

Came across a neat little folder trick that will allow you to create a folder, or actually a link, to tons of useful admin tools, all neatly categorized and in 1 centralized location.

Create new folder.
Enter the following as the name and hit the enter key:
All Tasks.{ED7BA470-8E54-465E-825C-99712043E01C}

Your folder icon will change to:

God Mode Folder Icon

The folder will contain somewhere around 278 admin tools:

God Mode Folder

PeerBlock – Not 100%

October 11th, 2010 17 comments

So I have used and stuck by PeerBlock now for about 6 months and I feel I now must bring a conclusion to my PeerBlock story. As I have stated in earlier post, PeerBlock is not a fail-proof application, and I have finally learned that the hard way. My ISP just recently sent me a notice of termination, 15 days as a matter of fact. So to any out there that are using PeerBlock, I not recommend finding a better alternative and please find one that is a sure deal or stay away from downloading copyright material all together. Remember that Sudden Link will drop you after 2 Copyright Allegation notices from any anti-piracy org, guess I’ll drop cable as well since they no longer want my internet business. So my wifi gets jacked and now I’m terminated because I have a neighbor that likes to backup his/her movies and games…right!?

If you know of any bittorrent anonymous programs that work, please share with the rest of us. I am not a fan of spending money on software either so please try and keep the list narrowed down to free and legit apps but any legit apps would be nice, free or at a price.

PeerBlock – Does It Work?

September 24th, 2010 7 comments

I have now been using PeerBlock for 5 months, discovered it back in May. I have had several questions regarding the legitimacy of this application, whether it works or not and how comfortable I am using it. So far it has stopped the copyright allegation letters from hitting my door step. By no means does that mean that it is fail proof but it does say something about the program and I think that it actually says quite a bit. I have continued my downloads, since installing PeerBlock, just as I had before, the only difference is now I feel that I am definitely more secure in doing so. There is that small chance that a new, or unknown, anti piracy organization will emerge and slip through the cracks for sometime, and as a result, rack up a few more IPs that are downloading copyright software, but it will only be a matter of time before that org will become known and on the list for blocking. PeerBlocks method is not 100% but for a free tool, it’s worth a great deal. The whole idea behind the application is basically a list of known anti piracy orgs, put together by the community, that are essentially blocked, and until an org is known, it is free to monitor you whether you are running PeerBlock or not.

PeerBlock
Original Post regarding PeerBlock

Google Voice > Check It Out

August 29th, 2010 1 comment

Google Voice gives you one number for all your phones — a phone number that is tied to you, not to a device or a location. Use Google Voice to simplify the way you use phones, make using voicemail as easy as email, customize your callers’ experience, and more.

Google Voice isn’t a phone service, but it lets you manage all of your phones. Google Voice works with mobile phones, desk phones, work phones, and VoIP lines. There’s nothing to download, upload, or install, and you don’t have to make or take calls using a computer.

Google Voice will let you define which phones ring, based on who’s calling, and even let you ListenInTM on voicemail before answering the call. We use smart technology to route your calls. So, if you’re already on a Google Voice call, we’ll recognize it and use call waiting to reach you on the phone you’re on.

Google Voice will let you setup customized voicemails for multiple groups, based on who’s calling, the caller will hear a customized voicemail specifically for them or their group. Groups can easily be defined by adding contacts to a specified group such as Work, Friends or Family.

Google Analytics

June 30th, 2010 4 comments

What Google Analytics is to Google: Google Analytics is the enterprise-class web analytics solution that gives you rich insights into your website traffic and marketing effectiveness. Powerful, flexible and easy-to-use features now let you see and analyze your traffic data in an entirely new way. With Google Analytics, you’re more prepared to write better-targeted ads, strengthen your marketing initiatives and create higher converting websites.

Now….what Google Analytics is to me: a free statistics service for my websites that is 10x better than most stats provided by website hosting sites such as godaddy, generaldots, etc..!

The service is easy to use, just add a snipet of code, called a tracking code, to the pages you want to track. If you are using wordpress, this can easily be added to 1 location in most theme settings. Analytics tracks several segments like site usage, visitor overview, map overlay, traffic sources and content overview, just to name a few. Reports can easily be exported to various formats or simply emailed to a specified email address.

Google Analytics (1)

Google Analytics (2)

Google Analytics (3)

Copyright Violation Allegation(s) Notice Involving Your ISP Account

May 1st, 2010 162 comments

Recently I received a Copyright Violation Allegation Notice from my isp that went something like the following:

(My ISP) has received a notice alleging that your (My ISP) account was used for illegal sharing of copyright protected work(s) without the copyright owner’s permission. A copy of the notice is attached, along with a schedule detailing our records that correlates your high speed internet account with the time and date of the notice.

Anyway……

If you take a look at the image below you will notice that the letter is from:
BayTSP inc. NBC Universal Anti-Piracy Technical Operations

PeerBlock

There happens to be a great utility out there called PeerBlock which allows you to control who your machine talks to on the internet. Whats even better is that it actually comes packaged with a very large compilation of known P2P, Spyware, Advertising, Education, etc. servers which you can completely block with ease. The list is updated daily as new servers become known.

If you take a look again at the pic above you will notice that in the PeerBlock program window (bottom right), the anti-piracy company (BayTSP) that sent me the notice is already included in the P2P list along with 100′s of other known anti-piracy servers.

You can get PeerBlock at
http://www.peerblock.com/

How To Delete A Troublesome Folder

April 4th, 2010 2 comments

While creating a batch script to help automate the restore process I go through fairly often, I somehow created a folder that had around 30 something subdirectories and then a file embedded within that last subdirectory…, OOPS! I could only browse so far, then nothing, I figure probably to the point of 255 characters in the path name (I think the windows os file name limit is 255, not sure, somewhere around there) and then windows (7) would just stop, no error, nothing. Found the error when I tried to delete the folder:

File Name Too Long Error

So what do you do? I tried Shift Delete (bypass recycle bin), CMD Prompt: RMDIR /S /Q, with no luck and finally tried Total Commander but still nothing. Finally came across DelinvFile (Delete Invalid Files and Folders). Worked great, google it if you need it, it’s free for 30 days.

If anyone knows how to achieve the same thing without using a 3rd party program, please share, I looked everywhere with no luck. I hate installing a program to do something that should be so simple.

Windows 7 Tip – Easily Change The Size Of Your Desktop Icons

April 3rd, 2010 9 comments

Found this neat little trick to change the size of your desktop icons. Hold the Ctrl button on your keyboard and then using the scroll wheel on your mouse, scroll in and out to either make the icons larger or smaller.

BitStrips.com – Make Your Own Comic Strips

March 30th, 2010 5 comments

Found a cool website that allows you to create your own custom comic strips.

Another Day Bitstrip

Bored Bitstrip

http://www.bitstrips.com/landing

Switch Users – Where Did It Go Windows 7?

March 30th, 2010 13 comments

So I installed a vpn tool the other day for work related reasons and yes, I am slowly learning to keep work crap at work and my personal stuff at home. Anyway, after using it temporarily I uninstalled it, continued working for a while and then went to switch to a different account……… Where did Switch User go, it’s now grayed out.

Quick Fix:
Start
Type gpedit.msc in the run box
Navigate to Computer Configuration > Administrative Templates > System > Logon
Disable Hide entry points for Fast User Switching

Now, update your group policy by:
Open cmd prompt
Type gpupdate and hit enter

Now check your start menu and Switch User is now enabled.

Small crap like that just bugs me!

PC Emulators

January 26th, 2010 17 comments

ROMs

January 26th, 2010 1 comment

How to Find What Port an App is Using

January 15th, 2010 19 comments

Troubleshooting a network app can be troublesome, especially if you don’t know what port to use, what port the app uses, etc.. Below is a failrly simple way to figure out what application is using what port.

Open a cmd prompt and type netstat -ano
Or use netstat -ano | findstr TCP.*80 if you know what port you are looking for. Replace TCP with UDP if necessary and 80 with the port you are looking for.

CMD Prompt

Get the PID for the application that is using the port you are looking for and then use the task manager to identify that application. Open the task manager. You will most likely need to enable the PID column, to do so, select View > Select Columns > and check PID (Process Identifier).

TSKMGR Columns

TSKMGR