Skip to content

Instantly share code, notes, and snippets.

@chunpu
Created July 14, 2016 06:17
Show Gist options
  • Save chunpu/e9a1ebf698ac6795a6b53a802adc18d0 to your computer and use it in GitHub Desktop.
Save chunpu/e9a1ebf698ac6795a6b53a802adc18d0 to your computer and use it in GitHub Desktop.
get mac version with year
// https://browser.primatelabs.com/mac-benchmarks
Object.keys($('#mac32').find('tr').map(function() {return $(this).find('.name a').text()}).toArray().map(function(x) {return (/\w+ \d{4}/.exec(x) || [])[0]}).filter(function(x) {return x}).reduce(function(prev, val, key) {prev[val] = 1; return prev}, {})).map(function(x) {return x.split(' ')}).sort(function(x, y) {return x[1] - y[1]}).map(function(arr) {return arr[1] + ' ' + arr[0]}).join('\n')
@chunpu
Copy link
Author

chunpu commented Jul 14, 2016

2006 Late
2007 Late
2007 Mid
2008 Late
2008 Early
2009 Mid
2009 Late
2009 Early
2010 Late
2010 Early
2010 Mid
2011 Early
2011 Late
2011 Mid
2012 Mid
2012 Late
2013 Mid
2013 Early
2013 Late
2014 Mid
2014 Late
2014 Early
2015 Early
2015 Mid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment