{"id":1348,"date":"2012-10-25T13:12:27","date_gmt":"2012-10-25T13:12:27","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=1348"},"modified":"2014-03-13T11:36:18","modified_gmt":"2014-03-13T11:36:18","slug":"get-15-student-discount-from-the-apple-store-online","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=1348","title":{"rendered":"Get 15% Student Discount from the Apple Store Online"},"content":{"rendered":"<p>Most HE institutions in the UK have a discount with Apple. \u00a0Apple have a URL of each one and to access the sotre you normally need to be on the Campus.<\/p>\n<p>However if you go directly to the store URL then you bypass Apples Campus checks.<\/p>\n<p>Here is come BASH code to scan the Apple Campus sites and report back on which URL is for Which\u00a0institution.<\/p>\n<div class=\"codecolorer-container bash default\" style=\"overflow:auto;white-space:nowrap;height:300px;\"><div class=\"bash codecolorer\"><span class=\"co0\">#!\/bin\/bash<\/span><br \/>\n<br \/>\n<span class=\"co0\"># Apple Discount scanner<\/span><br \/>\n<span class=\"co0\"># By Daniel Shane<\/span><br \/>\n<br \/>\n<span class=\"co0\"># This script does a simple scan of the Apple Discount URL<\/span><br \/>\n<span class=\"co0\"># They startat 600 and so far go up to around 866<\/span><br \/>\n<br \/>\n<span class=\"re2\">scanstart<\/span>=<span class=\"nu0\">600<\/span><br \/>\n<span class=\"re2\">scanend<\/span>=<span class=\"nu0\">900<\/span><br \/>\n<br \/>\n<span class=\"kw1\">while<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"re1\">$scanstart<\/span> <span class=\"re5\">-lt<\/span> <span class=\"re1\">$scanend<\/span> <span class=\"br0\">&#93;<\/span><br \/>\n<span class=\"kw1\">do<\/span><br \/>\ncurl http:<span class=\"sy0\">\/\/<\/span>store.apple.com<span class=\"sy0\">\/<\/span>uk_edu_5000<span class=\"re1\">$scanstart<\/span> <span class=\"re5\">-o<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>curl.txt <span class=\"sy0\">&amp;&gt;<\/span> <span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>null<br \/>\n<span class=\"re2\">discount<\/span>=<span class=\"sy0\">`<\/span><span class=\"kw2\">grep<\/span> <span class=\"re5\">-i<\/span> <span class=\"st0\">&quot;s.prop2 = &quot;<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>curl.txt <span class=\"sy0\">|<\/span> <span class=\"kw2\">sed<\/span> <span class=\"st_h\">'s\/&amp;amp;\/\\&amp;\/g'<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">cut<\/span> <span class=\"re5\">-d<\/span> : <span class=\"re5\">-f<\/span> <span class=\"nu0\">2<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">cut<\/span> <span class=\"re5\">-c<\/span> <span class=\"nu0\">2<\/span>- <span class=\"sy0\">|<\/span> <span class=\"kw2\">rev<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">cut<\/span> <span class=\"re5\">-c<\/span> <span class=\"nu0\">3<\/span>- <span class=\"sy0\">|<\/span> <span class=\"kw2\">rev<\/span><span class=\"sy0\">`<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$discount<\/span>&quot;<\/span> <span class=\"sy0\">!<\/span>= <span class=\"st0\">&quot;US Consumer&quot;<\/span> <span class=\"br0\">&#93;<\/span><br \/>\n<span class=\"kw1\">then<\/span><br \/>\n<span class=\"kw3\">echo<\/span> <span class=\"st0\">&quot;http:\/\/store.apple.com\/uk_edu_5000<span class=\"es2\">$scanstart<\/span>\/&quot;<\/span> is <span class=\"kw1\">for<\/span> <span class=\"st0\">&quot;<span class=\"es2\">$discount<\/span>&quot;<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">tee<\/span> <span class=\"re5\">-a<\/span> ~<span class=\"sy0\">\/<\/span>Desktop<span class=\"sy0\">\/<\/span>DiscountList.txt<br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"re2\">scanstart<\/span>=$<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#40;<\/span> <span class=\"re1\">$scanstart<\/span> + <span class=\"nu0\">1<\/span> <span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"kw1\">done<\/span><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Most HE institutions in the UK have a discount with Apple. \u00a0Apple have a URL of each one and to access the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1348","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1348"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1348\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}