Tuesday, July 30, 2013

The Most Popular Pub Names [feedly]

This is what mongodb and big data is perfect for. especially if you are a Brit. Genius.

Cheers!
 
 
Shared via feedly // published on The MongoDB NoSQL Database Blog // visit site
The Most Popular Pub Names

By Ross Lawley, MongoEngine maintainer and Scala Engineer at 10gen

Earlier in the year I gave a talk at MongoDB London about the different aggregation options with MongoDB. The topic recently came up again in conversation at a user group, so I thought it deserved a blog post.

Gathering ideas for the talk

I wanted to give a more interesting aggregation talk than the standard "counting words in text", and as the aggregation framework gained shiny 2dsphere geo support in 2.4, I figured I'd use that. I just needed a topic…

What is top of mind for us Brits?

Two things immediately sprang to mind: weather and beer.

I opted to focus on something close to my heart: beer :) But what to aggregate about beer? Then I remembered an old pub quiz favourite…

What is the most popular pub name in the UK?

I know there is some great open data, including a wealth of information on pubs available from the awesome open street map project. I just need to get at it and happily the Overpass-api provides a simple "xapi" interface for OSM data. All I needed was anything tagged with amenity=pub within in the bounds of the UK and with their xapi interface this is as simple as a wget:

http://www.overpass-api.de/api/xapi?*[amenity=pub][bbox=-10.5,49.78,1.78,59]

Once I had an osm file I used the imposm python library to parse the xml and then convert it to following GeoJSON format:

{    "_id" : 451152,    "amenity" : "pub",    "name" : "The Dignity",    "addr:housenumber" : "363",    "addr:street" : "Regents Park Road",    "addr:city" : "London",    "addr:postcode" : "N3 1DH",    "toilets" : "yes",    "toilets:access" : "customers",    "location" : {        "type" : "Point",        "coordinates" : [-0.1945732, 51.6008172]    }  }

Then it was a case of simply inserting it as a document into MongoDB. I quickly noticed that the data needed a little cleaning, as I was seeing duplicate pub names, for example: "The Red Lion" and "Red Lion". Because I wanted to make a wordle I normalised all the pub names.

If you want to know more about the importing process, the full loading code is available on github: osm2mongo.py

Top pub names

It turns out finding the most popular pub names is very simple with the aggregation framework. Just group by the name and then sum up all the occurrences. To get the top five most popular pub names we sort by the summed value and then limit to 5:

db.pubs.aggregate([    {"$group":       {"_id": "$name",        "value": {"$sum": 1}       }    },    {"$sort": {"value": -1}},    {"$limit": 5}  ]);  
For the whole of the UK this returns:
  1. The Red Lion
  2. The Royal Oak
  3. The Crown
  4. The White Hart
  5. The White Horse

image

Top pub names near you

At MongoDB London I thought that was too easy, so filtered to find the top pub names near the conference and showing off some of the geo functionality that became available in MongoDB 2.4. To limit the result set match and ensure the location is within a 2 mile radius by using $centreSphere. Just provide the coordinates [ , ] and a radius of roughly 2 miles (3959 is approximately the radius of the earth, so divide it by 2):

db.pubs.aggregate([      { "$match" : { "location":                   { "$within":                     { "$centerSphere": [[-0.12, 51.516], 2 / 3959] }}}      },      { "$group" :         { "_id" : "$name",           "value" : { "$sum" : 1 } }      },      { "$sort" : { "value" : -1 } },      { "$limit" : 5 }    ]);  

What about where I live?

At the conference I looked the most popular pub name near the conference. Thats great if you happen to live in the centre of London but what about everyone else in the UK? So for this blog post I decided to update the demo code and make it dynamic based on where you live.

See: pubnames.rosslawley.co.uk

Apologies for those outside the UK - the demo app doesn't have data for the whole world - its surely possible to do.

Cheers

All the code is available in my repo on github including the bson file of the pubs and the wordle code - so fork it and start playing with MongoDB's great geo features!


How to Extend Your Wi-Fi Network With an Old Router [feedly]

Aha. I now know what to do with an old Belkin that's kicking around now
 
 
Shared via feedly // published on Lifehacker // visit site
How to Extend Your Wi-Fi Network With an Old Router

How to Extend Your Wi-Fi Network With an Old Router

When you upgrade to a faster, better router, don't toss your old one. Whether through stock or custom firmware, you can likely turn it into a repeater that can carry your Wi-Fi's signal to the dark corners of your home.

Read more...

    



