Thursday, December 27, 2012

Installing OpenFire on a Mac OSX 10.6 Snow Leopard



Installed OpenFire is a real time collaboration (RTC) server on Mac OS X 10.6 Snow Leopard


Create a new user for OpenFire database, instead of using root in mySQL database on Mac OS X 10.6 Snow Leopard.

Download the tar.gz and unzip the latest JDBC driver for mySQL from http://www.mysql.com/downloads/connector/j/

To Installation JDBC driver in Mac OSX 10.6 Snow Leopard:
Copy the file mysql-connector-java-5.1.22-bin.jar to the directory /Library/Java/Extensions/


Login to mysql (if you don't have set a password for database-root account yet, forgot about the "-p" parameter)

shell> mysql -p -u root

create a new database 'openfire':
mysql> CREATE DATABASE openfire;

create a new user 'openfirexxx':
mysql> CREATE USER 'openfirexxx'@'localhost' IDENTIFIED BY 'your-new-password';

Remove permissions if users already exists:
mysql> REVOKE ALL ON *.* FROM openfire;
ERROR 1141 (42000): There is no such gran defined for user 'openfirexxx' on host '%' | this is a good error

Give user 'openfirexxx' only rights for table 'openfire' and important using any IP connection ->@'%'
mysql> GRANT ALL PRIVILGES ON openfire.* TO openfirexxx @'%' WITH GRANT OPTION; 

logout
mysql> exit

import OpenFire mySQL database schema on Mac OS X:
shell> cat /usr/local/openfire/resources/database/openfire_mysql.sql | /usr/local/mysql/bin/mysql -p openfire;

Following  OpenFire installation screens and when you get to page localhost:9090/setup/setup-profile-settings.jsp
I got the following error:

HTTP ERROR 500

Problem accessing /setup/setup-profile-settings.jsp. Reason:

java.lang.NullPointerException
 at org.jivesoftware.openfire.admin.setup.setup_002dprofile_002dsettings_jsp._jspService(setup_002dprofile_002dsettings_jsp.java:80)

Trying the following fix: 

On ANY Mac w/ a 64-bit processor, you need to go into Applications --> Utilities --> Java Preferences and once you open the utility console you need to move the 32-bit version to the top of the priority list.

Reboot your machine! This solved the above error.

The errors continued.....

Could not find error.log, warn.log, etc and and Java Error on port 5229 - 

List of All ports on Mac
http://support.apple.com/kb/TS1629

Port 5229 is free?

So I just created the the logs required error.log, warn.log, info.log and debug.log and change permissions for this file to be writable by current user. 

Changed permission on 
/usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh  to start and stop correctly from non-root account.

One last gotcha, log-in using admin instead of the your email id for admin user!!!!! 

Success ! Server is now working! 

Command line start / stopping of OpenFire

To start service:
sudo launchctl load /Library/LaunchDaemons/org.jivesoftware.openfire.plist


To stop service:
sudo launchctl unload /Library/LaunchDaemons/org.jivesoftware.openfire.plist


Spark Issues
Spark on top of this and make sure to install the plugin for "Search" on the server so you can find other users! http://community.igniterealtime.org/thread/47523


Firewall Ports for IM Client (using Spark) check your firewall: 
1) admin console that runs on port 9090
2) openfire im client must reach im traffic on port 5222
3) port 7777, for file transfers; these are the defaults.
re : http://www.openlogic.com/wazi/bid/188135/Instant-Messaging-in-the-Enterprise-with-Openfire










Tuesday, December 25, 2012

Google Web History - Turning it Off




Pause your "Search" Web History

If you're visiting a webpage or performing a search in Google Chrome and online at Google.ca./com your search are stored online by default at google.com/history.new window
If you don't want stored in your web history online:




2.Click Pause to prevent your future web activity from being saved in Web History and from being used to personalize your search results. To start keeping track of your web activity again, click Resume.
3.There is an option to Remove All Web History - what residuals remain is uncertain.

