Archive for the ‘How To’ Category

How to find an excellent local coffee shop for getting work done Dec 27 2012

Actual Cafe in Oakland

As a web designer who owns my own business, I have the option of working anywhere I can get a good Internet connection and mobile phone coverage. For a while I’ve been exploring different coffee shops / cafes in the East Bay and have discovered a couple of good indicators to tell you if it will be a good cafe for working or not.

#1: Check the Yelp Reviews

Yelp iPhone app

The first place I usually start when I’m looking for a new coffee shop to try is doing a search on Yelp (either Yelp.com or using their excellent iPhone app), usually searching for places nearby that match “coffee shop wifi”.  If you then filter by Rating and Open Now, the top picks will almost certainly be excellent places to try.  If you already know about Yelp, this is probably a “duh” type of recommendation, but if you haven’t tried it or used it a whole lot lately, give it a go.  For extra points, leave a review of your experience on Yelp to help others find the good stuff.

#2: Good Atmosphere

The best coffee shops are the product of love.  It’s a very hard business to be successful in, and some places do a very good job of letting you know how much care and thought they’ve put into creating the sort of environment you’ll be comfortable sitting in for hours.  Starbucks and Peet’s have done a good job of creating a consistent experience no matter which location you go to, but they will always be less interesting than a local, independent coffee shop will be.

 

Business Cards

 

#3: Business Card Boards

It’s a funny thing, but coffee shops that are beloved by “locals” tend to have a bulletin board, usually placed somewhat prominently, full of pinned-on business cards, fliers, and other community sharing resources.  They also will often have a lot of local event or show fliers for people to peruse.  If you find a thriving business card bulletin board, that’s a good sign you’ve found a good spot.

#4: Local Focus

The best coffee shops tailor their offerings to their local community.  This could include holding regular charity-focused events, using local coffee roasters, featuring local product makers and playing a role in the greater community.  If the coffee shop has a booth at the farmer’s market, bonus points.

#5: Artsy Art

Coffee shops are a great place to see some new artwork, and for artists to get exposure for their work.  Rotating art shows help stimulate your creative impulses, and also lend vibrancy to the atmosphere.

 

Latte

 

#6: Delicious Drinks and Tasty Pastries

This is another obvious thing to look for, but delicious, expertly prepared drinks are worth seeking out.  One way I’ll check for this ahead of time is to look at the Yelp pictures for a place.  If the lattes look interesting and like the barrista paid attention to what they were doing, that’s  a good sign of quality.  The ingredients that places use are also a good sign — organic Clover milk and fresh-roasted beans?  Yes please!  You can easily pay a bit more for a drink but that’s not necessarily a bad thing, particularly since the better places try to pay their employees living wages.

#7: Strong WiFi

MacBook Pro keyboard

Even if you have data tethering for your cell phone (as I do myself) it’s very nice to have good pipes for your Internet connection.  The best coffee shops can be full of people, all using their laptops, streaming music and YouTube videos, and you’ll still have a fast and reliable connection.  It’s not a bad idea to ask if there’s a password when you’re ordering your drink.

#8: Sofas, Seats and Tables

I enjoy coffee shops that have comfortable places to sit and stay a while.  I don’t mind working with my laptop on my lap, so working on a couch is feasible for me.  Some days I prefer a table instead, and having available seating is key.  The most popular coffee shops will be pretty packed, but you should still be able to find a spot.  Having a variety of seating options is very nice.

#9: Power to the People

Outlet

Power outlets can be a precious commodity.  One pro-tip is to bring a 3-way splitter.  That way you will never go without power for your laptop — you can always sneak in.  Most of the coffee shops I spend a lot of time in have ample power outlets (another thing you can check for in the comments people leave in Yelp reviews).  This makes spending more time there feasible, because otherwise it will be a max of a couple of hours before the power runs out.  You know a coffee shop is serious about attracting regular in-shop workers if they provide power strips so there is always an outlet for everyone.

#10: Get Friendly

Coffee shops are an excellent place to meet new people.  Express some interest in what people are doing around you, but don’t be overbearing, or interrupt when they’re in the middle of something.  I’ve met a number of new clients just by sharing what I was working on, or talking with people about their projects.

