chris barr

Photo/Dev/Design

Gmail Tricks

A while ago I found out about some pretty useful tricks that gmail allows you to do with your email address. While talking to some coworkers I was reminded that not everyone is aware of these, so I’d better share.

#1 – Dots Are Optional

Gmail will ignore any dots in the username portion of the email address. For example, the address joeshmo@gmail.com and joe.shmo@gmail.com are the same, mail sent to both addresses will be delivered the the same account. When I created my email address with gmail I used several dots, and over the years it’s gotten to be a bit cumbersome to always type them out (especially on mobile devices) or say it out loud to people.  It’s nice to know that I cam just omit them completely and everything will still work the same.  You can also go the other way with it of course.  If your email has no dots and you think dots are mega-rad, go ahead and start telling people your email address with added dots; it’s really the exact same anyways!

Do keep in mind though that whatever address you signed up with, you will still need to use that to log in to google services with.  It must match exactly, dots and all.

#2 – Add Whatever You Want After A Plus

Another optional character is the + sign in the username portion.  If your email is, again, joeshmo@gmail.com, the address joeshmo+ICanAddWhateverIWantHere@gmail.com is completely valid as well.  It will be delivered to you like normal, just like the trick above with optional dots.  But how is this useful?

I use this as a way of keeping track of who has my email address.  When I sign up for some new service I usually add the domain or company name after the plus sign.  If I’m signing up for a somewhat-sketchy looking site (let’s say it’s called SketchCo) I’ll tell them my email address is example+sketchco@gmail.com.  Now whenever I receive an email to this address that is not a SketchCo email, I know exactly who sold my email to a list!

This can also be used with the powerful rules and labels features in gmail. You could add a label on any email that comes in sent to a specific variation on your own email address. I personally don’t use it in this way, but it would be incredibly easy to do so.  Unfortunately, some sign up forms on websites do not treat the + symbol as a valid character in an email address, even though it totally is valid. When this is the case, you just won’t be able to use this trick on these sites.

So, what have we learned? Now we know that when using gmail, the email addresses billcosby@gmail.com and b.i.l.l.c.o.s.b.y+JelloPudding.KodakFilm@gmail.com are actually the same email address. It’s a little crazy, but it can be pretty useful if you know the tricks!

Atoms For Peace

What happens when Thome Yorke of Radiohead and Flea from Red Hot Chili Peppers starts a band? You get Atoms For Peace. In my mind Thom Yorke can do no wrong, I’m a huge fan of his and all his projects to date, and this one is no different. The entire album “AMOK” is absolutely worth a listen, but below is a bit of a sampler. Two songs from their album, and one snippet from a live DJ set. The first track “Default” is among my new favorite songs I’ve heard in quite a while.

I can’t even tell you how much I wish I was in the room for the live DJ set in that last video.

Console2 Integration With Visual Studio 2012

Do you need any kind of command line access for your Visual Studio projects? If so, that built in CMD in Windows works… but it could be a lot better.  In comes Console2 – all hail the power!  Go ahead and download it on SourceForge, although it hasn’t been updated since 2010.  If you’re new to Console2, I highly recommend first using Scott Hanselman’s recommended default setup for it. It looks much better and makes more sense after you do this.

Setting Up Console2

image001At work, we have several command line utilities that we need to run occasionally. Sometimes it’s a cleanup script, sometimes it starts a listening service for other projects we need to run.  After a while it got to be a real pain to always have to manually type in the commands and memorize the long file paths.  We soon found out that Console2 has support for custom tabs!

Here’s a screenshot of how this can look in the end.

 

image002To add these custom tabs, open the Console2 settings, and go to “Tabs”.  Add a new tab for each .bat script you want to run. Now, you just have to fill in two fields minimum like this:

Shell: %comspec% /k C:\path\to\your\folder\FILE.bat
Startup dir: C:\path\to\your\folder\

You can also do some other cool stuff like color code the backgound of each custom tab! That’s it, Console2 now has some helpful customized tabs.

Setting Up Visual Studio

image003Now in Visual Studio, you can add a button to launch Console2 to the current solution directory, sounds good right?

Go to the Tools > External Tools menu and add an entry for Console2. Point the Command to the executable for Console2, and make sure that Initial Directory is set to $(SolutionDir).. to ensure that Visual Studio passes the argument to Console2 for it to initially start in the current solution directory.

Remember the order in which this entry appears! We will need to use this number later. In this case, let’s save it as the first tool, so it’s #1 in the list.

 

image004Now the tool exists, we just have to add a button for it.  Find a toolbar you want to add the button to, click the flyout menu and and select customize…

 

image005In the next window, press Add Command and then select the Tools category.  Depending on the order of the external tool we made earlier, select that external tool.  In this case it was the first item in the external tools list, so I will select the first external command.

 

image006Now it will appear in your toolbar as “External Tool 1″ which you will probably want to rename to something that makes more sense.

Now when you click your newly added button, Console2 will be launched and it will automatically start at your current solution directory! Pretty handy.