If you'd like to sign out of Web History altogether, click your name or email address at the top of the page, then select Sign out from the drop-down menu. Note that you'll need to sign back in to your Google Account in order for Web History to begin storing your web activity again.


Turn off Personal Results

Personal results are pages shared with you by your friends, Google+ posts from people you know, and content that's only visible to you (like private photos from Google+ new window and Picasa new window albums). Personal results are part of Search plus Your World new window.
You can see what your results look like without personal content by clicking the http://www.google.com/help/hc/images/websearch/websearch_searchplus_off.gif globe button on the top right-hand side of your search results page. This setting is session-specific, meaning that if you close your browser, personal results may appear next time you search. You can switch back to seeing personal results by clicking the http://www.google.com/help/hc/images/websearch/websearch_searchplus.gif personal results button.
You can turn off personal results in your search settings new window. This action is account-specific, meaning that personal results will remain disabled as long as you're signed in to your Google Account new window.
·  Click the gear icon gear in the top right corner of the search results page.
·  Click Search settings.
·  In the "Search plus Your World" section, select "Do not use personal results."
If you turn off personal results and stay signed in to your Google Account, you won't see results personalized based on your Google+ circles (or suggested connections), Google products, or your search history.
If you turn off personal results and sign out of your Google Account, you may still see personalized results and results based on the context of your search.
http://support.google.com/websearch/bin/answer.py?hl=en&answer=2410479

Friday, November 23, 2012

Leak Finder for JavaScript

https://code.google.com/p/leak-finder-for-javascript/

Friday, October 19, 2012

Sharepoint Install Reset IE Settings - "Your current security settings do not allow this file to be downloaded"

Installed SharePoint Foundation Server and it Reset IE Security Settings.

After install  I get "Your current security settings do not allow this file to be downloaded".











Annoyingly, resolving this error relies on 2 Internet Explorer settings.


Resolution: 

1) Open Internet Explorer -> click on tools -> click on internet options-> click on security -> click on custom level 






















2)  Scroll down till you get to downloads in the security section: 

     
Enable "File download" (Obviously, you think this would do it, but not.) 


















3)  Scroll until you reach "Launch applications and unsafe files." This is the gotcha moment, and rather oblique setting.

Enable "Launch applications and unsafe files". Select Prompt.








Now, this should do it. 

Saturday, September 22, 2012

How to Re-install Expression Web 4


 Re-install Expression Web 4

Could not find this command so its here for the zeitgeist!
"C:\Program Files (x86)\Microsoft Expression\Web 4\XSetup.exe" -r -AppLangId:1033 "-manifest:WebManifest.cab" "
-source:C:\Program Files (x86)\Microsoft Expression\Web 4\Setup\;g:\6cf48c91055c9ced0efc944087\Setup"

Thursday, May 24, 2012

TinyMCE Editor Implementation Plus








Just finished after many hours of creating a spacer button (icon) for theme : "advanced", which shows all buttons (icons).

With some JQuery magic you can accomplish this. Here's the pseudo code:

  1. Remove all the necessary classes and add a new class for the tags that contain the image for you spacer (transparent) gif with specific width and height of your choosing. And remember to deactivate the spacer button.
  2. I used this to right align my company logo for contact information
  3. theme_advanced_buttons5 : removeformat, iespell, spacer, mycompanylogo


I can now say that I can support or implement the awesome TinyMCE Editor! For services contact me.

Tuesday, May 22, 2012

How to Disable / Stop RSS Feeds in WordPress - SEO Friendly Way


How to Disable / Stop RSS Feeds in WordPress 
Anyone who uses Wordpress may want to stop RSS feeds to stop spammers and scammers.  The common approach is the following function added to functions.php : 


