Transfer mode set to Awesome http://transfermodeawesome.posterous.com Dorkly bits on Exchange, Windows, software and whatever else I can think of. posterous.com Tue, 08 May 2012 16:39:00 -0700 Dumping MySQL to import into a new Spree instance http://transfermodeawesome.posterous.com/dumping-mysql-to-import-into-a-new-spree-inst http://transfermodeawesome.posterous.com/dumping-mysql-to-import-into-a-new-spree-inst

It seems every time I try to upgrade my Spree instance, it never goes right. It always boils down to migrations that don’t work, which is probably my fault since I’m sure I borked something about the migrations and schema at one point.

Last time I upgraded, I thought for sure I’d fixed it however. I did a new store from the ground up and imported all of my db info, fixing it manually where the schema had been modified. It worked for a good while as 0.70, then the upgrade to 1.1 came up.

Because it was such a large upgrade, it actually had to be performed in two steps, first to 1.0 and 1.1. So I correct my earlier statement in one case: the 0.70 to 1.0 upgrade went off without a hitch, migrations and all. Imagine how happy I was.

However, 1.1 bombed miserably. I ended up with failed migrations on the last step, the (now optional) product_groups migration. Suffice to say I learned a little better this time, now using the rake db:migrate:redo command to undo and redo the trouble migrations. Theoretically this should have taken care of the other considerations wrt schema.rb and who knows what else gets modified by rake db:migrate.

However, once the migrations seemed happy and the server started up, the index paged errored out with a message like “Association not found ‘images’”. I have no idea what this means.

To see if there were something wrong with my environment, I installed a spanking-new Spree 1.1, which worked grandly.

So, not knowing what else to do, I’m back to my method of creating a new store that’s known to work and finding a way to manually import my data into the new schema, making any necessary fixes manually. Here’s keeping my fingers crossed.

Which brings me to the point at hand, which is that I forgot to post the magic mysqldump command that let me do the database import in the first place.

It’s: mysqldump -u [user] -c -t [database] > [output file]

The -t is for “no-create-info”, which tells it not to include the table drops and creates that are in a normal sqldump. Since I’m importing into a database already set up by the new instance, I want to use its schemas, not the old db’s.

The -c is for “complete-insert”, which tells it to include column names in the INSERT statements. Since the new schema may (read: will) have new columns, the positional insert which implies the columns will not usually work. This method forces the values into the proper columns, and hopefully the column values not addressed will be ok as NULLs. Obviously, this will not be the case 100% of the time, but so far so good.

So basically, I dump the old db with this command, attempt to import it into the new db which was set up by the new store, look for errors and then fix them manually. Errors tend to crop up around table renames and unacceptable NULLs.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Tue, 20 Mar 2012 07:47:35 -0700 Put a miniature, actively-updated version of a window on top of other windows http://transfermodeawesome.posterous.com/put-a-miniature-actively-updated-version-of-a http://transfermodeawesome.posterous.com/put-a-miniature-actively-updated-version-of-a http://www.klopfenstein.net/lorenz.aspx/ontopreplica

I've seen this before, but this program has really come a long way since then.

I've recently started following an irc channel (#spree on FreeNode), and I like to see the relatively infrequent updates, but it's a pain to keep remembering to switch to the window.  By the time I do, there's no chance to participate.

I vaguely remembered a program that would let me make a miniaturized version of a window that would stay on top of the others and actively keep pace with the content of the original window.  I couldn't remember the name though, and had a hard time getting google to understand what I wanted (a frequent complaint when trying to search for window-related software in Windows, imagine that).

