Enable passive FTP in Windows Firewall on Windows Server 2008

June 22nd, 2009

I was having problems getting passive FTP to work on Windows Server 2008 using the IIS FTP server. By default, only port 21 is open for FTP, but passive FTP ports are blocked. Since this port is selected at random, you cannot open a particular port to make this work. Instead, enabling stateful FTP allows the firewall to see that the connection is related to an existing connection and will allow the traffic.

To enable stateful FTP:

netsh advfirewall set global StatefulFtp enable

-Chris

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to delete files older than -x- days

May 29th, 2009

I struggled to figure out how to quickly delete files in a directory older than -x- days, but finally found the trick. Below is how I did it:

# find . -mtime +5 -maxdepth 1 -exec rm -rf {} \;

The -maxdepth option tells it not to do recursion, as deleting the directory would get rid of the file anyway. If you don’t want to do a rm -rf, just remove -rf and directories won’t be deleted.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

A better way to quickly add new files to Subversion

April 14th, 2009

Thanks to trash in #bash on irc.freenode.net. Simply define this function in Bash and invoke it when ready to add:

svn_radd ()
{
    svn status | while read a b; do
        [[ $a = '?' ]] && svn add "$b";
    done
}
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to flush OS X Leopard’s DNS cache

March 20th, 2009

In earlier versions of OS X, you just ran lookupd -flushcache to clear the DNS cache. Things have changed in Leopard, but it’s just as easy. Just do this:

# dscacheutil -flushcache
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Remove Dreamweaver Notes Directories

March 18th, 2009

Need to remove those pesky Dreamweaver _notes directories? No problem:

$ find ~/sites -name _notes -print0 | xargs -0 rm -rf
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

X11BASE Ports Error on FreeBSD pre-6.2

February 25th, 2009

When installing anything that uses x11 libraries from ports on FreeBSD before version 6.2, you will commonly find the following errorOn FreeBSD before 6.2 ports system unfortunately can not set default X11BASE by itself so please help it a bit by setting X11BASE=${LOCALBASE} in make.conf.On the other hand, if you do wish to use non-default X11BASE, please set variable USE_NONDEFAULT_X11BASE.*** Error code 1Stop.To fix, on a system where x11 libraries are in their default location, do the following:# echo 'X11BASE=${LOCALBASE}' >> /etc/make.confGood luck!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to get ASP.NET MVC working under IIS 5.1 on Windows XP

February 8th, 2009

I have spent the last hour trying to get ASP.NET MVC working on my Windows XP development machine running IIS 5.1. The trick is to configure a wildcard extension handler for the ASP.NET application, routing all requests through the ASP.NET ISAPI DLL. The problem, though, is IIS 5.1 doesn’t support wildcard handlers. IIS 6.0 and above has an easy way to  manage these.

BUT… there is a bug in the IIS Manager for IIS 5.1 that allows you to set this up anyway. Here is how I did it:

  1.  Open IIS Manager. Make sure it’s the OLD IIS manager that comes with XP. If you’re like me, I installed the IIS 6.0 manager to remotely manage some IIS servers. You HAVE to use the OLD one. If you go to Help -> About Internet Information Services it should show version 5.1, not 6.0.
  2. Right-click your virtual directory application and hit Properties
  3. If it isn’t already, make sure the virtual directory is an Application and execute permissions are set to Scripts only. Click Configuration.
  4. Find out what the DLL path for .aspx is by selecting it from the list and click edit.
  5. Add a new extension, putting the path from the .aspx extension in the Executable field. In the extension field, put “.*” (without quotes). uncheck “Check that file exists.”
  6. Here is the bug. You should notice at this point that the OK box is disabled. Since .* isn’t really a valid extension, it thinks you’ve made a mistake. However, if you click your cursor back into the “Executable” field you should notice that you can now click OK. :-)
  7. Save your settings and it should work!

Good luck with ASP.NET and the MVC framework!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Purchase Price Allocation

August 10th, 2008

In research of the process for mergers and acqusitions of a company, I ran across a process for valuations and amortization of assets called Allocation. I have never heard of this term and ran across an excellent article I wanted to preserve, so am reposting. This article was originally here.

In an asset sale, the allocation of the purchase price is the process of breaking down the price paid for a business and of assigning fair values to its major constituting assets and liabilities. Whiles this accounting decision is often left to the last minute, one should keep in mind that it should be implemented similarly on both buyer and seller sides and that it may have significant consequences on the tax liabilities resulting from the sale of the business. So it is strongly recommended to resolve this issue before finalizing the purchase agreement.