function fb_disable_feed() {wp_die( __(‘No feed available,please visit our homepage!’) ); }
add_action(‘do_feed’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rdf’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss’, ‘fb_disable_feed’, 1);
add_action(‘do_feed_rss2′, ‘fb_disable_feed’, 1);
                                              add_action(‘do_feed_atom’, ‘fb_disable_feed’, 1);

What's wrong this function ?

Well it returns a HTTP Status code of 500
                                           500 (Internal server error)                        The server encountered an error and can't fulfill the request.

Not terribly SEO friendly. Too many 500 errors call into question the reliability of that site. Google doesn’t want to send users to a site that ultimately times out and doesn’t load.


Need a better solution, email me.



Friday, May 11, 2012

Wordpress Links - Update Date and Sort by Date



Wordpress Links Date Extension


Solution Delivered : To be able to sort by date and update this date field for Wordpress 3.1+.

Specifically, 
wp_insert_link(...,link_updated ) never worked and core never intended this.


Contact me, for this and other Wordpress solutions.

Thursday, May 10, 2012

Install software list from command line - windows

Software installed with MSI

For all software installed with any installer, registry level script here. Use to run cscript.exe somescript.vbs

Output Types: HTML, CSV, and XML
Just use /format:hform.xsl, /format:csv.xsl,  /translate:basicxml /format:rawxml.xsl to select your desired output.(use the trnaslate with xml, changes the >'s and <'s to meaningful characters in xml, otherwise just use /format:rawxml.xsl)