Finally I found a cousin to the program I was thinking of (don't remember the original, but it was different).  I'd also seen this cousin at that time, but wasn't impressed enough with either of them to keep one.

This time around, though, it looks like this is a fairly mature implementation, with lots of useful options (opacity, sizing, storable settings, region selection, click-forwarding, etc).  It's now showing me just the bottom of the irc window where new comments show up.  It's at 50% opacity and 1:1 size so the text is completely legible.  Even better than miniaturized.

A quick search at alternativeto.net showed that the only other well-known option is a Mac program, so I don't know what happened to the other cousin, but I'm not worried.

You can't get the installer from codeplex (just the executable), so get it from the main site linked here.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Mon, 13 Feb 2012 08:48:14 -0800 Getting the rmagick gem to build on Linux Mint 12 with RVM http://transfermodeawesome.posterous.com/getting-the-rmagick-gem-to-build-on-linux-min http://transfermodeawesome.posterous.com/getting-the-rmagick-gem-to-build-on-linux-min I'm using RVM on Linux Mint 12 to run a Spree Commerce development server.

I had previously gotten it working on another Mint box, but I forgot the secret sauce to get the rmagick gem, a dependency of Spree, to build on the machine.

You have to install the libmagick9-dev library with the command "sudo apt-get install libmagick9-dev".  Otherwise you just get an error about not being able to find "Magick-config".

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Thu, 09 Feb 2012 15:01:37 -0800 How to turn off message Your current security settings put your computer at risk Click here to change setting? | SpinSafe http://transfermodeawesome.posterous.com/how-to-turn-off-message-your-current-security http://transfermodeawesome.posterous.com/how-to-turn-off-message-your-current-security http://spinsafe.com/2011/09/30/how-to-turn-off-message-your-current-security-settings-put-your-computer-at-risk-click-here-to-change-setting/

-- Shared with Google Share Button

If you have the Home Premium edition and you turn off the downloaded file prompting before running in Windows, IE keeps telling you how your settings are unsafe.  In business editions you can use gpedit to turn that off, but not in Home.  Here's the registry setting to turn it off in Home.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Wed, 08 Feb 2012 07:19:29 -0800 Twig's Tech Tips: Windows 7: Disable the "Open File Security Warning" message http://transfermodeawesome.posterous.com/twigs-tech-tips-windows-7-disable-the-open-fi http://transfermodeawesome.posterous.com/twigs-tech-tips-windows-7-disable-the-open-fi http://twigstechtips.blogspot.com/2009/08/windows-7-disable-file-security-warning.html

-- Shared with Google Share Button

Since I use SuRun, I get an administrative prompt whenever a program needs to run with elevated privileges.  In addition to that, when I run something that I downloaded from the Internet, I always get the "Are you sure you want to run this downloaded file?" prompt as well, making two prompts I have to navigate.  Since the elevation one is the important one, I used this article to turn off the download prompt.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Fri, 27 Jan 2012 07:36:00 -0800 Untitled http://transfermodeawesome.posterous.com/96466024 http://transfermodeawesome.posterous.com/96466024

My Favorite Registry Settings

  1. HKEYLOCALMACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  2. HKEYLOCALMACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  3. HKEYLOCALMACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
  4. HKEYLOCALMACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Thu, 22 Dec 2011 09:09:00 -0800 Adding alternate Ruby installs to DevKit with pik http://transfermodeawesome.posterous.com/adding-alternate-ruby-installs-to-devkit-with http://transfermodeawesome.posterous.com/adding-alternate-ruby-installs-to-devkit-with

Actually, pik doesn't have anything to do it, but you'd need pik to manage multiple Ruby installs on Windows, so it's probably in the picture.

There's a pik command that mentions DevKit, but for whatever reason it's not really documented.

That's ok, because you don't need it. Instead, just go to your DevKit directory and edit the file config.yml. Add your Ruby's path on its own line at the end of the file, matching the format of the line above it.

Then go to a command-line and run ruby dk.rb install. That should be it.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Wed, 21 Dec 2011 12:26:00 -0800 Managing multiple Ruby environments with pik http://transfermodeawesome.posterous.com/managing-multiple-ruby-environments-with-pik http://transfermodeawesome.posterous.com/managing-multiple-ruby-environments-with-pik

In my last post, I talked about using git to distribute the same ruby environment from production to development in order to make sure the code that works in development is more assured of working in production as well.

However, this might normally constrain you to only using one ruby environment on your development machine (the production one), which is a real constraint. Especially when it comes to evaluating whether to upgrade to the latest Spree code, for example, you might need an entirely different environment. Using git to try to swap back and forth between two or more ruby environments is not a good solution, since you don't want your private ruby environment to pollute the repository, and you probably want the two (or more) to exist alongside each other for the long term.

Unix users have RVM to handle this. Pik is a Windows alternative endorsed by the RVM developers.

You can install pik by following the directions in this post. Pik can then switch between different installed ruby environments with a single shell command.

Normally, you may manage different ruby versions with pik. You install the Ruby versions as usual, side-by-side, by using something like the Ruby installer. Each environment will contain an entirely different set of gems, so you can install two different versions of rails, for example, without any conflict and without it touching your golden production environment.

You should probably only have one instance on your path at a time. Pik will manage this when you switch environments.

Once installed, you run a pik command to add them to your list of environments. You can even add two rubies of the same version. You'll get a warning and be asked for a short name since normally it collapses the version number into a short name, which would cause a conflict when using two rubies of the same version.

Use the pik add [location] command to add different ruby environments to the list of available ones.

Use pik switch [shortname] to switch to an alternate ruby environment. Use ruby -v and/or rails -v to check that your environment.

Use pik default to switch back to your default ruby environment.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Wed, 21 Dec 2011 12:13:00 -0800 Managing Production and Development Ruby Environments with Git http://transfermodeawesome.posterous.com/managing-production-and-development-ruby-envi http://transfermodeawesome.posterous.com/managing-production-and-development-ruby-envi

This is an experiment for the most part, but due to blog postings such as this one, I'm led to believe that you can manage and distribute a particular Ruby environment by using Git.

While the idea of distributing an application via Git might seem at odds with Windows' application management (MSI's, Programs and Features Control Panel), it's believable that it might well be possible with applications such as Ruby, which aren't tightly coupled with Windows in the first place. Ruby is primarily developed for a Unix environment in the first place, and although there is Windows integration via RubyInstaller, there really isn't anything in the package itself that expects more than a working shell environment. I'm guessing that RubyInstaller does little to Ruby itself, instead just wrapping with an installer and uninstaller and offering to add Ruby to your path and associate files with the executable.

Putting binaries under version control is usually another point of contention, but that shouldn't be a problem either as long as we're talking about a uniform Windows environments. The Ruby executables installed in one environment should work fine whether distributed to XP, 7, 2003 or 2008. The only relevant distinction should be the 32- or 64-bitness. That leaves the rest of the files, which are primarily the installed gems and any native files they rely on. Again, the bitness is the only issue there. Since the gem files are primarily source code, version control makes fine sense there.

So I'm giving it a shot.

What's the point of doing this? Just as important as the code used for our Spree store is the Ruby environment that runs it. If either break, the store won't run. And we don't sell. And we don't eat. The source code for the store is guarded jealously with Git. Why shouldn't the Ruby environment as well be guarded so?

While that's an important reason to consider using Git on the Ruby environment, that goal can be accomplished via other means (backups, shadow copies). However, running shadow copies on the system drive poses some issues of its own. We only really want to track one relatively-unchanging folder, but shadow copies will track the many automatic system changes that occur as well. This might argue that the Ruby install should be moved to another directory, but that's a different discussion. Backups are difficult to set up and aren't always done, even though they should be. Again, another discussion.

However, there's another purpose which suits version control that isn't taken care of by the other solutions to the backup issue. That purpose is synchronization of the development environment. While the developer may develop and test, thinking that his installation exactly matches what will be used in the final production environment, that assumption is easier said than done. Even if you install exactly the same packages in production and development, there is inevitable drift as experiments are tried, upgrade processes face and resolve issues, and mistakes are made with installs. Git provides a way to mirror the production environment to any developer in a consistent way.

So I'm creating a github repository for the Ruby install on Mojo-a, which I will clone to my development machine and use when testing code which is intended for deployment.

I'll be writing another post on how to manage this environment side-by-side with the other Ruby environments I also want to be able to use on my development machine.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Wed, 14 Dec 2011 09:30:08 -0800 Using sp_change_users_login ‘auto_fix’ to fix user/login http://transfermodeawesome.posterous.com/using-spchangeuserslogin-autofix-to-fix-userl http://transfermodeawesome.posterous.com/using-spchangeuserslogin-autofix-to-fix-userl http://rainstorms.me.uk/blog/2010/02/21/using-sp_change_users_login-auto_fix-to-fix-userlogin/