Easy Bundles for .NET MVC4

You’ve heard about bundles in .NET 4.5, right? If not you should read up on them, but the basics are that you can include multiple uncompressed JavaScript and CSS files in your project when in debug mode. When the project is deployed to production it will combine and minify the files for quicker downloads & fewer requests. Pretty handy!  At work we’ve recently begun using bundles in our MVC4 application.

The bundles are handy for the global files that need to be included everywhere, but nearly every page has it’s own specific CSS or JS files that needs to be linked to,  ideally minified as well, and possibly combined when there are multiples.

In razor, here’s the syntax we use to link to these files:

@Html.Style("~/Styles/someFile.css")
@Html.Script("~/Scripts/foo.js", "~/Scripts/bar.js")

Pretty easy right? Just link right the the file, or multiple files and they will be included on the page, but in production they will be minified and combined when multiples exist. How is this done you might ask? Well, take a look at this class below that gives us some extensions in the @Html. namespace.

That final MakeBundleName function will make the filename for the bundle (duh). Let’s say you provide it with the two script paths from the usage example above. The final output url for the bundle would be ~/Scripts/bundles/Scripts.foo+Scripts.bar – Basically it just replaces slashes with dots and concatenates multiple files with a plus. This allows for a unique name, but it also won’t change between page loads since it’s based on the input file names.

This all came about from a StackOverflow question I helped answer. There are a few caveats to this method that could be improved upon, the biggest of which is that this will automatically decide the bundle path for you.  This means that relative paths inside of your CSS/JS files will not work when the bundle URL is used!  For our use case, this is fine, but for what you do, it might not.  It would be fairly easy to extend this to have a different syntax like this if needed:

@Html.Script("~/bundles/my/custom/path", "~/Scripts/foo.js", "~/Scripts/bar.js")

Questions? Comments? Improvements? Let me know!

Hiding Junk You Don’t Care About on Facebook

If you’re like me, you have a love/hate relationship with Facebook.  Some things people post are great and worth your time, but there’s an increasing amount of stuff you just don’t care about in the least.  For me, this list includes the following:

  • Baby photos & parents updating on what their baby just did
  • political issues
  • Husbands & wives talking about how awesome their spouses are
  • Live updates of sporting events currently playing on TV
  • Facebook shares, likes, product placements, claiming of offers, etc.

Lucky for me (and you) there’s a pretty handy way to hide any and all Facebook posts that contain words related to these subjects!  Enter the Google Chrome plugin Unwhatever Me - download it!  Once you have it, all posts that contain words you don’t want to see will be replaced by an image of something awesome you’d rather be looking at, like cats or robots or cakes.

Here’s how I’ve got it set up.  First, go into the settings and delete any of the replacement content feeds, the defaults are no good.  Instead replace it with the current best images from 500px – a pretty awesome photography site.  The URL for the feed is http://feed.500px.com/500px-best

Next, update your word list.  Here’s all the words I block, and I’ve even broken them up into categories for you! Each word or phrase should be separated by a comma, and the plugin will look for these words in the post body and in the comments of a post!

Baby Stuff

year old, so adorable, our family, just learned to walk, years old, month old, months old, so adorable, pajamas, eating solid foods, crawling, so cute, is precious, is too cute, look at those cheeks, cutest baby ever, newborn, and mommy, looks like dad, toesies, just like mom, looks like mom, mother and, father and, cute baby, can’t wait to meet, gorgeous baby, infant, new addition to the family, first ballgame, day old, bundle of joy, birth, ultrasound, baby feet, lbs oz, toddler, carriage, cradle, gave birth, little one, sonogram, preschool, first day at school, gerber, wait to meet him, wait to meet her, little gift, pregnancy, born today, now a father, first birthday, grow up so fast, baby boy, baby girl, 1st birthday, is growing up, diaper, diapers, tiny toes, all snuggly, binky, pacifier, bib, onesie, sockies, gerber, such an angel, what an angel, little angel, little princess, daycare, tantrum, won’t stop crying, is finally napping, first steps, carseat, sweet little baby, weeks old today, months old today, Big boy, bath time, little girl, little boy, he is adorable, she is adorable, little munchkin, too cute

Spouse Brag

best wife, best husband, best hubby, amazing wife, amazing husband, amazing hubby

Sports

auburn, roll tide, war eagle, BCS, touchdown, gators, LSU, Mississippi state, florida state, Aggies, Aggie’s, NC state, Texas A&M, bama, football, baseball, basketball, watching this game, watching the game, to overtime, SEC, ACC, NCAA

The Dumbest Possible Stuff

that moment when, yolo, like if you, share if you

Facebook Annoyances

Share this photo and, claimed an offer from, sponsored post, · Sponsored, Games your friends are playing, Suggested Post, RELATED POST, shared, AT&T American Idol

That’s all the words I use to block by, but occasionally something I haven’t thought of will slip through and I have to make changes. Got any other words to add to this list? Let me know!

1 2 3 10