CSV output: (there are more headings available for each of these path's, these are examples. For full headers, type /? after "get" to recieve a full list.)

For Example:
wmic:root\cli>product get /?

Property get operations.
USAGE:

GET [] []
NOTE:  ::=  | ,

The following properties are available:
Property                                Type                    Operation
========                                ====                    =========
Description                             N/A                     N/A
IdentifyingNumber                       N/A                     N/A
InstallDate                             N/A                     N/A
InstallLocation                         N/A                     N/A
InstallState                            N/A                     N/A
Name                                    N/A                     N/A
PackageCache                            N/A                     N/A
SKUNumber                               N/A                     N/A
Vendor                                  N/A                     N/A
Version                                 N/A                     N/A

The following GET switches are available:

/VALUE                       - Return value.
/ALL(default)                - Return the data and metadata for the attribute.
/TRANSLATE:      - Translate output via values from

.
/EVERY: [/REPEAT:] - Returns value every (X interval) seconds, If /REPEAT specified the command is executed  times.
/FORMAT:   - Keyword/XSL filename to process the XML results.

NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of output.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be followed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results will be done.

===INSTALLED SOFTWARE:===

wmic product get Name, Version, Vendor, Description, PackageCache, IdentifyingNumber,  InstallLocation, InstallState,SKUNumber /format:htable >MSIInstalledSoftware.html

wmic product get Name, Version, Vendor, Description, PackageCache, IdentifyingNumber,  InstallLocation, InstallState,SKUNumber /format:csv >MSIInstalledSoftware.csv

Aside remove c:\ in all cases below (not writable characater)
===BIOS:===
wmic /output:C:\Bios.csv BIOS get Name, SMBIOSBIOSVersion, SerialNumber, Version, BuildNumber, Status /format:csv.xsl

===PC:===
wmic /output:C:\PC.csv COMPUTERSYSTEM get CurrentTimeZone, Description, Domain, TotalPhysicalMemory, Model, Name, UserName /format:csv.xsl

===Memory:===
wmic /output:C:\Mem.csv MEMLOGICAL get /all /format:csv.xsl

===NIC:===
wmic /output:C:\NIC.csv NICCONFIG get DNSDomain, DNSHostName, DefaultIPGateway, Description, IPAddress, IPSubnet, MACAddress, ServiceName, WINSPrimaryServer, WINSSecondaryServer /format:csv.xsl

===Processor:===
wmic /output:C:\Proc.csv CPU get Description, DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:csv.xsl

===QuickFixEngineering:===
wmic /output:C:\QFE.csv QFE get CSName, Description, FixComments, HotFixID, InstalledBy, InstalledOn, Name, ServicePackInEffect /format:csv.xsl

=================================================================
You can find more system information by calling the Path's you would in WMI
CSV output using the Win32_ Path's you'd use in wmi, the very same you'd see in the script-o-matic tool from Microsoft

===Disk:===
wmic /output:C:\Dsk.csv /namespace:\\root\cimv2 path Win32_LogicalDisk get FileSystem, FreeSpace, Size, VolumeSerialNumber, VolumeName, caption, description /format:csv.xsl

===PC:===
wmic /output:C:\PC.csv /namespace:\\root\cimv2 path Win32_ComputerSystem get CurrentTimeZone, Description, Domain, TotalPhysicalMemory, Model, Name, UserName /format:csv.xsl

===BIOS:===
wmic /output:C:\Bios.csv /namespace:\\root\cimv2 path Win32_BIOS get Name, SMBIOSBIOSVersion, SerialNumber, Version, BuildNumber, Status /format:csv.xsl

===Memory:===
wmic /output:C:\Mem.csv /namespace:\\root\cimv2 path Win32_LogicalMemoryConfiguration get AvailableVirtualMemory, Caption, Description, Name, SettingID, TotalPageFileSpace, TotalPhysicalMemory, TotalVirtualMemory /format:csv.xsl

===NIC:===
wmic /output:C:\NIC.csv /namespace:\\root\cimv2 path Win32_NetworkAdapterConfiguration get Caption, DNSDomain, DNSHostName, DefaultIPGateway, Description, IPAddress, IPSubnet, MACAddress, ServiceName, WINSPrimaryServer, WINSSecondaryServer /format:csv.xsl

===Processor:===
wmic /output:C:\Proc.csv /namespace:\\root\cimv2 path Win32_Processor get Caption, Description, DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:csv.xsl

===QuickFixEngineering:===
wmic /output:C:\QFE.csv /namespace:\\root\cimv2 path Win32_QuickFixEngineering get CSName, Caption, Description, FixComments, HotFixID, InstalledBy, InstalledOn, Name, ServicePackInEffect /format:csv.xsl

===PlugNPlay:===
wmic /output:C:\PnP.csv /namespace:\\root\cimv2 path Win32_PNPEntity get ConfigManagerErrorCode, DeviceID, Service, Status, SystemName /format:csv.xsl

Friday, March 30, 2012

Tribulant Wordpress Shopping Cart - Canada Post Module



Issues with Tribulant Shopping Cart, especially with Canada Post module.  Need to set-up Canada Post Gateway account efficiently and integrate it correctly with Canada Post module? I re-wrote this module to work better, like the UPS module.  Be warned that the Canada Post module has issues.
Contact me for details and stories.



Tribulant implement the following free Canada Post shipping module
http://www.allaboutweb.ca/sf/canship/developer.demo.php

"It's been a long time. I don't remember when I did/updated it. I just checked the sf.net at http://sourceforge.net/projects/canship/ : last update at 2009, registed date was 2003."  Raymond Liang, May 03, 2012





Wednesday, March 28, 2012

Google Paid Search


RVM on Centos

http://www.andrewsturges.com/2011/06/installing-rvm-ruby-version-manager-on.html

Google Organic Ranking in relationship to Ad Clicks


Why run a Google Ad Words search ad when your brand appears in the organic results?

It's an important question for many advertisers. Looking for an answer, Google request a research study in 2011. The ran a test by stopping paid search ads on 400 accounts across four countries. The results were dramatic. A full 89% of visits to an advertiser's site from search ads were incremental to clicks on organic results. 


  • That means the visits would not have occurred without the ad campaigns.

It was surprise, even to the researchers. 


Think search ads aren't necessary when organic presence is high?
Think again.


Google observed what happened to organic clicks when paid search ads were paused in over 400 accounts across four countries. Using a statistical model to estimate the incremental clicks attributable to search ads for each advertiser, we found:

  • On average, 89% of paid traffic to an advertiser's site is lost and not recovered by organic clicks.





In 2011, Google released a Search Ads Pause research study which showed that 89% of the clicks from search ads are incremental, i.e., 89% of the visits to the advertiser’s site from ad-clicks are not replaced by organic clicks when the search ads are paused. In a follow up to the original study, we address two main questions: (1) how often is an ad impression accompanied by an associated organic result (i.e., organic result for the same advertiser)? and (2) how does the incrementality of the ad clicks vary with the rank of advertiser’s organic results?


 A meta-analysis of 390 Search Ads Pause studies highlighted the limited opportunity for clicks from organic search results to substitute for ad clicks when search ads are turned off. We found that on average, 81% of ad impressions and 66% of ad clicks occur in the absence of an associated organic result on the first page of search results. In addition, we found that on average, 50% of the ad clicks that occur with a top rank organic result are incremental. The estimate for average incrementality of the ad clicks increases when the rank is lower; 82% of the ad clicks are incremental when the associated organic search result is between ranks 2 and 4, and 96% of the ad clicks are incremental when the advertiser’s organic result ranked lower than 4 (i.e., 5 and below).

 While these findings provide guidance on overall trends, results for individual advertisers may vary. It’s also important to note that the study focuses on clicks rather than conversions. We recommend that advertisers employ randomized experiments (e.g., geo-based experiments) to better quantify the incremental traffic and lift in conversions from the search ad campaigns and that they use the value-per-click calculations in the original search ads pause study to determine the level of investment on their search ads.

 For more information, find the full study here

Tuesday, March 27, 2012


Installing RubyGems in Cygwin



This is as much a reminder for myself as anything else – as I’ve now had to do this about a dozen times between repaving my laptop, home workstation, and work machine(s).

The How-To

Don't try to install RubyGems for Cygwin using the gem that comes with the Ruby One-Click Installer for Windows. Instead, get the tarball, or zip file, and install it using the included installer script.
Since RubyGems is pure Ruby you don't have to worry about having a compiler installed. It should just work with the default Cygwin install plus Ruby and its dependencies. To install it, do the following steps:
  1. Download the RubyGems tarball from Ruby Forge
  2. Unpack the tarball
  3. In a bash terminal, navigate to the unpacked directory
  4. Run the following command:
    ruby setup.rb install
  5. Update RubyGems by running the following:
    gem update --system
Note: You may need to run the updated command twice if you have any previously installed gems.

Tuesday, March 6, 2012

Google Analytics Tracking Code is Broken (as of Mar 2012)




Google Analytics Tracking Code is Broken (seen Mar 2012)
{script type="text/javascript"}

  var _gaq = _gaq || [];

  _gaq.push(['_setAccount', 'UA-########-1']);

  _gaq.push(['_trackPageview']);

  (function() {

    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

  })();


{/script} --- note tag change


If http://www.google-analytics.com/ga.js is not loading for you I have a fix. 

Also in the ga.js code some references fail. 

I have a fix for this - $10.00. 

Saturday, March 3, 2012

FileZilla SSH fail on Windows 7 - ssh_init: Host does not exist








Hostname conflicts with putty session names

ssh_init: Host does not exist

http://trac.filezilla-project.org/ticket/7444 is STILL an issue using 

 FileZilla Client 3.5.3 released !



Update: A patch has been released.  FileZilla - The free FTP solution (filezilla-project.org) 


Otherwise a solution: Use  WinSCP - no problems!

It comes with open source code, so go to have options.

Thursday, February 2, 2012

InPrivate/Incognito Browsing leaves traces on disk for IE (index.dat) and for Google Browser history online!

Microsoft IE 

Microsoft describes "InPrivate Browsing" mode as;


"When checking e-mail at an Internet café or shopping for a gift on a family PC, you don't want to leave any trace of specific web browsing activity. InPrivate Browsing in Internet Explorer 8 helps prevent your browsing history, temporary Internet files, form data, cookies, and usernames and passwords from being retained by the browser, leaving no evidence of your browsing or search history

This however, isn't strictly true. Sure, you can delete the history, cookies and even Temporary Internet Files, but what Microsoft has NOT told you is that just like regular mode, EVERY website you visit, whether in "InPrivate" browsing mode or not - is recorded in the index.dat files.

Windows 7 index.dat  locations
C:\Users\\Roaming\Microsoft\Windows\Cookies\index.dat
C:\Users\\Roaming\Microsoft\Windows\Cookies\Low\index.dat
C:\Users\\Local\Microsoft\Windows\History\History.IE5\index.dat
C:\Users\\Local\Microsoft\Windows\History\History.IE5\Low\index.dat
C:\Users\\Local\Microsoft\Windows\History\History.IE5\index.dat\MSHistXXXXXXXXXXX\index.dat
C:\Users\\Local\Microsoft\Windows\History\History.IE5\Low\index.dat\MSHistXXXXXXXXXXX\index.dat
C:\Users\\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\index.dat
C:\Users\\Local\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5index.dat
C:\Users\\Roaming\Microsoft\Internet Explorer\UserData\index.dat
C:\Users\\Roaming\Microsoft\Internet Explorer\UserData\Low\index.dat



Update Apr 19 2017 Microsoft Edge

The forensic examination of most web browsers has proven that they don't have a provision for storing the details of privately browsed web sessions. Private browsing is provided for a purpose, i.e. privately browsing the web, which is being delivered.
However, in the case of Microsoft Edge even the private browsing isn't as private as it seems. Previous investigations of the browser have resulted in revealing that websites visited in private mode are also stored in the browser’s WebCache file.
\Users\user_name\AppData\Local\Microsoft\Windows\WebCache

Google Chrome

Google Chrome stores history, bookmarks, saved password, thumbnails,etc at "

[Username]\Local Settings\Application Data\Google\Chrome\User Data".

So you can wipe out all browsing traces by deleting this folder.


A new window will open with the incognito icon icon in the corner. You can continue browsing as normal in the other window.

You can also use the keyboard shortcuts Ctrl+Shift+N (Windows, Linux, and Chrome OS) and ?-Shift-N (Mac) to open an incognito window.
Browsing in incognito mode only keeps Google Chrome from storing information about the websites you've visited. The websites you visit may still have records of your visit. Any files saved to your computer will still remain on your computer.For example, if you sign into your Google Account on http://www.google.com while in incognito mode, your subsequent web searches are recorded in your Google Web History. In this case, to prevent your searches from being stored in your Google Account, you'll need to pause your Google Web History tracking.


Update Apr 19 2017

It's gotten very complicated stop your Google Web History Online, because now there are many more options to review.


Stopping your Google Web History Online will apply to normal Google Chrome sessions and Incognito sessions. There are no distinguishing between the two in the preferences.

Step 1

This is your starting point, review all the privacy controls 
https://support.google.com/accounts/topic/7188674?hl=en&ref_topic=6152259       

Step 2


For Stopping Online Web Search History choose
       Delete searches & other activity from your account
using https://support.google.com/accounts/answer/465?hl=en&ref_topic=7188674 


Goto Stop Saving Activity in middle of page

Choose Activity controls link








Step 3

Review this page "Activity Controls" and use slider to the right to pause you Browsing History.



Step 4


Review this for all of your platforms.
Go Back to previous page and scroll to bottom.



Step 5 


Repeat these steps for all platforms

Step 6


Review all privacy setting at Google.
https://support.google.com/accounts/topic/7188674?hl=en&ref_topic=6152259