The purpose of this article is to prepare buyer and seller for discussing the topic with their advisors. The article presents the main categories of assets that should be considered and to lay out the principles used by the IRS to determine the tax base for each category of assets.

This article discusses the allocation of the purchase price for the asset sale of a non-public company (usually less than $2 million sale price and where the buyer is an individual or a partnership) and the sale of other business entity types, such as sole proprietorships, partnerships, LLC’s and LLP’s.

Asset classification to maximize return and lessen taxes is part science and part art. The buyer and seller are working toward a common goal; the purchase/sale of a business, however, the financial objectives of both parties may put them at odds. When buyers purchase the tangible and intangible assets from a business, whether the existing business is a corporation, sole proprietor, a partnership, an LLC or LLP, the purchase price is usually allocated to some, or all, of the following components:

  • Tangible Personal Property (trade fixtures, furniture, equipment)
  • Leasehold Improvements
  • Value of Premise Lease (if the lease is at below market rent)
  • Covenant Not to Compete (include time and distance of covenant)
  • Training & Transition (include schedule of time, hours, etc.)
  • Registered Vehicles (do not include in Tangible Personal Property above)
  • Liquor License (include license type and number)
  • Customer List
  • Goodwill
  • Buildings
  • Land
  • Inventory

The total value allocated to all of the appropriate assets should equal the total of the purchase price. IRC Section 1060 further delineates specific items included in each of the seven "classes" of assets.

Below is a table with comparisons of how the buyer and seller would treat the assets values allocated to the above listed asset categories:

Asset Category
 
Buyer
 
Seller
 
Tangible Personal Property (trade fixtures, furniture, equipment)
 
Establishes basis, depreciate per IRS schedules
 
If held more than one year, the gains in excess of depreciation are long-term capital gain; otherwise ordinary income
 
Leasehold Improvements
 
Establishes basis, depreciate per IRS schedules
 
If held more than one year, the gains in excess of depreciation are long-term capital gain; otherwise ordinary income
 
Premise Lease
 
Amortize value over 15 years
 
If held for more than one year, is long-term capital gain
 
Covenant Not to Compete
 
Amortize over 15 years
 
Ordinary income as received
 
Training/Consultation (include schedule of time, hours, etc.)
 
Expense out as paid
 
Ordinary income as received
 
Registered Vehicles (do not include in Tangible Personal Property above)
 
Establishes basis, depreciate per IRS schedules
 
If held more than one year, the gains in excess of depreciation are long-term capital gain; otherwise ordinary income
 
Liquor License (include license type and number; is an intangible asset)
 
Amortize over 15 years
 
If held for more than one year, is long-term capital gain
 
Customer List
 
Amortize over 15 years
 
Ordinary income as received
 
Goodwill
 
Amortize over 15 years
 
If held for more than one year, is long-term capital gain
 
Buildings
 
Establishes basis, depreciate per IRS schedules
 
If held more than one year, the gains in excess of depreciation are long-term capital gain; otherwise ordinary income
 
Land
 
No immediate tax impacts
 
If held more than one year, the gains in excess of depreciation are long-term capital gain; otherwise ordinary income
 
Inventory
 
Treated as "cost of goods sold" upon sale of products
 
Ordinary income, to the extent that it is over basis
 

 

Taking into consideration the diverse tax treatments for the various asset categories, it becomes obvious that the seller will be motivated to allocate the sales price more heavily in the categories with the preferred tax treatment, those categories allowing capital gain treatment. Meanwhile the buyer will prefer a price allocation that favors categories allowing the most flexibility with the deduction and control of timing of the newly acquired assets.

Consistency between the seller and buyer in their reporting of the allocation is important. Work with professionals (licensed and/or accredited Brokers, CPA’s, attorneys) in these transactions to save you time and money down the line. Tax laws change frequently, so treat this article as a guideline subject to change by the IRS, and subject to interpretation by the appropriate professionals/advisors. Finally, the larger the transaction the more likely there will have to be a formal valuation performed, wherein some, or many of the various asset values may be indicated.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Posting More Often

November 10th, 2007

I really should start posting more often…. really, I should.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to quickly delete files from Subverseion

October 22nd, 2007

This is a modification of my quickly add files to Subversion post to allow you to delete files in SVN that have been locally deleted:

$ svn st | grep ^! | cut -b7- | xargs svn delete

Of course, you’ll need to commit the files:

$ svn commit

-Chris

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]