Make the Most Bacon-y Burger with the Bacon Weave and Other Tricks [feedly]

I'm starving.
 
 
Shared via feedly // published on Lifehacker // visit site
Make the Most Bacon-y Burger with the Bacon Weave and Other Tricks

Make the Most Bacon-y Burger with the Bacon Weave and Other Tricks

If you're going to indulge in a bacon cheeseburger, you might as well go whole hog (sorry for the pun) and get the most bacon flavor out of it. Serious Eats shows us how to do that.

Read more...

    



Lazy loading social buttons and other performance tweaks at work today.

The end result means things are a little faster although I still have lots of optimizations to do. Getting there though!

This is what sharing it out on twitter looks like with opengraph tags etc.:


Monday, July 29, 2013

Only way to leave LinkedIn is to destroy LinkedIn HQ [feedly]

They are keen on sending emails....
 
 
Shared via feedly // published on The Daily Mash // visit site
Only way to leave LinkedIn is to destroy LinkedIn HQ
MEMBERSHIP of networking website LinkedIn can only be terminated by destroying its corporate headquarters, it has emerged. A LinkedIn spokesman said: "People have been emailing us, saying they lost interest in the site immediately after joining and have since attempted to delete their profile several dozen times. "Actually leaving the site is quite simple – [...]

How to Turn Mac Mail Into a Fantastic Email Client [feedly]

I still use sparrow but it's no longer supported and have tried postbox as its cross platform, but the default client isn't too bad and here are some tips to make it better.
 
 
Shared via feedly // published on Lifehacker // visit site
How to Turn Mac Mail Into a Fantastic Email Client

How to Turn Mac Mail Into a Fantastic Email Client

By default, every Mac is loaded up with a copy of Apple's email client, Mail. It's a fine little app, but it lacks a lot of features and settings of other apps. Thankfully, with a few tweaks to the settings and some plugins, you can turn Mail into a pretty powerful little email client—and it's free.

Read more...

    



ImageOptim — make websites and apps load faster (Mac app)

ImageOptim — make websites and apps load faster (Mac app):

"ImageOptim optimizes images — so they take up less disk space and load faster — by finding best compression parameters and by removing unnecessary comments and color profiles. It handles PNG, JPEG and GIF animations. ImageOptim seamlessly integrates best optimisation tools: PNGOUT, Zopfli, Pngcrush, AdvPNG, extended OptiPNG, JpegOptim, jpegrescan, jpegtran, and Gifsicle.

It's excellent for publishing images on the web (easily shrinks images “Saved for Web” in Photoshop) and also useful for making Mac and iPhone/iPad applications smaller (if you configure Xcode)."

'via Blog this'

Getting started · Bootstrap

Bootstrap 3 RC1 has been released and is no longer a twitter project I believe and its focus has moved to mobile first rather than the other way round.

Getting started · Bootstrap:

'via Blog this'

Sunday, July 28, 2013

jehna/VerbalExpressions · GitHub [feedly]

I hate RegEx. Anything to reduce the pain is a plus for me. And there is a C# port too. Great stuff. 
 
Navigated from jehna/VerbalExpressions · GitHub | shared via feedly mobile

Heroku .NET buildpack update to Mono 3.2 and more [feedly]

Running .NET on Heroku. Via the marvellous mono framework I assume.
 
 
Shared via feedly // published on Randoom // visit site
Heroku .NET buildpack update to Mono 3.2 and more

Hot on the heels of posts on Running .NET on Heroku and Running OWIN/Katana apps on Heroku, I'm happy to announce a couple of updates to the buildpack:

  1. Now uses the newly released Mono 3.2 runtime. I need to figure out some way for users to select what version they want the same way the Python buildpack uses runtime.txt.
  2. Adds symbolic links from NuGet.targets files to nuget.targets files to account for inconsistent casing practices in NuGet.
  3. Fetches Nuget.targets file that is not broken when doing package restore on Linux. I'm still trying to get Microsoft to accept a pull request to NuGet that fixes this.

I've also spent some time trying to switch from xsp4 to nginx and fastcgi-mono-server4, but am currently stuck.


Writedown is a new and beautiful, if restricted, Markdown editor for iPhone [feedly]

I do love my markdown!
 
 
Shared via feedly // published on iMore - The #1 iPhone, iPad, and iPod touch blog // visit site
Writedown is a new and beautiful, if restricted, Markdown editor for iPhone