#11: Clean Bathrooms

Clean bathrooms are a good sign of a well-kept coffee shop.  You’re going to have to go, so it’s nice when the bathrooms are kept tidy and are regularly attended to.

#12: Walkable or Bikeable?

I usually prefer to walk or bike to work — it’s a nice addition to the day to get a little bit of outdoor exercise.  If a coffee shop is bikable or walkable, that moves it up in my list.  If you need to drive, then good parking is another thing to check for.

Headphones

 

#13: Bring Headphones or Earplugs

If you get distracted easily, bring a good pair of headphones or earplugs and you can listen to music (or just quiet the background noise)

#14: Don’t Forget to Tip!

Barristas don’t make a ton of money.  If you find a place you like, be sure to leave a tip every time you make a purchase.  It helps keep a good atmosphere, and you won’t overstay your welcome.  You’ll be one of the regulars.  You want to be a net positive addition to the environment, and everyone appreciates being appreciated.

#15: Get Out There and Explore

Don’t get stuck in only one coffee shop, forever.  Explore your local options and see what you like the best about each place.

My current local favorite coffee shops to work at in in the East Bay:

Berkeley: Local 123A ‘Cuppa Tea

Oakland: Actual Cafe, Nomad Cafe, Bica, Spasso, Arbor Cafe, Gaylord’s

Lafayette: Panache Cafe

Walnut Creek: Cafe La Scala

What are your top criteria for coffee shops?  Where should I try next?

Classic Personal Productivity Tip: Inbox Zero method Aug 23 2011

In case you haven’t seen this video yet, you should watch it. Once I adopted the Inbox Zero system (which took about 30 minutes to do the first time) it literally changed my life for the better.

YouTube link: http://www.youtube.com/watch?v=z9UjeTMb3Yk

Email verbs:

Delete Delegate Respond Defer Do

More here: http://inboxzero.tumblr.com/

Then don’t worry. May 5 2011

Zen Flowchart

More info about this Zen flowchart here.

How to locate your php.ini file Jul 15 2010

Macbook Pro keys

When you need to know where the php.ini configuration file is on your server, here is a handy way to find it:

php -i | grep php.ini

Give it a try.

How to Unix tip: Find and remove files older than a certain time period May 10 2010

Unix Command line

If you find a directory such as /tmp/ filling up with old and uneeded files, here’s a quick tip for finding and removing what you don’t need anymore. Note that the delete function WILL remove everything it finds, so please understand exactly what it is you are doing here before running that command.

Command to find all files older than 5 days:
find . -mtime +5 -type f;

Command to delete all files older than 5 days (USE WITH CARE!):
find . -mtime +5 -type f -exec rm {} \;

From the man page for find:

-mtime n
     File’s data was last modified n*24 hours ago. See the comments
     for -atime to understand how rounding affects the interpretation
     of file modification times.

Hope that helps! Thanks for the pointers from this page.

Howto: Hotkey to mute a post in Google Buzz Mar 8 2010

Google Buzz is pretty cool, and I follow a couple of people who have been developing quite substantial conversation threads in Buzz (particularly Robert Scoble, who asks some good questions and gets a ton of answers).

If you are wondering how to mute a conversation in Buzz (when a post isn’t as interesting to you, for example), you’ve got 2 options:

Option 1:
Google Buzz mute this post
Click on the far-right top dropdown menu associated with each post and click on the “Mute this post” option.

Option 2:
Press the m key.

This will mute the post and keep it from showing up in your Buzz feed again.

Note you need to have hotkeys enabled for your Gmail account for option 2 to work.

How to fix 301 error when importing blog posts including images from a WordPress.com blog into a new WordPress.org blog Dec 2 2009

Fourth of July night - Driving home

The current import script (as of WordPress 2.8.6) is broken when it comes to successfully importing images from WordPress.com. The error you see is something like

Remote file error: Remote file returned error response 301 Moved Permanently

Fixing this involves adding a couple of lines to a core WordPress file. Hopefully a future version of WordPress will include the working version.

Note that these instructions are for WordPress 2.8.6. Your version may be different, and you may need to play with this to get it to work for you. This worked for me, YMMV.

  1. Open wp-includes/functions.php
  2. Around line 1208 or so, you’ll find the wp_get_http function.
  3. Right below where it says $headers['response'] = $response['response']['code'];, add the following code (around line 1227):
    
    // added to fix 301 redirects for blog import code from WordPress.com
    if ((string)$response['response']['code'] == '301') {
    	$response = wp_remote_request($headers['location'], $options);
    	$headers = wp_remote_retrieve_headers($response);
    	$headers['response'] = $response['response']['code'];
    }
    
  4. Save the functions.php file and copy it back to the server.
  5. Re-run the import function (Tools > Import > WordPress). Don’t worry, it won’t make copies of the posts you’ve already imported, it will just download the images to your new blog.

To fix the references to the images so they’re being served off your new blog, you can either go through every post and manually correct them all, (not very fun), or better yet, download the Search and Replace plugin, activate it and do a search for all instances of the WordPress.com image server URL in all your posts (something like http://BLOGNAME.files.wordpress.com/ with your own new URL — http://BLOGNAME.com/wp-content/uploads/). Don’t forget to test the new URL structure before you do the search and replace, otherwise you’ll have to go back and fix it.

Hat-tip to Bill Zitomer for pointing out the link to this WordPress support forum page that had a good clue to the solution.

How to disallow browsing of .svn directories on your server Oct 6 2009

If you deploy projects live out of Subversion repositories to public web servers, here’s a good tip for denying access to the .svn directories to keep people from snooping around your files.

Edit your global Apache config file (httpd.conf) or .htaccess file to include the following directive:


# Disallow any .svn directory browsing
<directory ~ "\.svn">
Order allow,deny
Deny from all
</directory>

This will tell apache to not serve up any directories that are called .svn.

How to: Get rid of widows in your WordPress posts with Widon’t plugin Feb 20 2009

I was just working on making some updates to the backend WordPress code for the Principia Pilot website (http://principiapilot.org/) and noticed widows in some of the stories.

Widows are the typographic term for a single word on a line at the end of a paragraph. I thought about the solution to this problem (basically add a non-breaking space before the last word of a paragraph) and then realized probably someone had written a plugin to do exactly this.

I tried two different plugins and like this one the best because it doesn’t overwrite the rest of the excellent WordPress typographic niceties like converting straight quotes to curly quotes:

Widon’t Download latest version here

How to: Automatically add a default set of Custom Fields to each post in WordPress Feb 12 2009

PrincipiaPilot.org screenshot showing Custom Fields being used in a template

One of the neat things about WordPress is how easy it is to add custom metadata to a given page or post that you can then use in a template to display structured information. I’ve been using this technique for a while now to extend the basic WordPress elements of title, body, excerpt, etc and allow the creation of easily editable information-rich content.

Before now I’ve used the built-in WordPress Custom Field functionality in the Add New screen where you select previously created custom fields from a drop-down list that is limited to only showing 30 items. This is quite cumbersome as you have select each field you want to add to the entry and enter the value, click the Add Custom Field button, then repeat for however many custom fields you want to use. Needless to say, this can be frustrating to have to remember to do every time, especially for non-technical clients.

The Old Way:

Selecting a Custom Field (the old way)

During a recent site conversion to WordPress that involves 4-6 custom fields for each post, we finally decided that there must be a better way, and ended up finding a WordPress plugin that is so good that it should probably be added to WordPress core, it is so highly useful. The plugin is called Custom Field Template and is developed by Hiroaki Miyashita.

The New Way:

Custom Field Template WordPress plugin screenshot

Using a simple set of options to define the template you want to use is easy. After downloading and activating the plugin, go to Settings > Custom Field Template to define your template. One is provided for you to show you the possible template values. You can set up two separate custom field template designs.

This is the code used to generate the Custom Field Template form shown in the screenshot above:

Template Instruction

<strong>Story Template Metadata Instructions <em>(All fields are optional)</em></strong><br /><br />
1. Use this form to enter metadata about this story.<br />
2. Each item will get assigned to the correct Custom Field for use in the display template.<br />
3. Click the <strong>Save</strong> button to save the values.<br />
<br />

Template Content

[summary_deck]
type = textarea
rows = 3
cols = 50
label = Summary Deck:

[byline_writer_name]
type = text
size = 35
label = Byline Writer Name:

[byline_writer_title]
type = text
size = 35
label = Byline Writer Title:

[byline_writer_picture_url]
type = text
size = 54
label = Byline Writer Picture URL:

[lead_photo_caption]
type = textarea
rows = 3
cols = 50
label = Lead Photo Caption:

[lead_photo_credit]
type = text
size = 35
label = Lead Photo Credit:

[lead_photo_url]
type = text
size = 54
label = Lead Photo URL:

Then set this setting to true by checking the box to make the form look prettier:
Custom Field Template WordPress plugin setting

Next, I tweaked the Admin CSS settings to right-justify the labels:

#cft dl { clear:both; margin:0; padding:0; width:100%; }
#cft dt { float:left; font-weight:bold; margin:0; padding: 0 8px 0 0; text-align:right; width: 20%; }
#cft dt .hideKey { visibility:hidden; }
#cft dd { float:left; margin:0; text-align:left; width:70%; }
#cft dd p.label { font-weight:bold; margin:0; }
#cft_instruction { margin:10px; }

Click Update Options to save the settings and then go to Posts > Add New to see the form in action. You may need to go back and forth a couple of times to get your text field sizes just right and to put them in the right order you want them in.

Using the Custom Fields in a template

So how do these values get displayed on your page?

Simply edit your template PHP file to look for custom field values and then display them where you want them if they’re present.

This is how I do it for the Principia Pilot site. This code goes at the top of the template for single.php

<?php
// Retrieve custom meta values from post if they're present
$byline_writer_name = htmlspecialchars(get_post_meta($post->ID, "byline_writer_name", true));
$byline_writer_title = htmlspecialchars(get_post_meta($post->ID, "byline_writer_title", true));
$byline_writer_picture_url = htmlspecialchars(get_post_meta($post->ID, "byline_writer_picture_url", true));
$lead_photo_url = htmlspecialchars(get_post_meta($post->ID, "lead_photo_url", true));
$lead_photo_credit = htmlspecialchars(get_post_meta($post->ID, "lead_photo_credit", true));
$lead_photo_caption = htmlspecialchars(get_post_meta($post->ID, "lead_photo_caption", true));
$summary_deck = wptexturize(get_post_meta($post->ID, "summary_deck", true));
?>

Now each of the possible Custom Fields are available as PHP variables that can be checked for content.

This code example shows the “summary deck” being displayed on the page if it has been entered on the create content screen:

<?php
// Show summary deck if we have one
if ($summary_deck != "") {
    echo '<h3 class="summary-deck">' . $summary_deck . '</h3>';
}
?>

Using this excellent plugin, you can set up select lists, radio buttons, check boxes and more to help you populate your Custom Fields more easily if you prefer that to using simple text fields. You can also specify default values to use for the custom fields so you don’t have to type them in every time.

Plugin Default Template Options

These are the default options included by the plugin:
[Plan]
type = text
size = 35
label = Where are you going to go?

[Plan]
type = textfield
size = 35
hideKey = true

[Favorite Fruits]
type = checkbox
value = apple # orange # banana # grape
default = orange # grape

[Miles Walked]
type = radio
value = 0-9 # 10-19 # 20+
default = 10-19
clearButton = true

[Temper Level]
type = select
value = High # Medium # Low
default = Low

[Hidden Thought]
type = textarea
rows = 4
cols = 40
tinyMCE = true
mediaButton = true

Which displays a form that looks like this:
Custom Field Template WordPress plugin screenshot - Default form options

Summary

This plugin addresses a key need when using Custom Meta Fields in a WordPress custom template design — making it as easy as possible to enter values time after time on multiple pages or posts. There are a bunch of other neat options this plugin offers to make the authoring experience even easier. This is now on my “must install” list of essential WordPress plugins.

Please support Open Source by donating to the plugin author

If you use this and like it, I highly recommend sending a nice donation to the plugin author to help support ongoing development and to say thanks. This plugin will save you and your clients a lot of time and frustration. Thanks Hiroaki!


Requirements

Requires WordPress 2.1 or higher.

Click here to download Custom Field Template plugin from WordPress.org



sell diamonds