-- Shared with Google Share Button

When moving a database between sql servers, the login information for the server is not included in the move.  This results in databases that have users defined but no associated logins, making them orphans.

This article details a stored procedure to fix the issue, "sp_change_users_login 'auto_fix', 'username'"

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Tue, 13 Dec 2011 13:59:00 -0800 Upgrading our mojoPortal install http://transfermodeawesome.posterous.com/upgrading-our-mojoportal-install http://transfermodeawesome.posterous.com/upgrading-our-mojoportal-install

It seems no matter how many times I've upgraded mojoPortal, I'm always at a loss as to where to begin. I've done it enough to know that it's nothing to be afraid of, but it does take some elbow grease. In addition to making sure that the upgrade goes smoothly in itself, I also always have the concern of leaving the version control system which I use to track my customizations in a working state.

This second comes into play primarily because the mojoPortal upgrade approach which I take is a customization forklift onto an entirely new set of code. I don't try to overlay the update on the old site. Rather, I unzip the new code and bring over all of the customizations. This means that from a version control perspective, I'm not making modifications to an existing family of changed files, I'm nuking the files back to zero and redoing all of my customizations on top of them. If I'm not careful, this has the effect of collapsing all of my history into one big changeset, and I don't like losing that history.

But before delving into too much detail on the version control, focusing on the upgrade itself is the primary concern.