Writedown is a newly released text editor for the iPhone and iPod touch that also has complete support for the Markdown format. Since Markdown is the preferred writing tool here on iMore, we're always keen to check out interesting looking new clients. Writedown is the project of Nguyen Vinh, and has seen some success over in Vietnam already. It looks great, and has some really nice features within that make it well worth a look, but at the same time it's pretty restricted as well.

Perhaps my favorite thing about Writedown is the pull-out Markdown crib-sheet. A simple swipe in from the right brings out a handy guide to the most common syntax that you'll need to put together a perfectly formatted Markdown document. Also of note is the cursor button, allowing you to scroll around documents with ease instead of jabbing your finger at the screen trying – and failing – to hit the right spot. It's beautifully designed, and won't look at all out of place in an iOS 7 world, and there's a bunch of customization features including a dark theme.

Textexpander support is also included, which makes Writedown a real production machine. Cloud syncing is taken care of via Dropbox, Google Drive or Evernote – no iCloud – and there's a whole heap of other apps that you can open your Writedown documents in as well as exporting to print, email and pdf.

So, a lot to like, but sadly some massively restricting areas that prevent this being the productivity tool of your dreams. Firstly, while hopefully just a bug to get worked out, if you leave the app and then come back in to carry on, the text in your document seems to magically disappear. Secondly, there doesn't seem to be an option to edit notes you've already created, again unless there's some bugs that need working out. I hope it's the latter.

Writedown has masses of potential, and some really nice features that make it worth taking a look at, but in greater amounts some frustratingly restrictive aspects. Hopefully the developer keeps up the hard work, because underneath the kinks, there's a great app waiting to get out.

    



Wednesday, July 24, 2013

Monkey space 2013

So excited about this!

http://www.slideshare.net/migueldeicaza/monkey-space-2013

The 4 server logs you NEED to know to fix any IIS / ASP.NET error [feedly]

Ahh server logs...
 
 
Shared via feedly // published on ASP.NET Community Spotlight // visit site
The 4 server logs you NEED to know to fix any IIS / ASP.NET error
When you investigate IIS or ASP.NET errors in production, does IIS sometimes feel like a black box? Mike Volodarsky shows you the 4 server logs you need to know to always find the error you are loo...

Building remote control service for Spotify with ASP.NET Web API and SignalR [feedly]

This looks interesting!
 
 
Shared via feedly // published on ASP.NET Community Spotlight // visit site
Building remote control service for Spotify with ASP.NET Web API and SignalR
Filip Woj. takes a look at controlling a Spotify client remotely over HTTP using a small API toolset created using self-hosted ASP.NET Web API, pushing current player status using SignalR.

Google announces Chromecast, $35 HDMI dongle to stream supported services to TV [feedly]

Want.
 
 
Shared via feedly // published on iMore - The #1 iPhone, iPad, and iPod touch blog // visit site
Google announces Chromecast, $35 HDMI dongle to stream supported services to TV

Google announces Chromecast, $35 HDMI dongle to stream supported services to TV

Google has just finished their big breakfast event and one of the highlights for Apple users is Chromecast, a $35 HDMI dongle that turns any TV into a receiver for YouTube, Netflix, and potentially other services that adopt the API. It seems like Apple's AirPlay, but has some benefits and drawbacks all its own. Here's what Phil Nickinson from Android Central had to say:

YouTube, Google Play Music — all available through Chromecast and accessed through your phone. You can set up a queue of videos to play while still use your phone for other tasks. Browse, take phonecalls, check e-mail — whatever you need to do. Streaming is handled from the Chromecast — not from your phone. And Netflix? No problem.

As for those drawbacks, first, it's "cross-platform" as in "works with iOS and Android, and the [in this case Chrome] browser". Other desktop browsers, BlackBerry, and Windows Phone, so far, need not apply. That's increasingly the case with Google, which makes me kinda wish they'd find a new, more honest word for it like "select-platforms". Apple and AirPlay only work with iOS and OS X, of course, which is worse from a supported platform perspective, but you absolutely know that going in.

Second, whenever someone talks about device independence, it means they're selling service dependence. It's the same old yarn from Flash, where it can run everywhere, but you become locked into Adobe's ecosystem. Likewise, Chromecast looks like it'll support a wide range of devices, but you'll be locked into Google API for doing so. No such thing as a free-as-in-speech or free-as-in-beer lunch.

All that aside, the price is killer, and you use iOS or Chrome on OS X, and the services you care most about are YouTube, Netflix, and other Google and partner offerings, Chromecast might be a great option for you.

If you're Apple-only, AirPlay, especially with AirPlay mirroring, and an Apple TV look like they're still a far better option (especially considering Apple TV has built-in, native YouTube and Netflix channels.)

