Monthly Archives: February 2011

Posted by Michael Alfaro on February 28, 2011

Using htaccess to password protect a site

0

Needed a reference today to password protect a wordpress site and found one here:

http://cloudsites.rackspacecloud.com/index.php/How_can_I_password_protect_my_website%3F

“How can I password protect my website?

From Cloud Sites Wiki
You can password protect your website, or any of its directories, through basic authentication using a .htaccess file. PHP must be set as the default technology for a site in order to utilize a .htaccess file. If used on a site where ASP is also an enabled technology, please be aware that this will not protect ASP pages.

Create the .htaccess file

This file sets up the requirement for basic authentication and also points to the file containing a list of authorized users.

  • Open a simple text editor, such as Notepad.
  • Insert the following code:
# The name of the area
AuthName "Name of Password Protected Area"

# Type of authentication. Always basic
AuthType Basic

# Path to .htpasswd file for the site.
# It's preferable to not have this in any
# of the site's content directories.
AuthUserFile /mnt/Target01/[DDI_ID]/[CLIENT_ID]/[WEBSITE_NAME]/.htpasswd

# The requirements to view the site. This
# requires that the browser provide
# credentials matching on of the users in
# the .htpasswd file specified above.
Require valid-user
  • Replace the text inside of the quotation marks on the AuthName line to the name of your password protected area (Ex. AuthName “My Password Protected Directory”).
  • The text after AuthUserFile must be changed to match your site’s server side path to a .htpasswd file we will create soon. To find the server-side path, see How do I find the server-side path for my site?. (Ex. /mnt/Target01/000000/www.mywebsite.com/web/content/.htpasswd).
  • Save the file as “htaccess.txt” and upload it to the directory you want protected.
  • Rename the file to “.htaccess”.

Create the .htpasswd file

This file will contain a list of usernames and password sets. Each line should contain one set and the username and password should be separated by a colon

  1. Open a simple text editor, such as Notepad.
  2. Use a .htpasswd encryption tool, such as the one available at http://www.4webhelp.net/us/password.php. This will automatically generate the content for the .htpasswd file.
  3. Copy the output of the encryption tool to your text editor.
  4. Save the file as “htpasswd.txt” and upload it to your site to the path you are pointing to in the .htaccess file.
  5. Rename the file to “.htpasswd”.

Following these steps will setup basic authentication password protection to the directory indicated. If you are unable to view the .htaccess and .htpasswd files after you renamed them, you will need to configure your FTP client to view hidden files.”


Topics:

Posted by Michael Alfaro on February 28, 2011

TortoiseSVN Tutorial

0

Was looking for a simple Tortoise SVN tutorial for some of the new blood here at LW and found a nice and short one here:

http://harfordhackerspace.org/2009/07/sourceforge-and-tortoisesvn-tutorial/

here’s an excerpt:

“TortoiseSVN is a shell application. That means it’s an application that it interacts with the operating system. In this case it interacts with the file system. This will become visible in just a few moments. The other thing to know about TortoiseSVN is that you won’t find an icon in your start menu to run some elaborate  GUI (Graphical User Interface). Instead, you will notice a new menu whenever you Right-Click on your Desktop, a File Folder, or a File.  The Windows file system esentially becomes your GUI for working with Files.”


Topics: , ,

Posted by Michael Alfaro on February 23, 2011

zurb.com playground, loving it!

0

Ran into this when I was looking at verifyapp.com which is one of their products, check that out too, great product.  Zurb is the company that created verifyapp and of course in my search to see who made it, I found their playground area where they keep alot of cool useful stuff for web design and development companies such as ours.  They have CSS3, buttons, sketch documents and JQuery of course.  Check it out here:

http://www.zurb.com/playground


Topics: , , ,

Posted by Pinaki Kathiari on February 18, 2011

Listen to any song in the world for free

0

Downloading mp3 is so yesterday… Enter Grooveshark a cloud-based online music search engine, music streaming service, and music recommendation service. Its like bringing iTunes, together with Pandora, together with social media.

Apple needs to allow this on the iPhone (although I understand why they don’t), I’d need this on my iPhone without having to Jailbreak it.

Check it out

Here’s what Wikipedia has to way about them.

Grooveshark is an internationally available online music search engine, music streaming service and music recommendation web software application, allowing users to search for, stream, and upload music free of charge that can be played immediately or added to a playlist.

Grooveshark streams 400 to 450 million songs per month, to more than 29,000,000 users. As of April 2009, its audience was growing at a rate of 2–3% per day.


Topics: ,

Posted by Shawn Venkat on February 17, 2011

Google Periodic Table of APIs

0

Check this out..


Topics:

Posted by Michael Alfaro on February 16, 2011

10 (Additional) Things Every Software Architect Should Know: Learn Business from Data, Learn Data from Business

2

Inspired by O’Reilly’s 97 Things Every Software Architect Should Know, I am adding my own few things (10, to be specific, and not all at once).

The first one: Learn about the Business from the Data, Learn about the Data from the Business.

It’s all too common – you begin to work on a project, the client has a tight deadline and they need a new site/app/product launched, and lo-and-behold: you don’t know how the client’s business works! You have further conversations with them; they direct you to a different department or person (deflecting the responsibility, and possibly not doing their job). Before you know it, you’re herding cats, and trying to figure out how you got wrapped up in your current mess (and get work done at the same time).

In the middle of it all, you’ve lost track of what the client really wants.

One solution? Learn about the business from the data they provide, and learn about the data you need from the business itself.

Do they say they work one way, but in reality, most of their critical IT infrastructure is given a back-seat to front-office tasks? Do they say they want a cutting-edge new software tool, but lack the resources to manage and scale it? If you can gather as much data as possible, you will be able to see patterns and trends. How was the data delivered? How quickly did you receive access? Are there roadblocks and hurdles in accessing even the most trivial of data? From this you can determine the ‘change aptitude’ a client can (most likely) handle.

And what about the business? What are they successful in doing? Who are their strongest, and most dedicated, in-house resources? What departments drive the business? How do they currently analyze their data, make adjustments, and carry on? Is this a company that is rapidly growing, or are they bunkered into a niche market and afraid of changing? If the answers to the above are: ‘I don’t know’, then expect problems and push back on deadlines. While not every software project is the equivalent of climbing Mt. Everest, many contain traps, pitfalls, and landslides that can leave you with an unsuccessful result.

Some questions to ask:

1. How often are metrics analyzed and tweaked? How many people have access to the metrics, and how do they view Business Intelligence in making their decisions?

2. Is the client’s in-house development team agile? Do they welcome change requests and relish scaling to new heights, or will they balk when you recommend they update their blog that hasn’t been used in over a year?

3. What is their core competitive advantage? Is there a process or product they own that differentiates them from others?

Once you begin to understand both the data and the business itself, you can make educated decisions about the rest of the project: deadlines, software recommendations, features, etc.


Topics: , ,

Posted by Michael Alfaro on February 13, 2011

Microsoft MSDN Code Gallery

0

Found this in an old email from a friend of mine.  Its a community website where developers can upload code samples for work they’ve done on microsoft’s various development platforms.  Worth checking out, you will find some cool samples to use up there.
http://code.msdn.microsoft.com/


Topics: , , ,

Posted by Michael Alfaro on February 13, 2011

JQuery extensions for the ASP.NET MVC

0


Was clicking around the internet as I tend to do sometimes and ran into this site that has JQuery extensions for the ASP.NET MVC.  You can download from codeplex here. Here’s what they say:

“DJME – The jQuery extensions for ASP.NET MVC is a lightweight framework which helps you build rich user interfaces for ASP.NET MVC while enjoying great developer productivity.

Features

  • Base on jQuery
  • Search Engine Optimized
  • Cross-browser support
  • Model DataBind supports
  • Server template and Client template supports

Full site here:

http://www.dotnetage.com/sites/home/djme.html

Demos here:

http://www.dotnetage.com/sites/home/djme-2-demo.html


Topics: , , ,

Posted by Michael Alfaro on February 10, 2011

Amazing JQuery Tools available for free

1




Ran into this site today when I was looking for a flash player that could switch and play the video in HTML5 if the browser didn’t handle flash.  While on the site, they have a bunch of JQuery tools that you can download for free with plenty of demos and full code explanations.  Amazing resource which will be part of the LW toolbox :)

“Understanding jQuery Tools

jQuery Tools is a collection of the most important user interface components for the web. These are tabs, accordions, tooltips, overlays, exposing effects and scrollables. They can dramatically improve the usability and responsiveness of your site. They mainly focus on presenting information and visual appeal. After all, this is exactly what most websites desperately want: to present their content to the reader in an easy and visually pleasing manner.

Other JavaScript UI libraries focus on desktop-like features such as drag-and-drop, ranges, sortable tables or draggable windows. They are meant to build “rich internet applications” (RIAs) such as email clients, task managers, CRM software, image organizers or feed viewers. These kinds of applications are very useful within a small group or when used in intranets; however, normal websites are very different in nature. Their purpose is to look good and present information. jQuery Tools are built exactly for that purpose.”

http://flowplayer.org/tools/index.html


Topics: , , ,

Posted by Michael Alfaro on February 3, 2011

Detecting browser language in ASP.NET

1

Was looking for this for our newest development project, if you don’t know, now you do :)

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/localization/culture.aspx#autoculture

“Auto-detecting the browser language for culture-sensitive formatting New in 2.0

The language list can be used to determine which culture the user most likely prefers for formatting of numbers, dates and times. ASP.NET v2.0 now provides functionality to easily detect the first language in the list and use this for formatting:

<%@ Page Culture="auto:en-US" %>

If the first language in the list matches the name of a specific culture supported by the .NET Framework, ASP.NET will set the CurrentCulture of the running thread to this culture. This happens early in the page life cycle so that all subsequent culture-sensitive formatting will be done with this culture.

If the first language in the list matches the name of a neutral culture supported by the .NET Framework, ASP.NET will try to use the function CultureInfo.CreateSpecificCulture() to create a specific culture for the purpose of formatting. For example, this would map fr into the culture for French (France). However, this determination could be inappropriate for somebody in the French-speaking part of Canada, which is why an application should provide the means to configure both culture and language – more on this personalization in the localization section.

If the first language in the list isn’t a culture supported by the .NET Framework, ASP.NET will fall back to the culture specified after the colon in the Culture declaration. This would be en-US – English (United States) in the example above.

This auto-detection functionality can be used in all places where Culture can be specified declaratively, such as in the globalization section of web.config. The auto-detection works the same for UICulture, which is used for localization and is explained later.

The following sample demonstrates a Currency Exchange Calculator that reacts to different language settings in the browser (see above for information how to change this). It will display the date in the format appropriate for the first language in the list and also uses the correct decimal separator for the exchange values. Furthermore, this decimal separator can be used for the entry of the value to be converted.

Culture-sensitive date and number formatting (VB)
Run Sample View Source

In order to view text in some East Asian languages and some languages with complex scripts, you might need to install the appropriate font for Internet Explorer. Refer to Internet Explorer Help Topics for more information (see in the index under “foreign languages used in Web pages”). Alternatively you can install additional fonts from the Regional and Language Options of the Control Panel.

This sample will not display dates in the correct reading order for right-to-left languages like Arabic or Hebrew. See the second and third sample in the Localization section for information on how to handle this case.”


Topics: , , ,