The overall process goes:

  • review and commit any pending changes
  • backup the database
  • get the new code
  • migrate all of the customizations over (getting the vc right)
  • stop the web service
  • switch the new directory in for the old one
  • start the web service
  • visit the setup page for the new version (http://support.diditbetter.com/Setup/Default.aspx)
  • Check the security settings from the administrative interface
  • backup the old directory

You always want to make sure you check the mojoPortal release notes for the releases between your last and this one to see what caveats there are about this version.

Sometimes there are considerations for skins as well in the new version. Usually old skins won't break, but there are pages on the mojoPortal.com site which discuss upgrading skins.

Why do an upgrade by customizing the new code instead of dumping the new files on top of the old site? In the end, it's because it's generally the same amount of work and ends up with a cleaner install. Here's the reasons:

  • Sometimes files are removed or renamed in the new version. If you just overwrite the old directory, the old files won't be removed, and while this usually shouldn't matter, why take the risk?

  • Many configurations would be overwritten if you just copied over the old site. While the binary files need to be replaced, and even the configuration files need to be updated with new settings, the old customizations would get removed by simply dumping on top of the files. While user.config handles some of this, there are still customizations that occur to web.config and other files which can't be lost.

So, here are the steps in more detail.

Review and commit pending changes

  • Log into mojo-a and go to E:
  • Right-click diditbetter and select Hg Commit
  • Review any changes and commit them if desired
  • Go to \diditbetter\Data\Sites and visit the skins directory under each site
  • In each skins directory, right-click any custom skin (like diditbetter3) and review and commit any changes if desired

Backup the database

This can be done easily from SQL Management Studio.

  • Log onto mojo-a
  • Open SQL Management Studio
  • Connect as sa
  • Open Databases
  • Right-click mojoportal and select Tasks > Back Up
  • Select type Disk and click Add...
  • Name the file mojoportal.sql.[YYYY]-[MM].bak, where YYYY is the four-digit year and MM is the two-digit month
  • Put it in the default backup directory
  • Click OK until the backup is performed

Get the new code

  • Go to http://mojoportal.codeplex.com/
  • Download the latest .NET 4, MSSQL deployment files (generally this is the default download)
  • From the zip, copy the wwwroot folder to E:

Check whether there are skin modifications with the update

Usually, the changes that affect the skins are in the theme.skin file, which may or may not be customized by us, so check the repository history for the theme.skin file before just overwriting it with a new version from the upgrade's default artisteer skins.

Migrate the customizations over

This is the hard part. Not only do the files have to be right, the filesystem permissions need to be correct as well.

  • In wwwroot, delete Data\Sites (usually there will be one site called 1)
  • From diditbetter, copy Data\Sites to wwwroot
  • In each of the sites in this copy, delete all skins which aren't necessary (Data\Sites\[site number]\skins). Leave the custom skin for the site.
  • Copy the printerfriendly skin from \wwwroot\Data\skins
  • If you need skins in the future, copy them here from Data\skins, which are up to date with the latest version
  • Create a new repository in wwwroot
  • Copy .hgignore from diditbetter to wwwroot. It should contain one line: glob:*
  • Right-click e:\diditbetter and select Hg Workbench
  • Review the changelog for the site and make sure all of the changes make it over. First, copy user.config.sample to user.config and add the upgraded version of edited files to the repository (the ones that came in the zip, prior to editing). Then move over the edits (don't just drop the old files over the new ones!) one by one, committing them with the same commit messages as they had in the old repository. WinMerge is good for this so you don't just overwrite the new file with old baggage. This should include:
    • Basic web.config and user.config settings
      • UseRelatedSiteMode on so that the same user db is used across sites
      • The machine key is preserved from the old site, otherwise logins won't work
      • The database connection string is brought across
      • Email settings are configured
    • More user.config optimizations
      • UseKeepAlive is set to keep the site responsive
      • Notify admins on new registrations is on
      • Show the "rebuild search index" button to admins
      • Allow forcing of the preferred hostname for the site
    • Custom registration configuration
      • CustomProfile.config added
      • App_GlobalResources.resx edited with new fields
      • user.config configured with name of CustomProfile.config
  • Additionally, you have to copy over these files:
    • iirf.ini is the configuration file for URL rewriting/redirection
    • These files are for IIS to do redirects:
      • activate.aspx
      • blog-rss.aspx
      • downloads.aspx
      • news-rss.aspx
      • support-rss.aspx
    • Any custom scripts in the ClientScripts directory should be copied over including:
      • coda-slider.js
      • jquery.localscroll-1.2.5.js
      • jquery.scrollTo-1.3.3.js
      • jquery.serialScroll-1.2.1.js
  • Set the file permissions for Network Service on the wwwroot folder
    • Add Network Service to the top level with default rights plus an explicit deny for Write
    • Go to the Advanced settings, select Replace permissions... and click Apply
    • Add an explicit allow for Write for Network Service to the App_Data and Data subdirectories, also forcing it onto all subfolders and files
  • Stop the W3 service, rename the old diditbetter folder and name wwwroot in its place
  • Start the W3 service, then visit: http://support.diditbetter.com/Setup/Default.aspx. This will take some time since the site has to recompile all of its files.
  • Zip up the old site directory and archive it for safekeeping

Once the upgrade is complete, put the system through its paces, keep an eye on it for a while and check the event viewer logs for errors.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Sun, 04 Dec 2011 14:22:34 -0800 Use arbitrary fonts on the web with cufón http://transfermodeawesome.posterous.com/use-arbitrary-fonts-on-the-web-with-cufon http://transfermodeawesome.posterous.com/use-arbitrary-fonts-on-the-web-with-cufon http://cufon.shoqolate.com/generate/

-- Shared with Google Share Button

Found this neat tool.  It has one major caveat, but for its purpose it's great.  The purpose in question would be to use an arbitrary font (which you have license to and have as a TTF or OTF) on the web with good speed.  Works with all of the major browsers and any font.

The caveat is that the font is rendered in VML, which apparently makes the text not selectable.  That's a pretty big drawback for a lot of text, but may be forgivable on headings and logos, which is where I plan to use it.

The basic method of use is to upload your font to the tool's website, which converts it into a Javascript file.  Along with that, you add the cufon core Javascript to your web page, tell it what selector to render the text with your font, and then initialize the script.  Works fast and looks beautiful.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Sun, 04 Dec 2011 13:04:28 -0800 The Essential Guide to @font-face http://transfermodeawesome.posterous.com/the-essential-guide-to-font-face http://transfermodeawesome.posterous.com/the-essential-guide-to-font-face http://sixrevisions.com/css/font-face-guide/

-- Shared with Google Share Button

Here's a great article on free fonts and web fonts for use with sites.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Sun, 04 Dec 2011 12:18:37 -0800 Identifont identifies fonts by description, partial name or sample http://transfermodeawesome.posterous.com/identifont-identifies-fonts-by-description-pa http://transfermodeawesome.posterous.com/identifont-identifies-fonts-by-description-pa http://www.identifont.com/

-- Shared with Google Share Button

If you work with the web, you work with fonts, it's that simple.  Along with graphics, fonts carry a tremendous amount of emotiveness.  Choosing the right font can make or break that feel you want for your site.

Unfortunately, fonts aren't easy to deal with.  First of all, there's a zillion of them.  Additionally, once you find one you want, it's usually one you have to buy!  All those fonts don't come cheap.

So, what's there to do?  Unfortunately, I haven't found a way to get the web to tell me "what's a free font that looks like this commercial one?".  However, you can describe the characteristics of the font you want to the Identifont service, and it will give you a list of similar fonts, some of which *may* be free.  It requires a bit of elbow grease and it's not 100% successful, but I *have* been able to find free font substitutes for the ones I've wanted by using it.

If you're just looking for the name of a font that you have in a graphic, you can use Identifont or the also excellent WhatTheFont! service at http://new.myfonts.com/WhatTheFont/, part of MyFonts.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Fri, 02 Dec 2011 08:41:27 -0800 isapi-wsgi - An ISAPI WSGI Handler http://transfermodeawesome.posterous.com/isapi-wsgi-an-isapi-wsgi-handler http://transfermodeawesome.posterous.com/isapi-wsgi-an-isapi-wsgi-handler http://code.google.com/p/isapi-wsgi/

-- Shared with Google Share Button

This is a wsgi handler for Python scripts which I was able to use successfully with older versions of Mercurial's web server script.  No details on the implementation at the moment, except for the fact that I was able to model the Mercurial script's installation on the test installation provided by the wsgi handler.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Fri, 02 Dec 2011 08:08:33 -0800 How to determine what services are running under a SVCHOST.EXE process http://transfermodeawesome.posterous.com/how-to-determine-what-services-are-running-un http://transfermodeawesome.posterous.com/how-to-determine-what-services-are-running-un http://www.bleepingcomputer.com/tutorials/list-services-running-under-svchost.exe-process/

-- Shared with Google Share Button

Here's a good article on how to examine what services are running under a particular svchost.exe.  You can inspect svchost.exe with the excellent Process Explorer from Sysinternals.

Of particular interest is the section on setting the grouping of services via the registry.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Fri, 02 Dec 2011 07:31:00 -0800 Getting rid of "float: left" on mojoPortal's ASP.NET menu when using Artisteer http://transfermodeawesome.posterous.com/getting-rid-of-float-left-on-mojoportals-aspn http://transfermodeawesome.posterous.com/getting-rid-of-float-left-on-mojoportals-aspn

I started a new skin for another site using the latest artisteer30 skins in 2.3.7.0.  Artisteer 3 of course.

In the process, I went a bit deeper on making layout.master's tree structure match that of what Artisteer generates.  I got everything on this new skin looking great, but my old friend the pesky float was there, of course.

Looking back at the article on The Trouble With ASP.NET Menu, I saw the explanation for the additional classes is the Javascript associated with the menus.  I tooled around with this a bit and found a solution to disable that Javascript, so I figured I'd share it here. Fortunately, it's very simple.  See what you think.

The additional attributes on the menu markup, including the style: floats, comes from the ASP.NET AJAX scripts made specifically for the menu.  According to the articles I read, the script in question is fed to the page as "ScriptResource.axd", along with a set of query parameters tagged on the end to identify the desired script, since there's more than one.

Looking through the two ScriptResource.axd references served by the new design, I found the one that was manipulating the menu markup.  So far, so good.

I also ran across two articles on how to override these scripts through markup in the layout.master file.  They arehere and here.  Apparently, the scripts are housed in .NET assemblies and pulled at run-time, so you can't change those scripts directly but you can instead specify that ASP should pull them as plain .js files from a path on your site.  Here's the additional markup:

<asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" >
<Scripts>
<asp:ScriptReference name="MenuStandards.js" assembly="System.Web" path="MenuStandards.js"/>
</Scripts>
</asp:ScriptManager>

The MenuStandards.js script does all of the manipulation.  To see it, you can either save the source of this script from the page before you update layout.master or you can download it from Microsoft's CDN at http://ajax.aspnetcdn.com/ajax/4.0/1/MenuStandards.js.  In fact, you can see a listing of all the scripts available from the CDN at http://www.asp.net/ajaxlibrary/CDNAjax4.ashx.

If you add the MenuStandards.js file in the same directory as layout.master and use the above scriptreference markup, you'll achieve the same effect with the page as the original, however it will be fetching MenuStandards.js from the filesystem and not from ScriptResources.axd, thus giving you control over what the script can do.

There would be two approaches, the surgical and the brute force.  The surgical method would be to cut out the pieces that you don't want from MenuStandards.js and leave the rest.

While this would probably be advisable when you aren't sure what functionality is supplied by the script aside from the annoying floats, I went with the brute force approach and it seems fine for me so far.  The brute force approach is of course to just empty out the file.  The menu renders as Artisteer intended now, at least with this skin.

For the record, I tried various methods of avoiding having to have a blank .js file by, for example, not including the path attribute in the scriptreference, but I couldn't find a way to make that approach work.

Hope this helps someone else as well.

One more thing, the technique on how I found the script name (and assembly) in the first place, since you can't divine that from ScriptResource.axd.  I found an article here which told me you can completely override all of the .NET scripts using a  scriptmanager attribute ScriptPath, which forces it to look for all such ScriptResource.axd scripts on the filesystem.  Doing this led to a combination of exceptions and 404s on the scripts the page was looking for, all given by their regular name and filesystem path.  The path happens to include the assembly name.  You can download each of the named files from the MS CDN (link above), create their path and put them in there to get past one exception to see the next.  Voila.

 

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Thu, 01 Dec 2011 12:42:29 -0800 Soluto – Anti-Frustration Software http://transfermodeawesome.posterous.com/soluto-anti-frustration-software http://transfermodeawesome.posterous.com/soluto-anti-frustration-software http://www.soluto.com/

-- Shared with Google Share Button

Soluto is an awesome PC bootup analysis tool which helps you decide what software is taking precious time on bootup, among other things.  It has one of the simplest and impressive user interfaces I've ever seef and I'd recommend it for anyone.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Thu, 01 Dec 2011 08:57:44 -0800 Scott Hanselman's 2011 Ultimate Developer and Power Users Tool List for Windows http://transfermodeawesome.posterous.com/scott-hanselmans-2011-ultimate-developer-and http://transfermodeawesome.posterous.com/scott-hanselmans-2011-ultimate-developer-and http://www.hanselman.com/blog/ScottHanselmans2011UltimateDeveloperAndPowerUsersToolListForWindows.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ScottHanselman+%28Scott+Hanselman+-+ComputerZen.com%29

-- Shared with Google Share Button

Scott's superlative list of useful Windows utilities, 2011 edition.

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley
Mon, 07 Nov 2011 12:07:09 -0800 Research Finds that Privacy Tools Don’t Work | Naked Security http://transfermodeawesome.posterous.com/research-finds-that-privacy-tools-dont-work-n http://transfermodeawesome.posterous.com/research-finds-that-privacy-tools-dont-work-n http://nakedsecurity.sophos.com/2011/11/07/research-finds-that-privacy-tools-don%e2%80%99t-work/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nakedsecurity+%28Naked+Security+-+Sophos%29

-- Shared with Google Share Button

Here's an interesting article on security and information privacy.

I tend to be a bit paranoid about how much information about my surfing is tracked by these companies and what they are able to do with it.  Moreover, I don't appreciate the fact that advertising can actually become an attack vector for bad guys to take over my computer.  That's why I take several steps to prevent such tracking and advertising.

Some of the steps I take do, to some degree, affect the usability of my browser.  I have to approve certain sites before they will work as intended, usually for downloads or video.  However, that's only the most stringent of my chosen tools, ScriptNo for Chrome.  A number of other tools are available that have little to no impact on my browsing and go a long way toward protecting my privacy.

I should note that most if not all of these tools are specific to the browser you use.  I don't recommend using IE in any circumstances (except Windows Update, where you are forced to).  I prefer Chrome and recommend it to anyone.

The one privacy-related tool I use that isn't browser-specific is Panda Cloud antivirus.  It is ant-spyware as well, and occasionally it finds a tracking cookie that it will neutralize for me, but it seems to wait for me to run a scan manually, as opposed to automatically neutralizing it in real-time for me.

The rest are browser extensions or settings.

The first setting I use is Chrome's no-third-party-cookies setting.  While I can't get away with this at work, where I have a site that needs a third-party cookie (don't ask), on the Internet this should work without any kind of negative impact in the vast majority of cases.  I use it on all my personal computers and it works fine.  It also tells me, by virtue of the fact that it shows an icon in the address bar when it blocks one, that just about every site on the Internet tries to set third-party cookies.  My assumption is that the vast majority of these are trackers for advertising.  I've already blogged about this tool and how to set it here: http://transfermodeawesome.posterous.com/disable-third-party-cookies-in-google-chrome

If you want to get really zealous, you can tell Chrome to dump all cookies after it exits, but I don't recommend this.  It forces you to re-login to any sites you use regularly, which is an annoyance, and your actions are still trackable within any given session, just not between sessions.

The second thing I use is Google's Keep My Opt-Outs extension.  What this does is adds you to a registry that allows ethical advertising trackers to give you a single opt-out from all of them.  While you should never completely trust a single, voluntary measure to keep away prying eyes, this is an easy way to cut a lot of them out.

Third, I use AdBlock, which out-and-out removes the vast majority of ads from my browsing experience.  While this may or may not block the trackers that they use to monitor browsing (I don't know), it definitely keeps me from intentionally or accidentally clicking advertising, an action which explicitly gives advertisers information about me.  AdBlock is very easy to use.

I recommend all of these tools, as they don't tend to impair browsing and they afford you some extra privacy.

The last tool I use, ScriptNo, is very effective at cutting out these trackers, as it gets rid of multiple types of trackers, including webbugs, and it straight-out blocks browser access to any unknown domain.  It also blocks specific ad and malware domains.

In fact, ScriptNo is more of an anti-malware tool than privacy tool, it just so happens it is good at that as well.  I *strongly* recommend it if you do any kind of serious financial work on your computer, especially if you run a business.  If fact, if you run a business from your computer, you should really dedicate a machine to have access to your bank accounts and do *nothing* else from that computer in order to protect it from infection.  There are malwares out there which will allow bad guys to drain your bank account, frequently without you knowing about it until it is dry.

However, ScriptNo radically impacts your browsing.  It assumes every site should not be allowed to run scripts nor use a number of other techniques in wide use across the Internet, sometimes for good functions and sometimes for bad ones. You should be ready to put some work into a tool like this, but the safety and privacy it gives are substantial.  An ounce of prevention can be worth colossal amounts of cure when it comes to malware.

The impact I'm talking about is that you have to manually approve each site that you want to be allowed to use these tools such as scripts.  Unfortunately, almost all sites use them.  Fortunately, though, most don't actually need them, since they are using them for "extra", and sometimes unwanted, functionality such as advertising tracking.  Still, many sites, including ones that are trying to allow you to download software or ones that show video, will look broken when you visit them.  Frequently, you will need train ScriptNo to temporarily or permanently allow the site to use its content, and not only that, you may need to enable one or more third-party sites with unintelligible names as well.  This can be rather intimidating and annoying just to see a video, but sometimes that is a worthwhile price to pay.  I know this tool has saved my machine from infection more than once, and I'm willing to pay that price in return.  Fortunately, ScriptNo allows you to consult the Web on Trust site-safety-rating tool on any of the blocked sites, which makes it easier to be selective about the sites you trust.  Unfortunately, there is no way of sharing your training info between machines, so you have to go through this process on every computer you own.

That's it!

Permalink | Leave a comment  »

]]>
http://posterous.com/images/profile/missing-user-75.png http://posterous.com/users/hgWhd9Ir0seDw Ted Lilley lilleyt Ted Lilley