I'll be getting one, though. Anyone else?

Source: Google Play via Android Central

    



Saturday, July 20, 2013

Capacity for beer still main source of pride [feedly]

Scientists from the institute of studies have been hard at work again! 
 
 
Shared via feedly // published on The Daily Mash // visit site
Capacity for beer still main source of pride
MOST Britons consider drinking a lot of beer to be their greatest achievement.

Fuck Off As A Service [feedly]

Haha! Well played.
 
 
Shared via feedly // published on The Profound Programmer // visit site
Fuck Off As A Service
Fuck Off As A Service:

FOAAS (Fuck Off As A Service) provides a modern, RESTful, scalable solution to the common problem of telling people to fuck off.

Learn Ember With Us for Free [feedly]

Learn Ember for free, cannot argue with that.
 
 
Shared via feedly // published on Nettuts+ // visit site
Learn Ember With Us for Free

Hopefully, it's clear by now that Envato and Tuts+ are dedicated to education. In addition to the various Tuts+ sites like this one, we also offer Tuts+ Premium, which provides the best web development courses and ebooks available today for a small monthly cost. Members of Premium help to contribute back to Tuts+ and ensure that we can continue offering as much free content as possible.

Speaking of free: each month, we release one new entirely free course. This month, I'm proud to announce that you can learn Ember with us for free!

Let's Learn Ember
Bookmark Me!

Lessons

Introduction

The Object Model

Application Components

Demonstration

Conclusion


There Will Always Be More!

Be sure to bookmark freecourses.tutsplus.com (and subscribe to the newsletter) to stay updated on each new free course that we offer to the community!

If you'd like to learn more, of course a Tuts+ Premium membership is only $19 a month, and includes countless courses and downloadable eBooks on the topics that I guarantee you're most interested in learning: HTML5, jQuery, Ember, Laravel, PHP 5.5, Rails 4, architecture, design patterns, and so much more.


Friday, July 19, 2013

Use Aliases, Not Hostnames [feedly]

Hurrah! I do this. 
 
 
Shared via feedly // published on DevOps On Windows // visit site
Use Aliases, Not Hostnames

Use Aliases, not HostnamesI'm going to cut straight to the point: it is 2013, you should use aliases, not hostnames; aliases as in DNS CNAME records. This goes for everything and anything: your source control server, your issue tracker, your wiki/document management system, your central configuration service, etc. So what exactly am I talking about?

Let's say one day, one of your IT teams (development, operations, sysadmins, whoever) realizes they could really use a tool to do "foo bar". "Foo bar" may be source control, issue tracking, etc. The tool itself is not important, but what is important is if it's any kind of client-server application (a web site, some sort of service with a thick-client, etc.). So one or more enterprising individuals on the team with the need decides to set up this tool themselves on their local workstation, or a spare server or VM they have laying around.

The tool they chose to do "foo bar" is a hit. The folks who set it up enjoy using it and it makes their job easier. They start telling other folks on the team about it. More people start using the tool and eventually its use spreads to other teams.

This sort of grassroots movement to introduce new tools into an organization is awesome because a need is clearly met by this tool, otherwise so many people wouldn't be using it. However, there is almost always one tiny detail that is glossed over when setting up this tool, and more importantly – when telling other people about this tool: the "connection details" of the tool's "server". Rather than ask for (or create) a DNS alias that has an actual meaning to it and that is related to the tool/application for which the host is being used, folks tend to pass out the actual underlying hostname of the computer running the tool.

This may seem like a small nit to pick on, but think about it: what happens if you need to move that tool to another computer? Maybe you need to get a more powerful server for it now that so many people are using it. Maybe you need to come up with a way to make a disaster recovery plan actually work. Maybe the dude who's workstation you used to first setup the prototype instance of the tool just got fired.

Whatever the reason is, you will inevitably need to put that tool's server component on another computer, and then what? If you just passed out the direct hostname to everyone, now umpteen people need to update their bookmarks, their thick-clients' connection details, etc. Your lack of planning on this superficially small detail just led to wasted time for a lot of people having to update something on their end because of a hostname change on the backend. This sounds a lot like a violation of one of our best practices: DRY – Don't Repeat Yourself.

All of this wasted time could've been avoided if you simply took a few minutes during the initial setup of this tool to get a DNS alias created that had meaning for your application. Setting up a web based issue tracker? Use an alias named after the product itself. Setting up your source control system? Use that as an alias: "sourcecontrol". Just pick a name with meaning. Then, when – not if – you need to move that service to another machine you do the move, then update the DNS alias to point to the new underlying hostname and your users won't have to update any "connection details" on their side.

