The Local Wisdom Blog

The Local Wisdom Blog
Aug 30

How to setup CSS for printer friendly

Posted by: Michael Alfaro

Was looking for some code to keep some images together near a page break and found this article from WordPress.  here’s what I found:

Page Breaks

While these do not work for every browser or printer, you can instruct them not to “break” your photographs or graphics in two pieces, or break apart blockquotes, or not to have a page break after a heading but to force it to break before the heading. This is not a perfect science, but if you are really particular about how your printed web page looks, you might want to use these.

h1, h2, h3, h4, h5, h6 { page-break-after:avoid;
     page-break-inside:avoid }
img { page-break-inside:avoid;
     page-break-after:avoid; }
blockquote, table, pre { page-break-inside:avoid }
ul, ol, dl  { page-break-before:avoid }




Aug 30

httperrors element in IIS7, what does it all mean???

Posted by: Michael Alfaro

This is a spinoff from my previous post about how to setup custom 404 error pages through web.config.  After I found the solution, I felt the need to see how it really works, and figured out that httperrors lets you configure HTTP error messages for a Web server right thorough the web.config.  I found the original source here: http://msdn.microsoft.com/en-us/library/ms690497%28VS.90%29.aspx

There was too much content to format here, so I’m just showing a screenshot, you can click the above link to get to the source:

httpErrors image





Aug 30

How to setup custom 404′s for IIS and ASP.net through web.config

Posted by: Michael Alfaro

If you use Rackspace’s cloudsites, you’ll find that not having direct access to IIS makes you learn how to use Web.config for everything!  Today we had to put up a custom 404 page, which we got to work at first for any missing .aspx page, but didn’t work for a random missing directory.  After a few minutes of searching, I found my answer here.  Hope you find it useful:

Classic ASP and Static Content:

<configuration>
  <system.webServer>
         <httpErrors errorMode="DetailedLocalOnly" defaultPath="/404.asp" defaultResponseMode="ExecuteURL">
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" />
         </httpErrors>
  </system.webServer>
</configuration>

.NET

<configuration>
  <system.web>
    <customErrors defaultRedirect="404.aspx" mode="RemoteOnly">
      <error statusCode="404" redirect="404.aspx"/>
    </customErrors>
  </system.web>
</configuration>

This exampled shows 404′s for all content redirecting to index.html, you will want to include both to get all pages (.aspx and everything else) to redirect correctly:

<configuration>
  <system.webServer>
         <httpErrors errorMode="DetailedLocalOnly" defaultPath="/index.html" defaultResponseMode="ExecuteURL">
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/index.html" responseMode="ExecuteURL" />
         </httpErrors>
  </system.webServer>
     <system.web>
                 <customErrors mode="On">
                     <error statusCode="404" redirect="/index.html" />
                </customErrors>
     </system.web>
</configuration>




Aug 11

Exchange 2007 and Winmail.dat, why???

Posted by: Michael Alfaro

We’re using postie on our wordpress to allow our users the ability to email in posts and edit content on our site.  Recently I noticed that when I sent images through our exchange server, it was stripping out the images and replacing them with winmail.dat.  5 minutes of searching the internet gave me an answer once again!  It seems that certain contacts in your exchange contact list will get data formatted specifically for outlook clients.  What causes the exchange server to make this assumption, I haven’t found out yet, but at least I was able to stop it from happening on our exchange server.

Here’s the summary of the solution

“We’ve sorted this out, this happens on domains that doesn’t know how to process winmail.dat.
We’re using Exchange 2007 and it happens only when we send emails to mail contacts on a specific mail domain. What we’ve done is in EMC, go to the properties of the mail contact and on the Genral tab on the “Use MAPI rich text format” option, choose “Never” instead of “use default settings”. That sorted it out!”

The whole original solution can be found here





Jul 29

App_Offline.htm and working around the IE Friendly Errors feature

Posted by: Michael Alfaro

if you try to use the app_offline.htm file, you’ll probably have very little code in it to show your “Site is down” message.  This causes an issue in IE as the “server returns a non HTTP-200 status code with less than 512 bytes of content, IE will not show the returned HTML and instead substitutes its own generic status code message”

Thus to fix it, you can put in more content to get the size of the file over 512 bytes as such:

<!–       
Adding additional hidden content so that IE Friendly Errors don’t prevent
this message from displaying (note: it will show a “friendly” 404
error if the content isn’t of a certain size).

Local Wisdom is the best web company ever!!!   
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!   
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!   
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!
Local Wisdom is the best web company ever!!!

–>

This is just a comment which the user will never see, but will help you get over the 512 byte mark. 
I found this solution here (http://weblogs.asp.net/scottgu/archive/2006/04/09/App_5F00_Offline.htm-and-working-around-the-_2200_IE-Friendly-Errors_2200_-feature.aspx), so a big shoutout to them for making it so easy to find!!!





Jul 11

Olivia Munn and Big Latin, the Dynamic Duo!!!

Posted by: Michael Alfaro

Olivia Munn and Big Latin AKA Mike


It was a humid day and took 4 hours of waiting in line, but it was worth it!   The time went by very quickly as I got to catch up on life with Valiant (his pic here), and when we finally got to meet Olivia, she was very pleasant and talkative with all the people that came out to see her, very cool indeed :)