Just like how you use a variable or constant in a programming language to avoid repeating the same value over and over again in source code, you should use aliases, not hostnames to avoid repeating hostnames over and over again in client application configuration.

Use Aliases, Not Hostnames is a post from: DevOps On Windows - Be awesome at Windows DevOps or Windows Sysadmin

The post Use Aliases, Not Hostnames appeared first on DevOps On Windows.


snackable content: the pros and cons

snackable content: the pros and cons: "Snackable content is the latest buzzword to enter the ever-changing content marketing scene. But as with any fad or trend, it is important to consider exactly what the bandwagon is that everyone seems to jumping on, and of course, the pros and cons. "

'via Blog this'

Thursday, July 18, 2013

5 questions to ask yourself before starting a company blog

5 questions to ask yourself before starting a company blog: "One of the main reasons company blogs fail is because of a lack of commitment. Business blogging is hard, and in order to have a sustainable blog that is updated frequently, you will need to put in a significant amount of time per week. The most important question to ask yourself: are you prepared to put in the time and effort to make it work? "

'via Blog this'

Tuesday, July 16, 2013

Markdown Here Adds Markdown Support to Email and Web Forms [feedly]

I love markdown. anything markdown I'll use. added.
 
 
Shared via feedly // published on Lifehacker // visit site
Markdown Here Adds Markdown Support to Email and Web Forms

Markdown Here Adds Markdown Support to Email and Web Forms

Chrome/Firefox/Safari/Thunderbird/Postbox: Markdown is a great way to instantly render text as HTML without knowing a lick of coding, and if you want to use that in an email client like Gmail or Postbox, Markdown Here adds the functionality easily.

Read more...

    



Four desks for a minimalist work space [feedly]

I don't have much room at home. In fact make that no room at home so I've been on lookout for something like these products for a while. A tad on the expensive side but Free Stand especially looks perfect.
 
 
Shared via feedly // published on Unclutterer // visit site
Four desks for a minimalist work space

Whether you stand or sit while you work, chances are you may be using an office to get your stuff done. But, is it really necessary to have an office anymore? A lot of must-have equipment for just about any work environment now seems a bit obsolete because, well, there's an app that. For example, you can use a scanner to digitize important documents or you can use an app (like Evernote) to scan and store the items you need to keep.

Like me, you might still prefer having a flat surface to work from or a smaller surface to use for your laptop or tablet. If you plan to minimize your physical work area or to re-design your home office, you don't have to give your desk up and permanently keep your laptop on your lap while you work. Instead, look for a smaller desk that will still give you the function you need.

These four minimalist desks might be able to help you get stuff done and reclaim more space:

HIDEsk

Do you work in the kitchen? Living room? If you tend to move about your home and have no stationary workspace, the HIDEsk might appeal to you. It folds when not in use, which means it can be stored in a closet or under furniture. And, because it's portable, you can take it wherever work takes you. This desk doesn't have drawers, so the trade off to gaining more space means you'll need to bring along your favorite pen or needed office supplies wherever you go.

Image credit: IMM Cologne

HIDEsk is designed to hold your tablet and open slots to help you control your cables and wires. When the desk is no longer needed, you can fold it up and out of the way, transforming it into an easel or standing work area.

Image credit: Noroom

Free Stand

The Free Stand desk, designed by Stephan Copeland, folds flat for easy storage, has a carrying handle, and a surface that's big enough for your laptop.

The desk adjusts from 20 inches to 27 inches to suit the height of your seating.

Image credits: Coalesse

XTable

The XTable looks like a larger version of an ironing board and works in a similar way. It has an x base and a handcrank that you can use to reposition the height. This could work well if you share a workspace, no matter how tall you are. And, you can either sit or stand while you work. The XTable does come with one grommet and has an optional cabinet for storing supplies.

Image credits: Kibisi

Zevaka Table

This desk is designed specifically for students and has several features that will likely appeal to almost anyone. Like the other desks, the Zevaka Table takes up little space. But, unlike the others, it comes with a built-in mini-drawer, a bag hang, and a sleep space for tired students to take a nap on before they get back to work. There's also a storage slot for a drink.

The sleeping hammock is revealed when the hinged desk surface is lifted.

Image credits: Yaroslav Misonzhnikov

Let Unclutterer help you get your home or office organized. Subscribe to our helpful product shipments from Quarterly today.