I’d love to tell a story about how I woo’ed her with my electrifying personality and that we cut a deal right on the spot to have Olivia endorse Local Wisdom by allowing us to redesign her website, but then I’d be lying.  I was really more of  a deer caught in headlights as I didn’t really think ahead of time of what I wanted to say to her.  Overall she was really cool, spent more time with each fan then you’d think.  You could tell that she’s had a long day, or “a long year” as she said when I asked her about her day, but she’s really appreciates all her fans who helped make the book deal possible.

If you’d like to see if she’s coming to your city check out her schedule here.  I would suggest going to the signing if you are a fan.  As far as the book itself, I haven’t had time to read much of it yet, but I’m making time this week to read it instead of watching some of my nightly DVR shows :)   I’ll post a review after I’m done.

Hopefully Olivia or her people will read this post and contact Local Wisdom to design her website and bring the Dynamic Duo of Olivia Munn and Big Latin AKA “Mike” together again!





Jun 28

U.S. Supreme Court Decides Business Method Patentabiliy Case

Posted by: Michael Alfaro

I received this from our trademark & patent lawyer Rich Roberts at www.robertspatent.com
Interesting to see what’s new in the world of trademark and patent law:

This morning the United States Supreme Court issued its much awaited decision in the business-method-patent case of Bilski v. Kappos.  The lower U.S. Court of Appeals for the Federal Circuit upheld the rejection of the applicant’s patent application for a business method claims as not meeting its newly devised “machine-or-transformation test” of patent eligibility. Under this test a claim to a process qualifies to be considered for patenting only if it either (1) is implemented with a particular machine, that is, one specifically devised and adapted to carry out the process in a way that is not concededly conventional and is not trivial; or else (2) transforms an article from one thing or state to another.  The Supreme Court rejected these tests and decided that although these tests may be a useful and important clue or investigative tool, it is not the sole test for deciding whether an invention is a patent-eligible “process” under 35 U.S.C. 101.

This case is important because the Court rejected the theory that business-methods are categorically outside of patent eligibility under 35 U.S.C.101.  The Court upheld the rejection of this particular applicant’s claims on the basis of its prior decisions of Gottschalk v. Benson, 409 U. S. 63, 70 (1972), Parker v. Flook, 437 U. S. 584, 588, n. 9. Pp. 5–8, and Diamond v. Diehr, 450 U. S. 175, 182, holding that the claims do not present patentable processes, but merely attempt to patent abstract ideas.  The full opinion is at: http://www.supremecourt.gov/opinions/09pdf/08-964.pdf

If you ever need trademark & patent expertise, we highly recommend Rich, here’s his info:

Richard S. Roberts
Roberts & Roberts, L.L.P.
Attorneys At Law
P.O. Box 484
Princeton, New Jersey 08542-0484

TEL: (609) 921-3500
FAX: (609) 921-9535
E-Mail: rroberts@robertspatent.com
Website:  www.robertspatent.com



Tags: ,


Jun 23

Disable suggested contacts in Outlook 2010 so your Iphone contact list doesnR...

Posted by: Michael Alfaro

I just installed Outlook 2010 and saw my contact list double in size on my IPhone soon after.  Took me a while to see that it added a “Suggested List” to the iphone where all these extra contacts were coming from.  I found a blog post that shows how to remove the suggested list completely from outlook 2010, thus fixing the problem on the Iphone here:  http://www.blackonstuff.com/2010-01-28/how-to-disable-suggested-contacts-in-outlook-2010/

You can also just look at your “Contacts” group on your Iphone instead of “All Contacts” and that would help you ignore the “Suggested Contacts” list, but if you have 2 or more contact groups that you need like from yahoo, gmail, exchange and such, then the solution below is a better option:

“Access the File tab and then the Options on the left …”



“… then the Contacts group and uncheck the “Automatically create Outlook contacts for recipients that do not belong to an Outlook Address Book”. After that, just delete all the harvested contacts in the Suggested Contacts folder and your iPhone will automatically update with just the contacts you’ve added.”





Jun 22

Funny email forward about password security

Posted by: Michael Alfaro



During a recent password audit, it was found that a
blonde was using the following password:

“MickeyMinniePlutoHueyLouieDeweyDonaldGoofySacramento”

When asked why she had such a long password, she said
she was told that it had to be at least 8 characters
long and include at least one capital.



Tags:


Jun 16

Goldeneye 007, new version of one of the best games of all time!

Posted by: Michael Alfaro

Couldn’t believe when Derrick told me about this, and can’t wait!!!! Hey Shawn, quick game of escort, 1 on 1???