Browse Source

Concat and minify script

Josh Habdas 4 years ago
parent
commit
ce6f57e35a
100 changed files with 381 additions and 15351 deletions
  1. 1
    0
      .ink-cache/octopress-asset-pipeline-applicatione4c63588dcff1b11789e41131973a352.js
  2. 19
    0
      .ink-cache/octopress-asset-pipeline-bootstrap-collapseb9f356269970dd95b1d82f4f45af0aa0.js
  3. 20
    0
      .ink-cache/octopress-asset-pipeline-bootstrap-tooltipf8171df5c1c4ed206e513a41000c205e.js
  4. 1
    0
      .ink-cache/octopress-asset-pipeline-custom_checkbox_and_radio84d9017c646e305a46f873364451c49b.js
  5. 1
    0
      .ink-cache/octopress-asset-pipeline-custom_radioc404309e78020e43c4b780e4e4899013.js
  6. 1
    0
      .ink-cache/octopress-asset-pipeline-githubf0bab9695cf2fa2a66ed0837006634fe.js
  7. 1
    0
      .ink-cache/octopress-asset-pipeline-html5shiv84cf2388b406fb1b022919bf8f067d02.js
  8. 1
    0
      .ink-cache/octopress-asset-pipeline-icon-font-ie7b808dc5daa98f9aad899b1d0170aa1f6.js
  9. 1
    0
      .ink-cache/octopress-asset-pipeline-jquery.dropkick-1.0.0484537bbc5bd7f926ee937cfc49fd1b7.js
  10. 2
    0
      .ink-cache/octopress-asset-pipeline-jquery.placeholder74c2311869b08b506d2914b5f076a772.js
  11. 16
    0
      .ink-cache/octopress-asset-pipeline-jquery.tagsinput63e9c05409045b5d6225683d4288b48a.js
  12. 6
    0
      .ink-cache/octopress-asset-pipeline-jquery6be1dd9bdbdcc4f027851094ac70f435.js
  13. 1
    0
      .ink-cache/octopress-asset-pipeline-jxhr62ff8ef8b52ad37a6ddc99687b402cc5.js
  14. 1
    0
      .ink-cache/octopress-asset-pipeline-lte-ie7-245d7b1debc44983d2bb7218ee6b449154.js
  15. 1
    0
      .ink-cache/octopress-asset-pipeline-modernizr-2.010a776103e50b8e7351029226ae2b3ab.js
  16. 6
    0
      .ink-cache/octopress-asset-pipeline-octopress1c2018cc1e67e3793bc3e33116366782.js
  17. 1
    0
      .ink-cache/octopress-asset-pipeline-pinboardb07953d97ca2152c343449242909f632.js
  18. 4
    0
      .ink-cache/octopress-asset-pipeline-swfobject-dynamica8ac9a03fe23eec7a465d9f7c2cfb0dc.js
  19. 2
    0
      .ink-cache/octopress-asset-pipeline-twitter3b802ca3387bf18b14e300e462c26438.js
  20. 152
    0
      Gemfile.lock.bak
  21. 137
    5
      Rakefile
  22. 0
    1109
      sass/_bootstrap-responsive.scss
  23. 0
    5961
      sass/_bootstrap.scss
  24. 0
    2669
      sass/_flat-ui.scss
  25. 0
    1271
      sass/_font-awesome.scss
  26. 0
    11
      sass/_octoflat-partials.scss
  27. 0
    4
      source/_includes/after_footer.html
  28. 1
    2
      source/_includes/asides/github.html
  29. 5
    1
      source/_includes/head.html
  30. 0
    89
      source/_posts/2008-12-15-itunes-fix-for-manually-moving-files.md
  31. 0
    50
      source/_posts/2008-12-30-password-protection-with-passkeeper.md
  32. 0
    69
      source/_posts/2009-03-29-building-a-better-lightbox.md
  33. 0
    85
      source/_posts/2009-07-22-analyzing-user-agent-strings.md
  34. 0
    156
      source/_posts/2009-10-18-google-302-redirect-hijack.md
  35. 0
    34
      source/_posts/2010-05-30-msie-4095-selector-limit.md
  36. 0
    73
      source/_posts/2010-08-21-running-android-on-htc-hd2-leo.md
  37. 0
    36
      source/_posts/2010-10-10-managing-passwords-on-android.md
  38. 0
    41
      source/_posts/2011-01-03-making-free-voip-calls-on-android-froyo.md
  39. 0
    57
      source/_posts/2011-01-17-direct-boot-gingerbread-on-the-hd2.md
  40. 0
    35
      source/_posts/2011-03-06-optimize-mobile-performance-with-jdrop.md
  41. 0
    61
      source/_posts/2011-04-17-get-sideways-with-html5-in-eclipse.md
  42. 0
    15
      source/_posts/2011-09-22-html5-cross-browser-polyfills.md
  43. 0
    24
      source/_posts/2011-09-26-switching-from-firebug-to-chrome-dev-tools.md
  44. 0
    21
      source/_posts/2011-11-13-mobile-emulators-simulators-the-ultimate-guide.md
  45. 0
    62
      source/_posts/2011-11-21-push-upstream-with-egit-and-eclipse-indigo.md
  46. 0
    54
      source/_posts/2011-12-05-running-ice-cream-sandwich-on-the-htc-hd2.md
  47. 0
    17
      source/_posts/2011-12-20-adwords-keyword-tool.md
  48. 0
    41
      source/_posts/2012-01-15-get-started-with-php-in-eclipse.md
  49. 0
    17
      source/_posts/2012-01-25-jsonview-google-chrome-extension.md
  50. 0
    135
      source/_posts/2012-01-29-drupal-7-for-wordpress-admins.md
  51. 0
    24
      source/_posts/2012-03-10-remote-project-in-eclipse.md
  52. 0
    37
      source/_posts/2012-04-14-on-touch-events-mobile-web-app-usability.md
  53. 0
    35
      source/_posts/2012-08-13-emulating-ie-with-virtualbox.md
  54. 0
    59
      source/_posts/2013-02-16-amp-up-coffeescript-coding-sublime-text.md
  55. 0
    35
      source/_posts/2013-02-26-holy-grail-rich-internet-applications.md
  56. 0
    52
      source/_posts/2013-03-09-movies-on-the-cheap-with-vudu-in-home-disc-to-digital.md
  57. 0
    17
      source/_posts/2013-03-19-using-promises-for-non-ajax-asynchronous-callbacks-in-javascript.md
  58. 0
    99
      source/_posts/2013-03-24-host-websites-cloud-10-minutes.md
  59. 0
    174
      source/_posts/2013-04-01-sftp-to-ubuntu-server-sublime-text.md
  60. 0
    14
      source/_posts/2013-04-04-backbone-js-extensions-plugins-resources.md
  61. 0
    322
      source/_posts/2013-04-27-developing-modern-web-applications-on-windows-vagrant.md
  62. 0
    45
      source/_posts/2013-04-27-installing-using-rupaz.md
  63. 0
    24
      source/_posts/2013-04-30-holy-grail-full-stack-javascript-mvc-rendr.md
  64. 0
    57
      source/_posts/2013-07-07-a-back-end-for-backbone-js-apps-using-ruby-sinatra-and-mongodb.md
  65. 0
    61
      source/_posts/2013-07-23-tools-for-building-rich-web-apps.md
  66. 0
    45
      source/_posts/2013-09-27-moved-two-sites-to-octopress.md
  67. 0
    141
      source/_posts/2013-11-29-ftp-ghostify-sublime-text.md
  68. 0
    56
      source/_posts/2013-12-06-add-google-analytics-ghost-cloudflare.md
  69. 0
    142
      source/_posts/2014-10-26-coffeescript-for-tessel-yeoman-gulp.md
  70. 0
    81
      source/_posts/2015-02-15-host-images-on-s3-with-octopress.md
  71. 0
    71
      source/_posts/2015-04-02-tame-async-javascript-es6.md
  72. 0
    0
      source/fonts/.gitkeep
  73. 0
    112
      source/fonts/Flat-UI-Icons-16.dev.svg
  74. BIN
      source/fonts/Flat-UI-Icons-16.eot
  75. 0
    112
      source/fonts/Flat-UI-Icons-16.svg
  76. BIN
      source/fonts/Flat-UI-Icons-16.ttf
  77. BIN
      source/fonts/Flat-UI-Icons-16.woff
  78. 0
    111
      source/fonts/Flat-UI-Icons-24.dev.svg
  79. BIN
      source/fonts/Flat-UI-Icons-24.eot
  80. 0
    111
      source/fonts/Flat-UI-Icons-24.svg
  81. BIN
      source/fonts/Flat-UI-Icons-24.ttf
  82. BIN
      source/fonts/Flat-UI-Icons-24.woff
  83. BIN
      source/fonts/FontAwesome.otf
  84. BIN
      source/fonts/fontawesome-webfont.eot
  85. 0
    339
      source/fonts/fontawesome-webfont.svg
  86. BIN
      source/fonts/fontawesome-webfont.ttf
  87. BIN
      source/fonts/fontawesome-webfont.woff
  88. 0
    0
      source/javascripts/custom.js.map
  89. 0
    0
      source/javascripts/libs/serve/jXHR.js
  90. 0
    0
      source/javascripts/libs/serve/jquery.min.js
  91. 0
    0
      source/javascripts/libs/serve/swfobject-dynamic.js
  92. 0
    78
      source/javascripts/twitter.js
  93. 0
    51
      source/js/application.js
  94. 0
    167
      source/js/bootstrap-collapse.js
  95. 0
    353
      source/js/bootstrap-tooltip.js
  96. 0
    53
      source/js/custom_checkbox_and_radio.js
  97. 0
    28
      source/js/custom_radio.js
  98. 0
    32
      source/js/github.js
  99. 0
    8
      source/js/html5shiv.js
  100. 0
    0
      source/js/icon-font-ie7.js

+ 1
- 0
.ink-cache/octopress-asset-pipeline-applicatione4c63588dcff1b11789e41131973a352.js View File

@@ -0,0 +1 @@
1
+$(function(){$("select").dropkick()}),$(document).ready(function(){$(".todo li").click(function(){$(this).toggleClass("todo-done")}),$("[data-toggle=tooltip]").tooltip("show"),$("#tagsinput").tagsInput(),$("#slider").slider({min:1,max:5,value:2,orientation:"horizontal",range:"min"}),$("input, textarea").placeholder(),$(".pagination a").click(function(){$(this).parent().hasClass("previous")||$(this).parent().hasClass("next")||($(this).parent().siblings("li").removeClass("active"),$(this).parent().addClass("active"))}),$(".btn-group a").click(function(){$(this).siblings().removeClass("active"),$(this).addClass("active")}),$("a[href='#']").click(function(){return!1})});

+ 19
- 0
.ink-cache/octopress-asset-pipeline-bootstrap-collapseb9f356269970dd95b1d82f4f45af0aa0.js View File

@@ -0,0 +1,19 @@
1
+/* =============================================================
2
+ * bootstrap-collapse.js v2.3.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+!function(t){"use strict";var e=function(e,s){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,s),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){var t=this.$element.hasClass("width");return t?"width":"height"},show:function(){var e,s,n,i;if(!this.transitioning&&!this.$element.hasClass("in")){if(e=this.dimension(),s=t.camelCase(["scroll",e].join("-")),n=this.$parent&&this.$parent.find("> .accordion-group > .in"),n&&n.length){if(i=n.data("collapse"),i&&i.transitioning)return;n.collapse("hide"),i||n.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),t.support.transition&&this.$element[e](this.$element[0][s])}},hide:function(){var e;!this.transitioning&&this.$element.hasClass("in")&&(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,s,n){var i=this,a=function(){"show"==s.type&&i.reset(),i.transitioning=0,i.$element.trigger(n)};this.$element.trigger(s),s.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,a):a())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var s=t.fn.collapse;t.fn.collapse=function(s){return this.each(function(){var n=t(this),i=n.data("collapse"),a=t.extend({},t.fn.collapse.defaults,n.data(),"object"==typeof s&&s);i||n.data("collapse",i=new e(this,a)),"string"==typeof s&&i[s]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=s,this},t(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var s,n=t(this),i=n.attr("data-target")||e.preventDefault()||(s=n.attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,""),a=t(i).data("collapse")?"toggle":n.data();n[t(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),t(i).collapse(a)})}(window.jQuery);

+ 20
- 0
.ink-cache/octopress-asset-pipeline-bootstrap-tooltipf8171df5c1c4ed206e513a41000c205e.js
File diff suppressed because it is too large
View File


+ 1
- 0
.ink-cache/octopress-asset-pipeline-custom_checkbox_and_radio84d9017c646e305a46f873364451c49b.js View File

@@ -0,0 +1 @@
1
+function setupLabel(){var e=".checkbox",a=e+" input[type='checkbox']",c="checked",s="disabled",n=".radio",t=n+" input[type='radio']",d="checked",i="disabled";$(a).length&&($(e).each(function(){$(this).removeClass(c)}),$(a+":checked").each(function(){$(this).parent(e).addClass(c)}),$(a+":disabled").each(function(){$(this).parent(e).addClass(s)})),$(t).length&&($(n).each(function(){$(this).removeClass(d)}),$(t+":checked").each(function(){$(this).parent(n).addClass(d)}),$(t+":disabled").each(function(){$(this).parent(n).addClass(i)}))}$(document).ready(function(){$("html").addClass("has-js"),$(".checkbox, .radio").prepend("<span class='icon'></span><span class='icon-to-fade'></span>"),$(".checkbox, .radio").click(function(){setupLabel()}),setupLabel()});

+ 1
- 0
.ink-cache/octopress-asset-pipeline-custom_radioc404309e78020e43c4b780e4e4899013.js View File

@@ -0,0 +1 @@
1
+var toggleHandler=function(e){var e=e,o=$(e).find("input"),g=function(){o.eq(0).is(":checked")?$(e).removeClass("toggle-off"):$(e).addClass("toggle-off")};g(),o.eq(0).click(function(){$(e).toggleClass("toggle-off")}),o.eq(1).click(function(){$(e).toggleClass("toggle-off")})};$(document).ready(function(){$(".toggle").each(function(e,o){toggleHandler(o)})});

+ 1
- 0
.ink-cache/octopress-asset-pipeline-githubf0bab9695cf2fa2a66ed0837006634fe.js View File

@@ -0,0 +1 @@
1
+var github=function(){function t(t){return $("<div/>").text(t).html()}function r(r,a){var n=0,e="",o=$(r)[0];for(n=0;n<a.length;n++)e+='<li><a href="'+a[n].html_url+'">'+a[n].name+"</a><p>"+t(a[n].description||"")+"</p></li>";o.innerHTML=e}return{showRepos:function(t){$.ajax({url:"https://api.github.com/users/"+t.user+"/repos?sort=pushed&callback=?",dataType:"jsonp",error:function(){$(t.target+" li.loading").addClass("error").text("Error loading feed")},success:function(a){var n=[];if(a&&a.data){for(var e=0;e<a.data.length;e++)t.skip_forks&&a.data[e].fork||n.push(a.data[e]);t.count&&n.splice(t.count),r(t.target,n)}}})}}}();

+ 1
- 0
.ink-cache/octopress-asset-pipeline-html5shiv84cf2388b406fb1b022919bf8f067d02.js View File

@@ -0,0 +1 @@
1
+!function(e,t){function n(){var e=g.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t=f[e[h]];return t||(t={},d++,e[h]=d,f[d]=t),t}function a(e,n,a){return n||(n=t),l?n.createElement(e):(a||(a=r(n)),n=a.cache[e]?a.cache[e].cloneNode():u.test(e)?(a.cache[e]=a.createElem(e)).cloneNode():a.createElem(e),n.canHaveChildren&&!m.test(e)?a.frag.appendChild(n):n)}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return g.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+n().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(g,t.frag)}function o(e){e||(e=t);var n=r(e);if(g.shivCSS&&!i&&!n.hasCSS){var a,o=e;a=o.createElement("p"),o=o.getElementsByTagName("head")[0]||o.documentElement,a.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}</style>",a=o.insertBefore(a.lastChild,o.firstChild),n.hasCSS=!!a}return l||c(e,n),e}var i,l,s=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",d=0,f={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",i="hidden"in e;var n;if(!(n=1==e.childNodes.length)){t.createElement("a");var r=t.createDocumentFragment();n="undefined"==typeof r.cloneNode||"undefined"==typeof r.createDocumentFragment||"undefined"==typeof r.createElement}l=n}catch(a){l=i=!0}}();var g={elements:s.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==s.shivCSS,supportsUnknownElements:l,shivMethods:!1!==s.shivMethods,type:"default",shivDocument:o,createElement:a,createDocumentFragment:function(e,a){if(e||(e=t),l)return e.createDocumentFragment();for(var a=a||r(e),c=a.frag.cloneNode(),o=0,i=n(),s=i.length;s>o;o++)c.createElement(i[o]);return c}};e.html5=g,o(t)}(this,document);

+ 1
- 0
.ink-cache/octopress-asset-pipeline-icon-font-ie7b808dc5daa98f9aad899b1d0170aa1f6.js View File

@@ -0,0 +1 @@
1
+window.onload=function(){function e(e,i){var u=e.innerHTML;e.innerHTML="<span style=\"font-family: 'Flat-UI-Icons-16'\">"+i+"</span>"+u}var i,u,f,n,a={"fui-volume-16":"&#xe000;","fui-video-16":"&#xe001;","fui-time-16":"&#xe002;","fui-settings-16":"&#xe003;","fui-plus-16":"&#xe004;","fui-new-16":"&#xe005;","fui-menu-16":"&#xe006;","fui-man-16":"&#xe007;","fui-mail-16":"&#xe008;","fui-lock-16":"&#xe009;","fui-location-16":"&#xe00a;","fui-heart-16":"&#xe00b;","fui-eye-16":"&#xe00c;","fui-cross-16":"&#xe00d;","fui-cmd-16":"&#xe00e;","fui-checkround-16":"&#xe00f;","fui-checkmark-16":"&#xe010;","fui-camera-16":"&#xe011;","fui-calendar-16":"&#xe012;","fui-bubble-16":"&#xe013;"},t=document.getElementsByTagName("*");for(i=0;i<t.length;i+=1)n=t[i],u=n.getAttribute("data-icon"),u&&e(n,u),f=n.className,f=f.match(/fui-[^\s'"]+/),f&&a[f[0]]&&e(n,a[f[0]])};

+ 1
- 0
.ink-cache/octopress-asset-pipeline-jquery.dropkick-1.0.0484537bbc5bd7f926ee937cfc49fd1b7.js View File

@@ -0,0 +1 @@
1
+!function(t,e,n){function a(t,e){var n,a,o=t.keyCode,s=(e.data("dropkick"),e.find(".dk_options")),c=e.hasClass("dk_open"),k=e.find(".dk_option_current"),p=s.find("li").first(),f=s.find("li").last();switch(o){case u.enter:c?(i(k.find("a"),e),l(e)):r(e),t.preventDefault();break;case u.up:a=k.prev("li"),c?a.length?d(a,e):d(f,e):r(e),t.preventDefault();break;case u.down:c?(n=k.next("li").first(),n.length?d(n,e):d(p,e)):r(e),t.preventDefault()}}function i(t,e,n){var a,i,d;a=t.attr("data-dk-dropdown-value"),i=t.text(),d=e.data("dropkick"),$select=d.$select,$select.val(a),e.find(".dk_label").text(i),n=n||!1,d.settings.change&&!n&&d.settings.change.call($select,a,i)}function d(t,e){e.find(".dk_option_current").removeClass("dk_option_current"),t.addClass("dk_option_current"),o(e,t)}function o(t,e){var n=e.prevAll("li").outerHeight()*e.prevAll("li").length;t.find(".dk_options_inner").animate({scrollTop:n+"px"},0)}function l(t){t.removeClass("dk_open")}function r(t){t.data("dropkick");t.find(".dk_options").css({top:t.find(".dk_toggle").outerHeight()-1}),t.toggleClass("dk_open")}function s(e,n){var a,i=e,d=[];if(i=i.replace("{{ id }}",n.id),i=i.replace("{{ label }}",n.label),i=i.replace("{{ tabindex }}",n.tabindex),i=i.replace("{{ classname }}",n.classname),n.options&&n.options.length)for(var o=0,l=n.options.length;l>o;o++){var r=t(n.options[o]),s="dk_option_current",k=_;k=k.replace("{{ value }}",r.val()),k=k.replace("{{ current }}",c(r.val())===n.value?s:""),k=k.replace("{{ text }}",r.text()),d[d.length]=k}return a=t(i),a.find(".dk_options_inner").html(d.join("")),a}function c(e){return t.trim(e).length>0?e:!1}n.documentElement.className=n.documentElement.className+" dk_fouc";var k={},p=[],u={left:37,up:38,right:39,down:40,enter:13},f=['<div class="dk_container {{ classname }}" id="dk_container_{{ id }}" tabindex="{{ tabindex }}">','<a class="dk_toggle">','<span class="dk_label">{{ label }}</span>','<span class="select-icon"></span>',"</a>",'<div class="dk_options">','<ul class="dk_options_inner">',"</ul>","</div>","</div>"].join(""),_='<li class="{{ current }}"><a data-dk-dropdown-value="{{ value }}">{{ text }}</a></li>',h={startSpeed:100,theme:!1,change:!1};k.init=function(e){return e=t.extend({},h,e),this.each(function(){var n,a=t(this),i=a.find(":selected").first(),d=a.find("option"),o=a.data("dropkick")||{},l=a.attr("id")||a.attr("name"),r=(e.width||a.outerWidth(),a.attr("tabindex")?a.attr("tabindex"):""),k=a.attr("class")?a.attr("class"):"",u=!1;return o.id?a:(o.settings=e,o.tabindex=r,o.classname=k,o.id=l,o.$original=i,o.$select=a,o.value=c(a.val())||c(i.attr("value")),o.label=i.text(),o.options=d,u=s(f,o),u.find(".dk_toggle").css({}),a.before(u),u=t("#dk_container_"+l).addClass("dk_shown"),n=e.theme?e.theme:"default",u.addClass("dk_theme_"+n),o.theme=n,o.$dk=u,a.data("dropkick",o),u.data("dropkick",o),p[p.length]=a,u.bind("focus.dropkick",function(){u.addClass("dk_focus")}).bind("blur.dropkick",function(){u.removeClass("dk_open dk_focus")}),void setTimeout(function(){a.hide()},0))})},k.theme=function(e){var n=t(this),a=n.data("dropkick"),i=a.$dk,d="dk_theme_"+a.theme;i.removeClass(d).addClass("dk_theme_"+e),a.theme=e},k.reset=function(){for(var t=0,e=p.length;e>t;t++){var n=p[t].data("dropkick"),a=n.$dk,o=a.find("li").first();a.find(".dk_label").text(n.label),a.find(".dk_options_inner").animate({scrollTop:0},0),d(o,a),i(o,a,!0)}},t.fn.dropkick=function(t){return k[t]?k[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void 0:k.init.apply(this,arguments)},t(function(){t(n).on("click",".dk_toggle",function(n){var a=t(this).parents(".dk_container").first();return r(a),"ontouchstart"in e&&(a.addClass("dk_touch"),a.find(".dk_options_inner").addClass("scrollable vertical")),n.preventDefault(),!1}),t(n).on("click",".dk_options a",function(e){{var n=t(this),a=n.parents(".dk_container").first();a.data("dropkick")}return l(a),i(n,a),d(n.parent(),a),e.preventDefault(),!1}),t(n).bind("keydown.dk_nav",function(e){var n=t(".dk_container.dk_open"),i=t(".dk_container.dk_focus"),d=null;n.length?d=n:i.length&&!n.length&&(d=i),d&&a(e,d)})})}(jQuery,window,document);

+ 2
- 0
.ink-cache/octopress-asset-pipeline-jquery.placeholder74c2311869b08b506d2914b5f076a772.js View File

@@ -0,0 +1,2 @@
1
+/*! http://mths.be/placeholder v2.0.7 by @mathias */
2
+!function(e,a,t){function l(e){var a={},l=/^jQuery\d+$/;return t.each(e.attributes,function(e,t){t.specified&&!l.test(t.name)&&(a[t.name]=t.value)}),a}function r(e,l){var r=this,o=t(r);if(r.value==o.attr("placeholder")&&o.hasClass("placeholder"))if(o.data("placeholder-password")){if(o=o.hide().next().show().attr("id",o.removeAttr("id").data("placeholder-id")),e===!0)return o[0].value=l;o.focus()}else r.value="",o.removeClass("placeholder"),r==a.activeElement&&r.select()}function o(){var e,a=this,o=t(a),d=this.id;if(""==a.value){if("password"==a.type){if(!o.data("placeholder-textinput")){try{e=o.clone().attr({type:"text"})}catch(c){e=t("<input>").attr(t.extend(l(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":d}).bind("focus.placeholder",r),o.data({"placeholder-textinput":e,"placeholder-id":d}).before(e)}o=o.removeAttr("id").hide().prev().attr("id",d).show()}o.addClass("placeholder"),o[0].value=o.attr("placeholder")}else o.removeClass("placeholder")}var d,c,n="placeholder"in a.createElement("input"),i="placeholder"in a.createElement("textarea"),h=t.fn,u=t.valHooks;n&&i?(c=h.placeholder=function(){return this},c.input=c.textarea=!0):(c=h.placeholder=function(){var e=this;return e.filter((n?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":r,"blur.placeholder":o}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e},c.input=n,c.textarea=i,d={get:function(e){var a=t(e);return a.data("placeholder-enabled")&&a.hasClass("placeholder")?"":e.value},set:function(e,l){var d=t(e);return d.data("placeholder-enabled")?(""==l?(e.value=l,e!=a.activeElement&&o.call(e)):d.hasClass("placeholder")?r.call(e,!0,l)||(e.value=l):e.value=l,d):e.value=l}},n||(u.input=d),i||(u.textarea=d),t(function(){t(a).delegate("form","submit.placeholder",function(){var e=t(".placeholder",this).each(r);setTimeout(function(){e.each(o)},10)})}),t(e).bind("beforeunload.placeholder",function(){t(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery);

+ 16
- 0
.ink-cache/octopress-asset-pipeline-jquery.tagsinput63e9c05409045b5d6225683d4288b48a.js
File diff suppressed because it is too large
View File


+ 6
- 0
.ink-cache/octopress-asset-pipeline-jquery6be1dd9bdbdcc4f027851094ac70f435.js
File diff suppressed because it is too large
View File


+ 1
- 0
.ink-cache/octopress-asset-pipeline-jxhr62ff8ef8b52ad37a6ddc99687b402cc5.js View File

@@ -0,0 +1 @@
1
+!function(t){var e=t.setTimeout,n=t.document,a=0;t.jXHR=function(){function r(){try{s.parentNode.removeChild(s)}catch(t){}}function c(){d=!1,u="",r(),s=null,i(0)}function o(t){try{f.onerror.call(f,t,u)}catch(e){throw new Error(t)}}function l(){this.readyState&&"complete"!==this.readyState&&"loaded"!==this.readyState||d||(this.onload=this.onreadystatechange=null,d=!0,4!==f.readyState&&o("Script failed to load ["+u+"]."),r())}function i(t,e){e=e||[],f.readyState=t,"function"==typeof f.onreadystatechange&&f.onreadystatechange.apply(f,e)}var u,d,s,f=null;return f={onerror:null,onreadystatechange:null,readyState:0,open:function(e,n){c(),internal_callback="cb"+a++,function(e){t.jXHR[e]=function(){try{i.call(f,4,arguments)}catch(n){f.readyState=-1,o("Script failed to run ["+u+"].")}t.jXHR[e]=null}}(internal_callback),u=n.replace(/=\?/,"=jXHR."+internal_callback),i(1)},send:function(){e(function(){s=n.createElement("script"),s.setAttribute("type","text/javascript"),s.onload=s.onreadystatechange=function(){l.call(s)},s.setAttribute("src",u),n.getElementsByTagName("head")[0].appendChild(s)},0),i(2)},setRequestHeader:function(){},getResponseHeader:function(){return""},getAllResponseHeaders:function(){return[]}},c(),f}}(window);

+ 1
- 0
.ink-cache/octopress-asset-pipeline-lte-ie7-245d7b1debc44983d2bb7218ee6b449154.js View File

@@ -0,0 +1 @@
1
+window.onload=function(){function e(e,i){var u=e.innerHTML;e.innerHTML="<span style=\"font-family: 'Flat-UI-Icons-24'\">"+i+"</span>"+u}var i,u,f,n,a={"fui-video-24":"&#xe000;","fui-time-24":"&#xe001;","fui-settings-24":"&#xe002;","fui-plus-24":"&#xe003;","fui-new-24":"&#xe005;","fui-menu-24":"&#xe006;","fui-man-24":"&#xe007;","fui-mail-24":"&#xe008;","fui-lock-24":"&#xe009;","fui-location-24":"&#xe00a;","fui-heart-24":"&#xe00b;","fui-eye-24":"&#xe00c;","fui-cross-24":"&#xe00d;","fui-cmd-24":"&#xe00e;","fui-checkround-24":"&#xe00f;","fui-checkmark-24":"&#xe010;","fui-calendar-24":"&#xe011;","fui-bubble-24":"&#xe012;","fui-volume-24":"&#xe013;","fui-camera-24":"&#xe004;"},t=document.getElementsByTagName("*");for(i=0;i<t.length;i+=1)n=t[i],u=n.getAttribute("data-icon"),u&&e(n,u),f=n.className,f=f.match(/fui-[^\s'"]+/),f&&a[f[0]]&&e(n,a[f[0]])};

+ 1
- 0
.ink-cache/octopress-asset-pipeline-modernizr-2.010a776103e50b8e7351029226ae2b3ab.js
File diff suppressed because it is too large
View File


+ 6
- 0
.ink-cache/octopress-asset-pipeline-octopress1c2018cc1e67e3793bc3e33116366782.js View File

@@ -0,0 +1,6 @@
1
+function getNav(){var e=$("ul.main-navigation, ul[role=main-navigation]").before('<fieldset class="mobile-nav">'),t=$("fieldset.mobile-nav").append("<select>");t.find("select").append('<option value="">Navigate&hellip;</option>');var a=function(){t.find("select").append('<option value="'+this.href+'">&raquo; '+$(this).text()+"</option>")};e.find("a").each(a),$("ul.subscription a").each(a),t.find("select").bind("change",function(e){e.target.value&&(window.location.href=e.target.value)})}function addSidebarToggler(){$("body").hasClass("sidebar-footer")||($("#content").append('<span class="toggle-sidebar"></span>'),$(".toggle-sidebar").bind("click",function(e){e.preventDefault(),$("body").hasClass("collapse-sidebar")?$("body").removeClass("collapse-sidebar"):$("body").addClass("collapse-sidebar")}));var e=$("aside.sidebar > section");e.length>1&&e.each(function(t,a){e.length>=3&&t%3===0&&$(a).addClass("first");var r=(t+1)%2?"odd":"even";$(a).addClass(r)}),e.length>=3&&$("aside.sidebar").addClass("thirds")}function testFeatures(){var e=["maskImage"];$(e).map(function(e,t){$("html").addClass(Modernizr.testAllProps(t)?t:"no-"+t)}),$("html").addClass("placeholder"in document.createElement("input")?"placeholder":"no-placeholder")}function addCodeLineNumbers(){"Microsoft Internet Explorer"!==navigator.appName&&$("div.gist-highlight").each(function(e){for(var t='<table><tbody><tr><td class="gutter">',a='<pre class="line-numbers">',r='</pre></td><td class="code">',n="</td></tr></tbody></table>",i=$(".line",e).length,s=1;i>=s;s++)a+='<span class="line-number">'+s+"</span>\n";var o=t+a+r+"<pre>"+$("pre",e).html()+"</pre>"+n;$(e).html(o)})}function flashVideoFallback(){var e="/assets/jwplayer/player.swf",t="/assets/jwplayer/glow/glow.xml";$("video").each(function(a,r){r=$(r),(!Modernizr.video.h264&&swfobject.getFlashPlayerVersion()||-1!==window.location.hash.indexOf("flash-test"))&&(r.children("source[src$=mp4]").first().map(a,function(a){var n=$(a).attr("src"),i="video_"+Math.round(1+1e5*Math.random()),s=r.attr("width"),o=parseInt(r.attr("height"),10)+30;r.after('<div class="flash-video"><div><div id='+i+">"),swfobject.embedSWF(e,i,s,o+30,"9.0.0",{file:n,image:r.attr("poster"),skin:t},{movie:n,wmode:"opaque",allowfullscreen:"true"})}),r.remove())})}function wrapFlashVideos(){$("object").each(function(e,t){$(t).find("param[name=movie]").length&&$(t).wrap('<div class="flash-video">')}),$("iframe[src*=vimeo],iframe[src*=youtube]").wrap('<div class="flash-video">')}function renderDeliciousLinks(e){for(var t="<ul>",a=0,r=e.length;r>a;a++)t+='<li><a href="'+e[a].u+'" title="Tags: '+(""==e[a].t?"":e[a].t.join(", "))+'">'+e[a].d+"</a></li>";t+="</ul>",$("#delicious").html(t)}$("document").ready(function(){testFeatures(),wrapFlashVideos(),flashVideoFallback(),addCodeLineNumbers(),getNav(),addSidebarToggler()}),function(e){function t(){s.content="width=device-width,minimum-scale="+i[0]+",maximum-scale="+i[1],e.removeEventListener(r,t,!0)}var a="addEventListener",r="gesturestart",n="querySelectorAll",i=[1,1],s=n in e?e[n]("meta[name=viewport]"):[];(s=s[s.length-1])&&a in e&&(t(),i=[.25,1.6],e[a](r,t,!0))}(document);/*!	SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects
2
+  * Uncompressed source in javascripts/libs/swfobject-dynamic.js
3
+  * <http://code.google.com/p/swfobject/>
4
+	released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
5
+*/
6
+var swfobject=function(){function e(e,a,r){var o,c=t(r);if(d.wk&&d.wk<312)return o;if(c)if(typeof e.id==n&&(e.id=r),d.ie&&d.win){var p,f="";for(p in e)e[p]!=Object.prototype[p]&&("data"==p.toLowerCase()?a.movie=e[p]:"styleclass"==p.toLowerCase()?f+=' class="'+e[p]+'"':"classid"!=p.toLowerCase()&&(f+=" "+p+'="'+e[p]+'"'));p="";for(var u in a)a[u]!=Object.prototype[u]&&(p+='<param name="'+u+'" value="'+a[u]+'" />');c.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+f+">"+p+"</object>",o=t(e.id)}else{u=l.createElement(i),u.setAttribute("type",s);for(var v in e)e[v]!=Object.prototype[v]&&("styleclass"==v.toLowerCase()?u.setAttribute("class",e[v]):"classid"!=v.toLowerCase()&&u.setAttribute(v,e[v]));for(f in a)a[f]!=Object.prototype[f]&&"movie"!=f.toLowerCase()&&(e=u,p=f,v=a[f],r=l.createElement("param"),r.setAttribute("name",p),r.setAttribute("value",v),e.appendChild(r));c.parentNode.replaceChild(u,c),o=u}return o}function t(e){var t=null;try{t=l.getElementById(e)}catch(a){}return t}function a(e){var t=d.pv,e=e.split(".");return e[0]=parseInt(e[0],10),e[1]=parseInt(e[1],10)||0,e[2]=parseInt(e[2],10)||0,t[0]>e[0]||t[0]==e[0]&&t[1]>e[1]||t[0]==e[0]&&t[1]==e[1]&&t[2]>=e[2]?!0:!1}function r(e){return null!=/[\\\"<>\.;]/.exec(e)&&typeof encodeURIComponent!=n?encodeURIComponent(e):e}var n="undefined",i="object",s="application/x-shockwave-flash",o=window,l=document,c=navigator,d=function(){var e=typeof l.getElementById!=n&&typeof l.getElementsByTagName!=n&&typeof l.createElement!=n,t=c.userAgent.toLowerCase(),a=c.platform.toLowerCase(),r=/win/.test(a?a:t),a=/mac/.test(a?a:t),t=/webkit/.test(t)?parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,d=!1,p=[0,0,0],f=null;if(typeof c.plugins!=n&&typeof c.plugins["Shockwave Flash"]==i)!(f=c.plugins["Shockwave Flash"].description)||typeof c.mimeTypes!=n&&c.mimeTypes[s]&&!c.mimeTypes[s].enabledPlugin||(d=!1,f=f.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),p[0]=parseInt(f.replace(/^(.*)\..*$/,"$1"),10),p[1]=parseInt(f.replace(/^.*\.(.*)\s.*$/,"$1"),10),p[2]=/[a-zA-Z]/.test(f)?parseInt(f.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof o.ActiveXObject!=n)try{var u=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");u&&(f=u.GetVariable("$version"))&&(d=!0,f=f.split(" ")[1].split(","),p=[parseInt(f[0],10),parseInt(f[1],10),parseInt(f[2],10)])}catch(v){}return{w3:e,pv:p,wk:t,ie:d,win:r,mac:a}}();return{embedSWF:function(t,r,s,o,l,c,p,f,u){var v={success:!1,id:r};if(d.w3&&!(d.wk&&d.wk<312)&&t&&r&&s&&o&&l){s+="",o+="";var h={};if(f&&typeof f===i)for(var m in f)h[m]=f[m];if(h.data=t,h.width=s,h.height=o,t={},p&&typeof p===i)for(var b in p)t[b]=p[b];if(c&&typeof c===i)for(var g in c)typeof t.flashvars!=n?t.flashvars+="&"+g+"="+c[g]:t.flashvars=g+"="+c[g];a(l)&&(r=e(h,t,r),v.success=!0,v.ref=r)}u&&u(v)},ua:d,getFlashPlayerVersion:function(){return{major:d.pv[0],minor:d.pv[1],release:d.pv[2]}},hasFlashPlayerVersion:a,createSWF:function(t,a,r){return d.w3?e(t,a,r):void 0},getQueryParamValue:function(e){var t=l.location.search||l.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return r(t);for(var t=t.split("&"),a=0;a<t.length;a++)if(t[a].substring(0,t[a].indexOf("="))==e)return r(t[a].substring(t[a].indexOf("=")+1))}return""}}}();

+ 1
- 0
.ink-cache/octopress-asset-pipeline-pinboardb07953d97ca2152c343449242909f632.js View File

@@ -0,0 +1 @@
1
+function pinboardNS_fetch_script(t){!function(){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=t,document.getElementsByTagName("head")[0].appendChild(n)}()}function pinboardNS_show_bmarks(t){var n=new Pinboard_Linkroll;n.set_items(t),n.show_bmarks()}function Pinboard_Linkroll(){this.set_items=function(t){this.items=t},this.show_bmarks=function(){for(var t=[],n=0;n<this.items.length;n++){var i=this.items[n],o=this.format_item(i);t.push(o)}document.getElementById(linkroll).innerHTML=t.join("\n")},this.cook=function(t){return t.replace("<","&lt;").replace(">","&gt>")},this.format_item=function(t){var n='<li class="pin-item">';if(t.d){if(n+='<p><a class="pin-title" href="'+this.cook(t.u)+'">'+this.cook(t.d)+"</a>",t.n&&(n+='<span class="pin-description">'+this.cook(t.n)+"</span>\n"),t.t.length>0)for(var i=0;i<t.t.length;i++){var o=t.t[i];n+=' <a class="pin-tag" href="https://pinboard.in/u:'+this.cook(t.a)+"/t:"+this.cook(o)+'">'+this.cook(o).replace(/^\s+|\s+$/g,"")+"</a> "}return n+="</p></li>\n"}}}Pinboard_Linkroll.prototype=new Pinboard_Linkroll,pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks&count="+pinboard_count);

+ 4
- 0
.ink-cache/octopress-asset-pipeline-swfobject-dynamica8ac9a03fe23eec7a465d9f7c2cfb0dc.js View File

@@ -0,0 +1,4 @@
1
+/*!	SWFObject v2.2 <http://code.google.com/p/swfobject/>
2
+	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
3
+*/
4
+var swfobject=function(){function e(e,n,s){var l,c=r(s);if(w.wk&&w.wk<312)return l;if(c)if(typeof e.id==i&&(e.id=s),w.ie&&w.win){var f="";for(var u in e)e[u]!=Object.prototype[u]&&("data"==u.toLowerCase()?n.movie=e[u]:"styleclass"==u.toLowerCase()?f+=' class="'+e[u]+'"':"classid"!=u.toLowerCase()&&(f+=" "+u+'="'+e[u]+'"'));var v="";for(var d in n)n[d]!=Object.prototype[d]&&(v+='<param name="'+d+'" value="'+n[d]+'" />');c.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+f+">"+v+"</object>",y[y.length]=e.id,l=r(e.id)}else{var m=a(o);m.setAttribute("type",p);for(var h in e)e[h]!=Object.prototype[h]&&("styleclass"==h.toLowerCase()?m.setAttribute("class",e[h]):"classid"!=h.toLowerCase()&&m.setAttribute(h,e[h]));for(var b in n)n[b]!=Object.prototype[b]&&"movie"!=b.toLowerCase()&&t(m,b,n[b]);c.parentNode.replaceChild(m,c),l=m}return l}function t(e,t,r){var n=a("param");n.setAttribute("name",t),n.setAttribute("value",r),e.appendChild(n)}function r(e){var t=null;try{t=u.getElementById(e)}catch(r){}return t}function a(e){return u.createElement(e)}function n(e){var t=w.pv,r=e.split(".");return r[0]=parseInt(r[0],10),r[1]=parseInt(r[1],10)||0,r[2]=parseInt(r[2],10)||0,t[0]>r[0]||t[0]==r[0]&&t[1]>r[1]||t[0]==r[0]&&t[1]==r[1]&&t[2]>=r[2]?!0:!1}function s(e){var t=/[\\\"<>\.;]/,r=null!=t.exec(e);return r&&typeof encodeURIComponent!=i?encodeURIComponent(e):e}var i="undefined",o="object",l="Shockwave Flash",c="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",f=window,u=document,v=navigator,d=!1,y=[],w=function(){var e=typeof u.getElementById!=i&&typeof u.getElementsByTagName!=i&&typeof u.createElement!=i,t=v.userAgent.toLowerCase(),r=v.platform.toLowerCase(),a=/win/.test(r?r:t),n=/mac/.test(r?r:t),s=/webkit/.test(t)?parseFloat(t.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,y=!1,w=[0,0,0],m=null;if(typeof v.plugins!=i&&typeof v.plugins[l]==o)m=v.plugins[l].description,!m||typeof v.mimeTypes!=i&&v.mimeTypes[p]&&!v.mimeTypes[p].enabledPlugin||(d=!0,y=!1,m=m.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),w[0]=parseInt(m.replace(/^(.*)\..*$/,"$1"),10),w[1]=parseInt(m.replace(/^.*\.(.*)\s.*$/,"$1"),10),w[2]=/[a-zA-Z]/.test(m)?parseInt(m.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof f.ActiveXObject!=i)try{var h=new ActiveXObject(c);h&&(m=h.GetVariable("$version"),m&&(y=!0,m=m.split(" ")[1].split(","),w=[parseInt(m[0],10),parseInt(m[1],10),parseInt(m[2],10)]))}catch(b){}return{w3:e,pv:w,wk:s,ie:y,win:a,mac:n}}();return{embedSWF:function(t,r,a,s,l,c,p,f,u){var v={success:!1,id:r};if(w.w3&&!(w.wk&&w.wk<312)&&t&&r&&a&&s&&l){a+="",s+="";var d={};if(f&&typeof f===o)for(var y in f)d[y]=f[y];d.data=t,d.width=a,d.height=s;var m={};if(p&&typeof p===o)for(var h in p)m[h]=p[h];if(c&&typeof c===o)for(var b in c)typeof m.flashvars!=i?m.flashvars+="&"+b+"="+c[b]:m.flashvars=b+"="+c[b];if(n(l)){var g=e(d,m,r);v.success=!0,v.ref=g}u&&u(v)}else u&&u(v)},ua:w,getFlashPlayerVersion:function(){return{major:w.pv[0],minor:w.pv[1],release:w.pv[2]}},hasFlashPlayerVersion:n,createSWF:function(t,r,a){return w.w3?e(t,r,a):void 0},getQueryParamValue:function(e){var t=u.location.search||u.location.hash;if(t){if(/\?/.test(t)&&(t=t.split("?")[1]),null==e)return s(t);for(var r=t.split("&"),a=0;a<r.length;a++)if(r[a].substring(0,r[a].indexOf("="))==e)return s(r[a].substring(r[a].indexOf("=")+1))}return""}}}();

+ 2
- 0
.ink-cache/octopress-asset-pipeline-twitter3b802ca3387bf18b14e300e462c26438.js View File

@@ -0,0 +1,2 @@
1
+/* Sky Slavin, Ludopoli. MIT license.  * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license.  */
2
+function prettyDate(e){if("Microsoft Internet Explorer"===navigator.appName)return"<span>&infin;</span>";var t={just_now:" now",minute_ago:"1m",minutes_ago:"m",hour_ago:"1h",hours_ago:"h",yesterday:"1d",days_ago:"d",last_week:"1w",weeks_ago:"w"},a=new Date,r=a.getTime(),n=r+6e4,s=new Date(e),i=(n-s.getTime())/1e3,o=Math.floor(i/86400);return isNaN(o)||0>o?"<span>&infin;</span>":0===o&&(60>i&&t.just_now||120>i&&t.minute_ago||3600>i&&Math.floor(i/60)+t.minutes_ago||7200>i&&t.hour_ago||86400>i&&Math.floor(i/3600)+t.hours_ago)||1===o&&t.yesterday||7>o&&o+t.days_ago||7===o&&t.last_week||o>7&&Math.ceil(o/7)+t.weeks_ago}function linkifyTweet(e,t){e=e.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi,'<a href="$1$2">$2</a>').replace(/(^|\W)@(\w+)/g,'$1<a href="https://twitter.com/$2">@$2</a>').replace(/(^|\W)#(\w+)/g,'$1<a href="https://search.twitter.com/search?q=%23$2">#$2</a>');for(var a in t)if(null!=t[a].expanded_url){var r=new RegExp(t[a].url,"g");e=e.replace(r,t[a].expanded_url);var r=new RegExp(">"+t[a].url.replace(/https?:\/\//,""),"g");e=e.replace(r,">"+t[a].display_url)}return e}function showTwitterFeed(e,t){var a=document.getElementById("tweets"),r="";for(var n in e)r+='<li><p><a href="https://twitter.com/'+t+"/status/"+e[n].id_str+'">'+prettyDate(e[n].created_at)+"</a>"+linkifyTweet(e[n].text.replace(/\n/g,"<br>"),e[n].entities.urls)+"</p></li>";a.innerHTML=r}function getTwitterFeed(e,t,a){t=parseInt(t,10),$.ajax({url:"https://api.twitter.com/1/statuses/user_timeline/"+e+".json?trim_user=true&count="+(t+20)+"&include_entities=1&exclude_replies="+(a?"0":"1")+"&callback=?",type:"jsonp",error:function(){$("#tweets li.loading").addClass("error").text("Twitter's busted")},success:function(a){showTwitterFeed(a.slice(0,t),e)}})}

+ 152
- 0
Gemfile.lock.bak View File

@@ -0,0 +1,152 @@
1
+GEM
2
+  remote: https://rubygems.org/
3
+  specs:
4
+    RedCloth (4.2.9)
5
+    aws-s3 (0.6.3)
6
+      builder
7
+      mime-types
8
+      xml-simple
9
+    blankslate (2.1.2.4)
10
+    builder (3.2.2)
11
+    celluloid (0.16.0)
12
+      timers (~> 4.0.0)
13
+    chunky_png (1.3.4)
14
+    classifier (1.3.4)
15
+      fast-stemmer (>= 1.0.0)
16
+    coffee-script (2.4.1)
17
+      coffee-script-source
18
+      execjs
19
+    coffee-script-source (1.9.1)
20
+    colorator (0.1)
21
+    compass (0.12.7)
22
+      chunky_png (~> 1.2)
23
+      fssm (>= 0.2.7)
24
+      sass (~> 3.2.19)
25
+    directory_watcher (1.4.1)
26
+    execjs (2.5.0)
27
+    fast-stemmer (1.0.2)
28
+    ffi (1.9.8)
29
+    fssm (0.2.10)
30
+    haml (3.1.8)
31
+    hitimes (1.2.2)
32
+    jekyll (2.0.3)
33
+      classifier (~> 1.3)
34
+      colorator (~> 0.1)
35
+      jekyll-coffeescript (~> 1.0)
36
+      jekyll-sass-converter (~> 1.0)
37
+      kramdown (~> 1.3)
38
+      liquid (~> 2.5.5)
39
+      listen (~> 2.5)
40
+      mercenary (~> 0.3.3)
41
+      pygments.rb (~> 0.5.0)
42
+      redcarpet (~> 3.1)
43
+      safe_yaml (~> 1.0)
44
+      toml (~> 0.1.0)
45
+    jekyll-coffeescript (1.0.1)
46
+      coffee-script (~> 2.2)
47
+    jekyll-sass-converter (1.3.0)
48
+      sass (~> 3.2)
49
+    json (1.8.2)
50
+    kramdown (1.6.0)
51
+    liquid (2.5.5)
52
+    listen (2.10.0)
53
+      celluloid (~> 0.16.0)
54
+      rb-fsevent (>= 0.9.3)
55
+      rb-inotify (>= 0.9)
56
+    mercenary (0.3.5)
57
+    mime-types (2.4.3)
58
+    octopress (3.0.0.rc.34)
59
+      jekyll (~> 2.0)
60
+      mercenary (~> 0.3.2)
61
+      octopress-deploy
62
+      octopress-escape-code (~> 2.0)
63
+      octopress-hooks (~> 2.0)
64
+      titlecase
65
+    octopress-asset-pipeline (2.0.3)
66
+      octopress-ink (~> 1.0.0.rc)
67
+    octopress-date-format (3.0.2)
68
+      jekyll (~> 2.0)
69
+      octopress-hooks (~> 2.0)
70
+    octopress-deploy (1.2.0)
71
+      colorator
72
+    octopress-escape-code (2.0.6)
73
+      octopress-hooks (~> 2.0)
74
+    octopress-filters (1.3.3)
75
+      jekyll
76
+      octopress-hooks (~> 2.0)
77
+      rubypants-unicode
78
+      titlecase
79
+    octopress-hooks (2.6.0)
80
+      jekyll (~> 2.0)
81
+    octopress-include-tag (1.0.3)
82
+      jekyll (~> 2.0)
83
+      octopress-tag-helpers (~> 1.0)
84
+    octopress-ink (1.0.0.rc.58)
85
+      jekyll (~> 2.0)
86
+      octopress (~> 3.0.0.rc)
87
+      octopress-date-format (~> 3.0)
88
+      octopress-filters (~> 1.1)
89
+      octopress-hooks (~> 2.2)
90
+      octopress-include-tag (~> 1.0)
91
+      uglifier (~> 2.5)
92
+    octopress-tag-helpers (1.0.4)
93
+      jekyll (~> 2.0)
94
+    parslet (1.5.0)
95
+      blankslate (~> 2.0)
96
+    posix-spawn (0.3.11)
97
+    pygments.rb (0.5.4)
98
+      posix-spawn (~> 0.3.6)
99
+      yajl-ruby (~> 1.1.0)
100
+    rack (1.6.0)
101
+    rack-protection (1.5.3)
102
+      rack
103
+    rake (10.2.2)
104
+    rb-fsevent (0.9.4)
105
+    rb-inotify (0.9.5)
106
+      ffi (>= 0.5.0)
107
+    rdiscount (2.0.7.3)
108
+    redcarpet (3.2.3)
109
+    rubypants (0.2.0)
110
+    rubypants-unicode (0.2.5)
111
+    safe_yaml (1.0.4)
112
+    sass (3.2.19)
113
+    sass-globbing (1.0.0)
114
+      sass (>= 3.1)
115
+    sinatra (1.4.6)
116
+      rack (~> 1.4)
117
+      rack-protection (~> 1.4)
118
+      tilt (>= 1.3, < 3)
119
+    stringex (1.4.0)
120
+    tilt (2.0.1)
121
+    timers (4.0.1)
122
+      hitimes
123
+    titlecase (0.1.1)
124
+    toml (0.1.2)
125
+      parslet (~> 1.5.0)
126
+    uglifier (2.7.1)
127
+      execjs (>= 0.3.0)
128
+      json (>= 1.8.0)
129
+    xml-simple (1.1.5)
130
+    yajl-ruby (1.1.0)
131
+
132
+PLATFORMS
133
+  ruby
134
+
135
+DEPENDENCIES
136
+  RedCloth (~> 4.2.9)
137
+  aws-s3 (= 0.6.3)
138
+  compass (~> 0.12.2)
139
+  directory_watcher (= 1.4.1)
140
+  haml (~> 3.1.7)
141
+  jekyll (~> 2.0)
142
+  liquid (~> 2.5.5)
143
+  octopress-asset-pipeline (~> 2.0.3)
144
+  pygments.rb (~> 0.5.0)
145
+  rake (~> 10.2.2)
146
+  rb-fsevent (~> 0.9)
147
+  rdiscount (~> 2.0.7)
148
+  rubypants (~> 0.2.0)
149
+  sass (~> 3.2)
150
+  sass-globbing (~> 1.0.0)
151
+  sinatra (~> 1.4.2)
152
+  stringex (~> 1.4.0)

+ 137
- 5
Rakefile View File

@@ -1,6 +1,7 @@
1 1
 require "rubygems"
2 2
 require "bundler/setup"
3 3
 require "stringex"
4
+require "fileutils"
4 5
 
5 6
 ## -- Rsync Deploy config -- ##
6 7
 # Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
@@ -23,9 +24,10 @@ deploy_dir      = "_deploy"   # deploy directory (for Github pages deployment)
23 24
 stash_dir       = "_stash"    # directory to stash posts for speedy generation
24 25
 posts_dir       = "_posts"    # directory for blog files
25 26
 themes_dir      = ".themes"   # directory for blog files
26
-new_post_ext    = "markdown"  # default new post file extension when using the new_post task
27
-new_page_ext    = "markdown"  # default new page file extension when using the new_page task
27
+new_post_ext    = "md"        # default new post file extension when using the new_post task
28
+new_page_ext    = "md"        # default new page file extension when using the new_page task
28 29
 server_port     = "4000"      # port for preview server eg. localhost:4000
30
+asset_version   = Time.new.strftime("%y%m%d%H%M") # For asset versioning
29 31
 
30 32
 
31 33
 desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
@@ -49,13 +51,133 @@ end
49 51
 #######################
50 52
 
51 53
 desc "Generate jekyll site"
52
-task :generate do
54
+task :generate => [:sass, :update_asset_versions, :jekyll, :combine, :minify]
55
+
56
+desc "Process CoffeeScript"
57
+task :coffee do
53 58
   raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
54
-  puts "## Generating Site with Jekyll"
59
+  puts "## Generating JS with CoffeeScriptRedux"
60
+  system "#{ENV['COFFEESCRIPT_HOME']}/bin/coffee --js -i #{source_dir}/javascripts/custom.coffee > #{source_dir}/javascripts/custom_cstest.js"
61
+  system "#{ENV['COFFEESCRIPT_HOME']}/bin/coffee --source-map -i #{source_dir}/javascripts/custom.coffee > #{source_dir}/javascripts/custom.js.map"
62
+end
63
+
64
+desc "Process Sass"
65
+task :sass do
66
+  raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
67
+  puts "## Generating CSS with Compass"
55 68
   system "compass compile --css-dir #{source_dir}/stylesheets"
69
+end
70
+
71
+desc "Run Jekyll"
72
+task :jekyll do
73
+  raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
74
+  puts "## Generating Site with Jekyll"
56 75
   system "jekyll"
57 76
 end
58 77
 
78
+desc "Combine CSS"
79
+task :combine_css do
80
+  puts "## Combining CSS"
81
+  styles_dir = "#{source_dir}/stylesheets"
82
+  system "cat #{styles_dir}/screen.css > #{styles_dir}/all.css"
83
+end
84
+
85
+desc "Combine JS"
86
+task :combine_js do
87
+  puts "## Combining JS"
88
+  scripts_dir = "#{source_dir}/javascripts"
89
+  system "cat #{scripts_dir}/libs/jquery.min.js #{scripts_dir}/modernizr-2.0.js #{scripts_dir}/octopress.js #{scripts_dir}/github.js > #{scripts_dir}/all.js"
90
+end
91
+
92
+desc "Combine CSS/JS"
93
+task :combine => [:combine_css, :combine_js]
94
+
95
+desc "Minify CSS"
96
+task :minify_css do
97
+  puts "## Minifying CSS"
98
+  input = "#{source_dir}/stylesheets/all.css"
99
+  output = "#{public_dir}/stylesheets/all.#{asset_version}.css"
100
+  system "cleancss -e -o #{output} #{input}"
101
+end
102
+
103
+desc "Minify JS"
104
+task :minify_js do
105
+  puts "## Minifying JS"
106
+  input = "#{source_dir}/javascripts/all.js"
107
+  output = "#{source_dir}/javascripts/all.#{asset_version}.js"
108
+  source_map_option = "--source-map #{source_dir}/javascripts/all.#{asset_version}.js.map"
109
+  source_map_root_option = "--source-map-root http://www.habdas.org"
110
+  system "uglifyjs #{input} -o #{output} #{source_map_option} #{source_map_root_option} -p 2 -m -c warnings=false"
111
+  Dir.glob("#{source_dir}/javascripts/all.*").each do |f|
112
+    FileUtils.mv(f, "#{public_dir}/javascripts")
113
+  end
114
+end
115
+
116
+desc "Minify CSS/JS"
117
+task :minify => [:minify_css, :minify_js]
118
+
119
+desc "Optimize Images"
120
+task :optimize_images do
121
+  puts "## Optimizing Images"
122
+  Dir.glob("#{source_dir}/images/*.{jp,pn}g").each do |f|
123
+    webp_file = "#{f[0..-4]}webp"
124
+    puts "Checking #{f} -> #{webp_file}"
125
+    if test(?f, f) and not File.exists?(webp_file)
126
+      ok_failed system("cwebp -q 100 #{f} -o #{webp_file}")
127
+    end
128
+  end
129
+end
130
+
131
+desc "GZip HTML"
132
+task :gzip_html do
133
+  puts "## GZipping HTML"
134
+  system 'find public/ -type f -name \*.html -exec gzip -9 {} \;'
135
+  # Batch rename .html.gz to .html
136
+  Dir['**/*.html.gz'].each do |f|
137
+    test(?f, f) and File.rename(f, f.gsub(/\.html\.gz/, '.html'))
138
+  end
139
+end
140
+
141
+desc "GZip CSS"
142
+task :gzip_css do
143
+  puts "## GZipping CSS"
144
+  styles_dir = "#{public_dir}/stylesheets"
145
+  system "gzip -9 #{styles_dir}/all.#{asset_version}.css"
146
+  system "mv #{styles_dir}/all.#{asset_version}.css{.gz,}"
147
+end
148
+
149
+desc "GZip JS"
150
+task :gzip_js do
151
+  puts "## GZipping JS"
152
+  scripts_dir = "#{public_dir}/javascripts"
153
+  system "gzip -9 #{scripts_dir}/all.#{asset_version}.js"
154
+  system "mv #{scripts_dir}/all.#{asset_version}.js{.gz,}"
155
+end
156
+
157
+desc "GZip All"
158
+task :gzip => [:gzip_html, :gzip_css, :gzip_js]
159
+
160
+desc "Update head include for static assets"
161
+task :update_asset_versions do
162
+  puts "## Updating asset versions"
163
+  # Replace instances of all.js and all.1234.js with all.{version}.js
164
+  content = ''
165
+  File.open("#{source_dir}/_includes/head.html", 'r') do |file|
166
+    content = file.read.gsub(/all(\.\d+)?\./, "all.#{asset_version}.")
167
+  end
168
+  File.open("#{source_dir}/_includes/head.html", 'w') do |file|
169
+    file.write(content)
170
+  end
171
+
172
+  content = ''
173
+  File.open("#{source_dir}/_includes/after_footer.html", 'r') do |file|
174
+    content = file.read.gsub(/all(\.\d+)?\./, "all.#{asset_version}.")
175
+  end
176
+  File.open("#{source_dir}/_includes/after_footer.html", 'w') do |file|
177
+    file.write(content)
178
+  end
179
+end
180
+
59 181
 desc "Watch the site and regenerate when it changes"
60 182
 task :watch do
61 183
   raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
@@ -77,6 +199,16 @@ task :preview do
77 199
   raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
78 200
   puts "Starting to watch source with Jekyll and Compass. Starting Rack on port #{server_port}"
79 201
   system "compass compile --css-dir #{source_dir}/stylesheets" unless File.exist?("#{source_dir}/stylesheets/screen.css")
202
+
203
+  # Replace instances of all.{version}.js with all.js
204
+  content = ''
205
+  File.open("#{source_dir}/_includes/head.html", 'r') do |file|
206
+    content = file.read.gsub(/all(\.\d+)?\./, "all.")
207
+  end
208
+  File.open("#{source_dir}/_includes/head.html", 'w') do |file|
209
+    file.write(content)
210
+  end
211
+
80 212
   jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll --auto")
81 213
   compassPid = Process.spawn("compass watch")
82 214
   rackupPid = Process.spawn("rackup --port #{server_port}")
@@ -248,7 +380,7 @@ desc "deploy public directory to github pages"
248 380
 multitask :push do
249 381
   puts "## Deploying branch to Github Pages "
250 382
   puts "## Pulling any updates from Github Pages "
251
-  cd "#{deploy_dir}" do 
383
+  cd "#{deploy_dir}" do
252 384
     system "git pull"
253 385
   end
254 386
   (Dir["#{deploy_dir}/*"]).each { |f| rm_rf(f) }

+ 0
- 1109
sass/_bootstrap-responsive.scss
File diff suppressed because it is too large
View File


+ 0
- 5961
sass/_bootstrap.scss
File diff suppressed because it is too large
View File


+ 0
- 2669
sass/_flat-ui.scss
File diff suppressed because it is too large
View File


+ 0
- 1271
sass/_font-awesome.scss
File diff suppressed because it is too large
View File


+ 0
- 11
sass/_octoflat-partials.scss View File

@@ -1,11 +0,0 @@
1
-@mixin selection($bg, $color: inherit, $text-shadow: none){
2
-  * {
3
-    &::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; }
4
-    &::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; }
5
-    &::selection { background: $bg; color: $color; text-shadow: $text-shadow; }
6
-  }
7
-}
8
-
9
-$link-color: lighten(#165b94, 3) !default;
10
-$mono: Menlo, Monaco, "Andale Mono", "lucida console", "Courier New", monospace !default;
11
-.mono { font-family: $mono; }

+ 0
- 4
source/_includes/after_footer.html View File

@@ -1,7 +1,3 @@
1
-<script src="{{ root_url }}/javascripts/modernizr-2.0.js"></script>
2
-<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
3
-<script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/lib/jquery.min.js"%3E%3C/script%3E'))</script>
4
-<script src="{{ root_url }}/javascripts/octopress.js" type="text/javascript"></script>
5 1
 {% include google_analytics.html %}
6 2
 {% include disqus.html %}
7 3
 {% include facebook_like.html %}

+ 1
- 2
source/_includes/asides/github.html View File

@@ -9,7 +9,7 @@
9 9
   {% endif %}
10 10
   <script type="text/javascript">
11 11
     document.onreadystatechange = (function() {
12
-      if (document.readyState === 'interactive') {
12
+      if (document.readyState === 'loaded') {
13 13
         if (!window.jXHR){
14 14
             var jxhr = document.createElement('script');
15 15
             jxhr.type = 'text/javascript';
@@ -28,6 +28,5 @@
28 28
       }
29 29
     });
30 30
   </script>
31
-  <script src="{{ root_url }}/javascripts/github.js" type="text/javascript"> </script>
32 31
 </section>
33 32
 {% endif %}

+ 5
- 1
source/_includes/head.html View File

@@ -19,7 +19,11 @@
19 19
   {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
20 20
   <link rel="canonical" href="{{ canonical }}">
21 21
   <link href="{{ root_url }}/favicon.png" rel="icon">
22
-  <link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
22
+  <link href="{{ root_url }}/stylesheets/all.1504081015.css" media="screen, projection" rel="stylesheet" type="text/css">
23 23
   <link href="{{ site.subscribe_rss }}" rel="alternate" title="{{site.title}}" type="application/atom+xml">
24
+
25
+  <!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> -->
26
+  <!-- <script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/libs/jquery.min.js"%3E%3C/script%3E'))</script> -->
27
+  <script async src="{{ root_url }}/javascripts/all.1504081015.js"></script>
24 28
   {% include custom/head.html %}
25 29
 </head>

+ 0
- 89
source/_posts/2008-12-15-itunes-fix-for-manually-moving-files.md View File

@@ -1,89 +0,0 @@
1
----
2
-title: Relocate Missing Files in iTunes
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /itunes-fix-for-manually-moving-files/
6
-comments: true
7
-categories:
8
-  - debugging
9
-tags:
10
-  - itunes
11
-  - backup
12
-  - restore
13
-  - debugging
14
----
15
-iTunes users opting not to allow the program to automatically keep their folders organized (the default setting) may be well aware that iTunes does not respond well after changing locations of or renaming files. In fact, any change in the file name or path renders the item inaccessible from within iTunes. To make matters worse, there's no easy way to have iTunes relocate files moved. iTunes prompts the user to relocate missing files but only one at a time with a dialog that says:
16
-
17
-> The `type` `name` could not be used because the original file could not be found. Would you like to locate it?
18
-
19
-Not so useful when a lot of files are moved at once. But if a directory containing hundreds of files needs to be moved, to a larger hard drive for example, locating files individually becomes too much work.
20
-
21
-<!--more-->
22
-
23
-Of course, there's always the "fresh start" approach. Just delete everything and start over… A good idea if iTunes ratings, playlists and play counts are not considered important keepsake. But to users who spend a good deal of time carefully tweaking song ratings and organizing playlists, scrapping their information and starting fresh may not be a desirable approach.
24
-
25
-Thankfully there's an easy workaround for the problem. A sane alternative to relocating files one at a time (like when you move hundreds or thousands of files). The workaround is straightforward and reversible. And useful whenever moving many files together.
26
-
27
-Applying it will allow users to move files around in bulk, while still hanging onto most of the iTunes metadata they have likely grown fond of.
28
-
29
-**Note:** Some less significant meta information, such as `Last Played` time, is lost during the process.
30
-
31
-## Addressing the problem
32
-
33
-Provided below are step-by-step instructions for updating the Library XML  to recreate the iTunes Library, enabling bulk file relocation when iTunes files are manually organized.
34
-
35
-### Backup iTunes Music Library
36
-
37
-Before you move your files, do the following:
38
-
39
-1.  Close iTunes for now.
40
-2.  Create copies of the following: 
41
-    *   (2x) **Library XML** (`iTunes Music Library.xml`)
42
-    *   (1x) **Library ITL** (`iTunes Library.itl`)  
43
-        Windows users can find the Library XML at `C:\Users\Username\Music\iTunes`  
44
-        Mac users can find the Library XML at `/Users/Username/Music/iTunes`
45
-
46
-### Relocate iTunes files as necessary
47
-
48
-Before moving files note the following two necessary pieces of information:
49
-
50
-1.  The path where the files were previously stored (e.g. `D:\Downloads\Music`)
51
-2.  The path where the files will end up (e.g. `E:\Music\Archive`)
52
-
53
-### Hack the Library XML and delete the Library ITL
54
-
55
-After your files are moved, complete the following steps to implement the fix.  
56
-**Tip: **Do not open iTunes during this process.
57
-
58
-1.  Open one of the Library XML copies created.
59
-2.  Perform a Find/Replace using the following inputs:  
60
-    **Find:*** *Path where files were moved from  
61
-    **Replace:** Path where files were moved to
62
-3.  Save and close the document, noting which file contains the modifications.
63
-4.  Delete the existing Library ITL.
64
-
65
-### Restart iTunes
66
-
67
-Once the Library ITL has been deleted, restart iTunes. The application will open with a blank library; custom playlists, music and other items will be gone. To recover the data do the following:
68
-
69
-1.  Import the modified copy of the Library XML.  
70
-    In iTunes 8 and 9, choose `File` > `Library` > `Import Playlist…`
71
-2.  Navigate to and **Open** the modified Library XML.
72
-3.  iTunes will then import the file contents into the blank library.
73
-4.  Wait for the import to complete.
74
-
75
-iTunes may display a dialog if any files cannot be located during the import process. The dialog can occur as a result of improper changes to the Library XML, or because the Library XML already contained references to files previously moved or renamed.
76
-
77
-## Wrapping up
78
-
79
-Once the updated playlist is imported into iTunes lost songs and other media should be restored though there will be some duplicate playlists. Before deleting the extra playlists confirm the changes are working as expected. Once satisfied, delete the duplicates in the Library and enjoy your hard work. You've earned it.
80
-
81
-### If something goes wrong
82
-
83
-If something goes wrong during the process, or if the results are not as expected, the original Library can be restored from the backup files created. To do so, close iTunes and copy the backup Library ITL and XML back to their original locations (overwrite existing files, if prompted) and restart iTunes to restore the previous Library.
84
-
85
-### Additional resources
86
-
87
-[Apple Support KB Article HT1451: How to re-create your iTunes library][1]
88
-
89
- [1]: http://support.apple.com/kb/HT1451

+ 0
- 50
source/_posts/2008-12-30-password-protection-with-passkeeper.md View File

@@ -1,50 +0,0 @@
1
----
2
-title: Password Protection with PassKeeper
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /password-protection-with-passkeeper/
6
-comments: true
7
-categories:
8
-  - security
9
-tags:
10
-  - security
11
-  - privacy
12
-  - encryption
13
-  - passwords
14
----
15
-After recently losing a USB flash drive with all my passwords on it, I was grateful for the precaution I took by storing my password data encrypted using Brad Greenlee’s PassKeeper password manager.
16
-
17
-> <a title="PassKeeper" href="http://www.passkeeper.com/">PassKeeper</a> is a Windows utility that allows you to keep a list of accounts with usernames, passwords, and notes. This list is stored encrypted.
18
-
19
-The utility is freeware and has been available for public download since the mid-90’s. Data are encrypted using the 56-bit <a title="DES cipher" href="http://en.wikipedia.org/wiki/Data_Encryption_Standard" rel="nofollow">DES</a> cipher and stored in an DAT file in the application’s root directory. The size of the application (189 kilobytes) and the data file (~400 bytes/entry) are lightweight and can easily be carried around on any USB flash drive.
20
-
21
-<!--more-->
22
-
23
-![Image of PassKeeper running under Windows Vista](../assets/passkeeper.png)
24
-
25
-The application’s user interface (pictured left) is straight-forward and easy to use, and the system-oriented UI design has become more visually appealing as Windows has evolved.
26
-
27
-One thing that hasn't evolved, however, is the utility’s application icon (not pictured). The application icon has looked outdated since about Windows 98. But fixing the blemish is easy enough. Just create a Windows Shortcut and use a different icon. The `imageres.dll` located in `%windir%\system32\` in Windows Vista contains a decent-looking padlock icon that can be used if desired.
28
-
29
-With a little practice, the entire utility can be navigated using only the keyboard, and passwords can be quickly copied from PassKeeper and pasted into online forms and desktop applications without the use of a mouse. Coincidentally, the copy/paste behavior may help enhance security by masking password keystrokes from key loggers.
30
-
31
-Over time, one noticeable drawback of using PassKeeper is that it does not provide a built-in password generator. Another is that passwords copied to the clipboard are not automatically cleared after a set amount of time, requiring the user to do so by some other means—if at all. There is also a bug with account names using certain special characters, though in my ten years using the utility I only saw it once. According to program readme.txt on [www.passkeeper.com][1] the utility is limited to 128 entries, but offers a simple workaround for the limitation.
32
-
33
-Overall, PassKeeper is a straight-forward, easy-to-use utility for managing and securing personal passwords and account data. And though it's starting to show its age, it continues run stably as Windows evolves. If you decide to use PassKeeper and carry around password data on a USB flash drive, the 56-bit encryption used should buy most users plenty of time to change any sensitive passwords should the device be lost.
34
-
35
-## Other password managers worth checking out
36
-
37
-*   <a href="http://keepass.info/">KeePass Password Safe</a> — A free open source password manager, which helps you to manage your passwords in a secure way.
38
-*   [KeePassX][2] -- Platform-independent port of KeePass Password Safe that works on Windows, Mac and Linux to name a few. Compatible with existing KeePass password databases.
39
-*   [KeePassDroid][3] -- A port of the KeePass Password Safe for the Android platform. Try it in conjunction with DropBox and KeePassX for a great cross-platform personal security solution.
40
-*   [1Password][5] -- Widely-used, paid password management solution
41
-
42
-## Password managers to pass up
43
-
44
-[RoboForm][4] — Though it has a version specifically for use with USB flash drives, RoboForm is reliant on a web browser to function; it is not suitable for managing desktop application passwords and may not function in all browsers.
45
-
46
- [1]: http://www.passkeeper.com
47
- [2]: http://www.keepassx.org/
48
- [3]: http://www.keepassdroid.com/
49
- [4]: http://www.roboform.com/ "RoboForm"
50
- [5]: https://agilebits.com/onepassword

+ 0
- 69
source/_posts/2009-03-29-building-a-better-lightbox.md View File

@@ -1,69 +0,0 @@
1
----
2
-title: Building a Better Lightbox
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /building-a-better-lightbox/
6
-comments: true
7
-categories:
8
-  - opinion
9
-tags:
10
-  - accessibility
11
-  - focus
12
-  - javascript
13
-  - modal
14
-  - dialog
15
-  - popover
16
-  - patterns
17
-  - ui
18
-  - usability
19
-  - ux
20
----
21
-![Screenshot of a Lightview modal dialog](../assets/lightview1.png)
22
-
23
-Though modal dialogs are not a new concept in UI design, the number of homegrown [Lightbox clones][1] appearing on the Web since major JavaScript libraries like Prototype and jQuery hit the scene has been staggering. Unfortunately, many of the clones developed leave some key usability considerations unaddressed, and struggle with common problems in accessibility. Some key usability features that should be considered during creation of a Web-based modal dialog include (1) manage focus and allow tab navigation (2) disable elements outside the modal dialog (3) give users an out and (4) provide graceful error recovery.
24
-
25
-<!--more-->
26
-
27
-## Manage focus and allow tab navigation
28
-
29
-Guide the user experience by managing focusable page elements using JavaScript.
30
-
31
-*   Tabbing should allow the user to navigate back to the browser's location bar and other tabbable toolbars.
32
-*   When the modal dialog is shown, the user should not be able to tab to document content outside the dialog content area.
33
-*   When the dialog is hidden, focus should be restored to the initial element used to activate the modal dialog, the original tab ordering should be restored and the user should no longer be able to tab to content inside the modal dialog.
34
-
35
-## Disable elements outside the dialog
36
-
37
-Guide user interaction with page elements outside of the modal dialog and keep focus in the lightbox window.
38
-
39
-*   Display a translucent overlay above the page while the dialog is shown, giving the perception of modality while maintaining frame of reference to existing page content.
40
-*   Prevent interaction with elements outside the modal dialog using script to do the following: 
41
-    *   Save and then temporarily set a new tab order for all applicable elements;
42
-    *   Save and then temporarily set the disabled flag on all applicable elements; and
43
-    *   Save and then temporarily update applicable hyperlink click handlers to return false.
44
-
45
-## Give users an easy way out
46
-
47
-Give users the ability to exit unwanted modal dialogs without thinking much about it.
48
-
49
-*   Use a graphical `x` link the user can click to initiate the hide method. In addition, consider using the graphic as a background image for a text-based link (e.g. `Close`) to help improve comprehensibility slightly for both sighted and non-sighted users while maintaining application scalability with a single link implementation.
50
-*   While the dialog is displayed, listen for the `Esc` key. If it is pressed, exit the modal dialog and restore the previous display state.
51
-*   If the Lightbox was activated by the user, make the close link the next focusable element in the tab order.
52
-
53
-## Provide graceful error recovery
54
-
55
-Script display methods (e.g. hide/show) should listen for script errors and, upon error, close the modal dialog and restore previous settings–including any previously focused element. Utilize the `try`/`catch` block to make it happen, but beware that suppressed errors increases debugging complexity.
56
-
57
-## Related articles
58
-
59
-See also Roger Johansson's [Lightboxes and keyboard accessibility][2] for additional considerations in improving Lightbox usability, with a focus on keyboard accessibility.
60
-
61
-## Recommended scripts
62
-
63
-*   [ColorBox][3] -- A light-weight, customizable lightbox plugin for jQuery
64
-*   [Lightview][4] -- Lightview was built to change the way you overlay content on a website
65
-
66
- [1]: http://planetozh.com/projects/lightbox-clones/
67
- [2]: http://www.456bereastreet.com/archive/200910/lightboxes_and_keyboard_accessibility/
68
- [3]: http://colorpowered.com/colorbox/
69
- [4]: http://www.nickstakenburg.com/projects/lightview/

+ 0
- 85
source/_posts/2009-07-22-analyzing-user-agent-strings.md View File

@@ -1,85 +0,0 @@
1
----
2
-title: Analyzing User Agent Strings
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /analyzing-user-agent-strings/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - dom
11
-  - http
12
-  - javascript
13
-  - patterns
14
-  - user agent
15
----
16
-The user agent string, a piece of data transmitted in the HTTP header during a web request, contains information valuable in determining browser type and often basic system information.
17
-
18
-Example user agent string sent from a web browser during an HTTP request:
19
-
20
-    Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5
21
-
22
-The above example, for instance, provides information such as browser and browser version, user locale (language), OS, system architecture and the layout engine used. When authoring documents for the Web, information from the user agent string can be valuable in determining how best to mark-up documents.
23
-
24
-Getting the information is easy.
25
-
26
-<!--more-->
27
-
28
-## Collecting user agent strings
29
-
30
-Two methods for accessing the user agent string include:
31
-
32
-1.  From the HTTP request header&#8217;s User-Agent field; and
33
-2.  Using DOM and JavaScript.
34
-
35
-#### Reading from the User-Agent field
36
-
37
-A benefit of using the HTTP header to gather data is simplicity of design.
38
-
39
-HTTP request header showing the User-Agent field (in bold):
40
-
41
-    GET / HTTP/1.1
42
-    Host: livehttpheaders.mozdev.org
43
-    <strong>User-Agent:</strong> Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5
44
-    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
45
-    Accept-Language: en-us,en;q=0.5
46
-    Accept-Encoding: gzip,deflate
47
-    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
48
-    Keep-Alive: 300
49
-    Connection: keep-alive
50
-
51
-Using the HTTP header the user agent is transmitted directly to the HTTP server on page request, making it possible for servers to output the user agent string to a log file for later analysis. The user agent string alone provides enough information to implement on websites valuable browser support strategies such as [graded browser support][1].
52
-
53
-#### User agent retrieval using DOM and JavaScript
54
-
55
-Using DOM and JavaScript, on the other hand, add additional development complexity, but provide more detailed and valuable analytic data, in addition to the user agent string alone. Tools like [Urchin][2] (now Google Analytics) utilize JavaScript and the DOM to gather analytic data about visitors.
56
-
57
-Bookmark the following link to create a bookmarklet that will retrieve the user agent from a browser: <a onclick="alert(navigator.userAgent); return false;" href="#">javascript:alert(navigator.userAgent)</a>
58
-
59
-Regardless of the collection approach used, methods for extracting data from the string remain similar.
60
-
61
-## Data extraction methods
62
-
63
-Once the user agent string(s) are collected, data extraction may take place. Two methods for reading and extracting information from the user agent string include brute force and pattern recognition:
64
-
65
-*   Under the brute force approach the user agent string is compared programmatically to a database of known strings. Though it offers a relatively simple implementation, the brute force approach can be difficult to maintain and becomes increasingly inefficient as comparison data sets grow larger.
66
-*   Thanks to [RFC 2616][3] and preceding RFCs, and de facto standards for formatting user agent strings, another method known as [pattern recognition][4] is possible. Using pattern recognition the user agent string is broken into its component pieces and heuristics applied to gather information. Though more complex to implement than the brute force approach, pattern recognition does not suffer from the same problems in efficiency and maintainability in the long-run.
67
-
68
-Due to its drawbacks in the application of extracting data form user agent strings, the brute force approach will not be discussed further in this article.
69
-
70
-### <a id="pattern-recognition"></a>Pattern recognition on the user agent string
71
-
72
-Check out [Identify User Agent by string format recognition][5] for an example of user agent pattern recognition. Though a little outdated, the article provides additional depth, in addition to some useful programming techniques and lax copyright restrictions.
73
-
74
-## User agent spoofing
75
-
76
-Impersonating browsers and mobile devices is simple with Firefox. Just download [User Agent Switcher][6] plug-in and put it to the test at [useragentstring.com][7]. See [Web Development and Debugging Tools][8] for a list of tools useful for front end development.
77
-
78
- [1]: http://developer.yahoo.com/yui/articles/gbs/
79
- [2]: http://en.wikipedia.org/wiki/Urchin_(software)
80
- [3]: http://www.w3.org/Protocols/rfc2616/rfc2616.html
81
- [4]: #pattern-recognition
82
- [5]: http://www.texsoft.it/index.php?c=software&m=sw.php.useragent&l=it
83
- [6]: https://addons.mozilla.org/en-US/firefox/addon/59
84
- [7]: http://www.useragentstring.com/
85
- [8]: http://www.habdas.org/useful-web-development-and-debugging-tools/

+ 0
- 156
source/_posts/2009-10-18-google-302-redirect-hijack.md View File

@@ -1,156 +0,0 @@
1
----
2
-author: Josh Habdas
3
-layout: post
4
-title: Anatomy of a Google 302 Redirect Hijack
5
-permalink: "/google-302-redirect-hijack/"
6
-comments: true
7
-categories: 
8
-  - reference
9
-tags: 
10
-  - scareware
11
-  - http
12
-  - hacking
13
-  - proxies
14
-  - seo
15
-  - black hat
16
-  - malware
17
-  - user agent
18
-published: true
19
----
20
-
21
-Recently while Googling `Olla de Carne` (Costa Rican beef stew) my browser was [hijacked][1] after taking a search results link. Rather than receiving a list of ingredients, the link redirected the browser to a bogus antivirus site that mimicked Windows and faked an integrated Explorer virus scan (see screenshot below or <a class="youtube" href="http://www.youtube.com/v/gnZSOMdp9oI">watch the video</a>).  
22
-
23
-<!--more-->
24
-
25
-{% youtube gnZSOMdp9oI %}
26
-
27
-After a few seconds on the page the following occurred:
28
-
29
-*   Result page successfully hijacked and a faux Windows Explorer interface loaded.
30
-*   A fake virus scan ran in the look-alike Explorer window, conveniently uncovering trojans and other malware.
31
-*   Alerts, dialogs and phony windows displayed in an attempt to execute a little [social engineering][2].
32
-
33
-After attempting to interact with the document the following occurred:
34
-
35
-*   A potentially threatening program file download initiated if you clicked on anything in the page.
36
-*   Additional warning dialog and pop-up window displayed on attempting to unload the page (e.g. hit the back button).
37
-*   Intermittently, the Google Chrome 3.0 back-button and tab `x` icon stopped functioning as expected.
38
-
39
-The last point was of particular interest at first, as it is not like modern browsers to allow websites to modify browser functionality. But after some additional research, it was clear the hijack was more complex than a page titled with search engine optimization in mind. This article will study the hijacking in some technical detail, discuss the black hat SEO techniques used to get the rogue application listed on Google and how the app was able modify the expected functionality of browser controls in Chrome 3.0.
40
-
41
-## The bait and switch
42
-
43
-How does activating a seemingly innocuous (and tasty) link from Google land someone on a potentially dangerous page? 302. [HTTP 302][3] that is.
44
-
45
-After locating the offending link on Google, I used a client-side proxy to trap the HTTP headers for a play-by-play review:
46
-
47
-    GET http://woodstockfolkmusic.com/bftwe/tiijy/carne.php HTTP/1.1
48
-    HTTP/1.1 302 Found
49
-    GET http://goodstats1.net/in.cgi?2 HTTP/1.1
50
-    HTTP/1.1 302 Found
51
-    GET http://sunstats1.net/in.cgi?default HTTP/1.1
52
-    HTTP/1.1 302 Found
53
-    GET http://sunstats1.net/redirect3/ HTTP/1.1
54
-    HTTP/1.1 302 Found
55
-    GET http://bookletantcars.cn/?pid=283s01&sid=2a15a0 HTTP/1.1
56
-    HTTP/1.1 302 Found
57
-    GET http://wwwantispyware10.com/scan1/?pid=283s1&engine=%3D3W59jDuNTIuMTUxLjE1MyZ0aW1lPTEyNTE2NYcMOAkN HTTP/1.1
58
-    HTTP/1.1 200 OK
59
-
60
-Stepping through the sequence we can see the initial GET request followed by a 302 redirect response. Several redirects later and the browser successfully arrives at destination malware, beef stew long forgotten.
61
-
62
-## Black hat inside
63
-
64
-The next thing I tried was to analyze the [source of the PHP file][4] cataloged by Google, which was not difficult for two reasons:
65
-
66
-1.  Directory listing was enabled on the web server, and
67
-2.  Navigating directly to the PHP file caused the page to load without redirect.
68
-
69
-The PHP file was stowed away on [woodstockfolkmusic.com][5] (which appears to be a legitimate folk music site based out of Illinois) along with some 300 similar PHP files, covering a range of topics from Alba to Wisconsin. The files found contained mostly deprecated HTML markup (remember the `<marquee>` tag anyone?) and no PHP script or META tags. The files were [stuffed with hundreds of keywords][6], a form of [spamdexing][7] I thought was no longer practiced. Nevertheless the result still appeared on Google, possibly with a little help from [cloaking][8].
70
-
71
-## Engage the cloaking device
72
-
73
-Curious as to why the PHP files (with no PHP script or META tags, mind you) would redirect links coming from Google, but not when loaded directly, I again pulled up a client-side proxy for closer investigation. Below are the results of several slightly modified HTTP requests for the file initially requested by Google. Each request contains a modified Referer [request-header field][9].
74
-
75
-**First request**  
76
-Hacked the Referer field to point to the Google domain.
77
-
78
-    GET http://woodstockfolkmusic.com/bftwe/tiijy/carne.php HTTP/1.1
79
-    Host: www.google.com
80
-    Proxy-Connection: keep-alive
81
-    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0 Paros/3.2.13
82
-    Referer: http://www.google.com/
83
-    Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
84
-    Accept-Encoding: sdch
85
-    Accept-Language: en-US,en;q=0.8
86
-    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
87
-
88
-**First response**  
89
-Hijack successful; browser redirected to bogus antivirus page.
90
-
91
-    HTTP/1.1 200 OK
92
-    Date: Sun, 18 Oct 2009 22:33:31 GMT
93
-    Server: Apache
94
-    X-Powered-By: PHP/5.2.8
95
-    Connection: close
96
-    Content-Type: text/html
97
-
98
-**Second request**  
99
-Hacked the Referer field to a domain other than Google.
100
-
101
-    GET http://woodstockfolkmusic.com/bftwe/tiijy/carne.php HTTP/1.1
102
-    Host: woodstockfolkmusic.com
103
-    Proxy-Connection: keep-alive
104
-    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0 Paros/3.2.13
105
-    Referer: http://www.habdas.org/
106
-    Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
107
-    Accept-Encoding: sdch
108
-    Accept-Language: en-US,en;q=0.8
109
-    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
110
-
111
-**Second response**  
112
-No hijack; browser sent directly to indexed page.
113
-
114
-    HTTP/1.1 200 OK
115
-    Date: Sun, 18 Oct 2009 22:31:36 GMT
116
-    Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
117
-    X-Powered-By: PHP/5.2.6
118
-    Content-Type: text/html
119
-
120
-**Additional testing**  
121
-Additional testing revealed page redirection would occur only when the Referer field was included in the HTTP request header, and only when the field value contained certain phrases. Two phrases found to trigger the hijack include `google` and `yahoo` (case insensitive) while other likely phrases such as `bing`, `msn`, `aol` and `ask` did not.
122
-
123
-**Note:** I am I not currently aware if Yahoo is susceptible this particular brand of page hijacking. If you've seen it on Yahoo or know of any examples, please comment and let us know.
124
-
125
-Testing for the presence of phrases `Googlebot`, `googlebot` or `google` and `bot` (separated) all resulted in the 302 redirects, which leaves some of the following possibilities:
126
-
127
-*   The 302 redirect (likely of the .htaccess kind found in the [Antivirus 2009 approach][10]) was turned on after the page was indexed.
128
-*   The web crawler that originally accessed the page did not pass the phrases `google` or `yahoo` in the Referer [*sic*] field in the HTTP request header.
129
-
130
-Monitoring over a several day period landed the browser on some of the following domains, each with their own similar virus scan or some derivation:
131
-
132
-*   wwwantispyware10.com
133
-*   topantimalwarescan7.com
134
-*   top-antispyware-scan8.com
135
-*   computer-protection11.com
136
-*   webprosecurity.com
137
-*   guardpconline.com
138
-
139
-## The Chrome 3.0 Browser Button Issue
140
-
141
-The Chrome button issues are happening on and off. Some of the changes in behavior I have witnessed using Chrome v3.0.195.27 (Win):
142
-
143
-*   Browser unable to navigate backwards in history;
144
-*   Navigation backwards in history only after several tries; and
145
-*   Tab hangs and cannot be closed, and Windows clocks, until the pop-up notification window is closed.
146
-
147
- [1]: http://en.wikipedia.org/wiki/Page_hijacking
148
- [2]: http://en.wikipedia.org/wiki/Social_engineering_(security)
149
- [3]: http://en.wikipedia.org/wiki/HTTP_302
150
- [4]: ../assets/carne.php
151
- [5]: http://woodstockfolkmusic.com/
152
- [6]: http://en.wikipedia.org/wiki/Keyword_stuffing
153
- [7]: http://en.wikipedia.org/wiki/Spamdexing
154
- [8]: http://en.wikipedia.org/wiki/Cloaking
155
- [9]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
156
- [10]: http://blog.javacoolsoftware.com/2008/12/anti-virus-2009-search-engine-redirect-hacks/

+ 0
- 34
source/_posts/2010-05-30-msie-4095-selector-limit.md View File

@@ -1,34 +0,0 @@
1
----
2
-title: MSIE 4095 Selector Limit
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /msie-4095-selector-limit/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - browser compatibility
11
-  - CSS
12
-  - debugging
13
----
14
-Web applications concatenate CSS files to improve performance, which can result in large numbers of style rules in a single file. Enter the <a href="http://marc.baffl.co.uk/browser_bugs/css-selector-limit/" class="broken_link">4095 selector limitation for IE browsers</a>. An IE bug whereby the browser will only apply style for the first 4095 selectors declared per file. Impacted browsers include IE6, IE7, IE8 and IE9.  
15
-
16
-<!--more-->
17
-
18
-## Identification
19
-
20
-Look for IE-only display issues (outside the norm) when CSS files contain many style rules. Rules near the bottom of the stylesheet will not be applied. The issue can be confirmed with the IE dev toolbar. To do so use dev toolbar to save off the CSS file downloaded from the web server, and then scroll to the bottom of the CSS tab in the toolbar (assumes IE8 dev tools). Compare the last style rule displayed in the tab with the last rule in the actual file itself. If they do not match, and the CSS is valid, the limit has been reached.
21
-
22
-## Solution
23
-
24
-Reduce the number of CSS selectors per file to a number less than 4096. Several approaches for doing so include:
25
-
26
-*   Refactoring existing CSS
27
-*   Splitting the CSS payload into multiple files
28
-*   Reevaluating current browser support strategy (wink, wink)
29
-
30
-If the stylesheet under scrutiny contains IE-only hacks interspersed with standards compliant CSS, consider moving the hacks into a separate file and using [Conditional Comments][1] to pull them in. Otherwise, the best option may be to split the CSS payload into multiple files–resulting in an extra HTTP request for all browsers, not just IE. Reevaluating browser support is another option, but probably not feasible for large-scale applications.
31
-
32
-Regardless of which approach is taken, something will need to be done for IE once the per-file limit is reached. Though 4095 selectors ought to be enough for anybody…
33
-
34
- [1]: http://www.quirksmode.org/css/condcom.html

+ 0
- 73
source/_posts/2010-08-21-running-android-on-htc-hd2-leo.md View File

@@ -1,73 +0,0 @@
1
----
2
-title: Running Android on the HTC HD2
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /running-android-on-htc-hd2-leo/
6
-comments: true
7
-categories:
8
-  - phreaking
9
-tags:
10
-  - android
11
-  - mobile
12
-  - modding
13
----
14
-![HD2 running Android Froyo](../assets/100_1698-e1293925103508.jpg)
15
-
16
-After spending a few weeks on the [HD2 Android Development forums][1] at XDA I learned how to coerce my T-Mobile HTC HD2 into dual-booting Android and WinMo. As of today I've got Android Froyo running with few issues and reasonable battery life. In this post I'll explain how how you can dual-boot Android and WinMo on your HD2 as well.
17
-
18
-> **Forget dual-booting!** Learn <a href="/direct-boot-gingerbread-on-the-hd2">how to direct boot Android</a> on the HD2 for faster booting, better battery life and frequent updates.
19
-
20
-<!--more-->
21
-
22
-**First, flash the boot loader.** Doing so will allow you to replace windows mobile with custom roms better suited for running Android. I've flashed three HD2s with Cotulla's [HSPL3][2] boot loader and haven't had any issues.
23
-
24
-**Warning:** Flashing the boot loader may void your warranty, though you can uninstall HSPL3 by rerunning the HSPL3 setup and choosing the standard `SPL 2.08.0000` option.
25
-
26
-With the new boot loader installed, **flash the windows rom**. Find a good replacement rom that will load Android quickly and run it stably. Roms I've found worked well with the HD2 Android builds are Miri and Chucky ROMs. Check [XDA][3] and [htcpedia][4] for custom roms.
27
-
28
-Back-up your data and **reformat the SD card**.
29
-
30
-<a id="install-android"></a>To **install Android on the HD2** download and install any of the recent HD2 Android builds from [the forums on XDA][1]. My favorite builds right now are the near-stock Froyo builds created by darkstone. (Note: See my [current set-up][5] for what I'm using now.)
31
-
32
-Once you've got Android installed, **make running it easier**. [Exceller Multiple Build Loader][6] provides a nice interface for booting into Windows or Android automatically after the phone powers on. There is also support for booting into Ubuntu, if you're into that sort of thing.
33
-
34
-**Govern Android battery consumption.** SetCPU can be used to manage clock speeds, making it easy to reduce battery drain. It can be downloaded from the Market at a cost, or [here for free][7]. (Note: Free version requires [adb][8] to install.) Try setting a `Screen Off` profile that limits the CPU usage to 245 max with an `Up Threshold` of `30`, set on boot, to prevent much of the battery drain associated with sleep mode.
35
-
36
-**Tip:** To install the free version of SetCPU, download it, install adb, connect the Android phone to USB, open a command line, cd to the location of the APK file and type `adb install setcpu.apk`.
37
-
38
-If you experience issues in the Android OS, **try upgrading the radio**. Though something I overlooked at first, upgrading the radio helped me prevent SoD and robotic voices. Grab a new radio from the [HDC HT2 Radio Rom Thread at XDA][9].
39
-
40
-**Warning:** Flashing an incorrect radio may cause issues with your device. Ensure the radio used is compatible before updating.
41
-
42
-With enough tweaking your phone should be running Android issue-free all day with acceptable battery life. If not, keep messing with it. Try turning off the auto-rotate option in settings, downloading a different Android build or even swapping in a newer [Linux kernel image][10] (zImage) to find what works best for you. Don't have time? Learn from experience by checking out others' reply signatures on the [forums on XDA][1] and [htcpedia][11] to look for their set-ups.
43
-
44
-<a id="current-configuration"></a>Here's mine (last updated 18-Dec-10):
45
-
46
-- **Device:** TMOUS HTC HD2
47
-- **Boot Loader:** [CotullaHSPL3 (SPL-2.08-HSPL)][12]
48
-- **WinMo Rom:** [ChuckyROM-23139-Lite.Oct.09][13]
49
-- **Radio:** [2.15.50.14][9]
50
-- **Android build:** [darkstone SuperRAM FroYo v1.5][14]
51
-- **Launcher:** [EBL2.0d_PlusUbuntu][6]
52
-
53
-Check the [direct boot Gingerbread to HD2 post][15] for most up-to-date status using NAND.
54
-
55
-Happy modding!
56
-
57
- [1]: http://forum.xda-developers.com/forumdisplay.php?f=735
58
- [2]: http://www.xda-developers.com/windows-mobile/hspl3-released-for-hd2/
59
- [3]: http://forum.xda-developers.com/forumdisplay.php?f=534
60
- [4]: http://htcpedia.com/
61
- [5]: #current-configuration
62
- [6]: http://forum.xda-developers.com/showthread.php?t=737001
63
- [7]: http://forum.xda-developers.com/showthread.php?t=505419
64
- [8]: http://developer.android.com/guide/developing/tools/adb.html
65
- [9]: http://forum.xda-developers.com/showthread.php?t=611787
66
- [10]: http://oe.netripper.com/files/htcleo_autobuild/
67
- [11]: http://htcpedia.com/forum/forumdisplay.php?f=141
68
- [12]: http://forum.xda-developers.com/showpost.php?p=6891358&postcount=1893
69
- [13]: http://forum.xda-developers.com/showthread.php?t=618787
70
- [14]: http://forum.xda-developers.com/showthread.php?t=870518
71
- [15]: /2011/01/17/direct-boot-gingerbread-on-the-hd2/#current-setup
72
-
73
- *[SoD]: Sleep of Death

+ 0
- 36
source/_posts/2010-10-10-managing-passwords-on-android.md View File

@@ -1,36 +0,0 @@
1
----
2
-title: Managing passwords on Android
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /managing-passwords-on-android/
6
-comments: true
7
-categories:
8
-  - security
9
-tags:
10
-  - android
11
-  - privacy
12
-  - encryption
13
-  - mobile
14
-  - passwords
15
----
16
-After [installing Android on my HD2][1] I quickly became challenged with the task of recalling passwords for frequently used applications like Last.fm, Mint, Facebook, Twitter, Gmail, Foursquare, et cetera. While recalling passwords for all of these apps might be painful for some, it's a cinch for those managing their passwords using one of the many available ports of the open-source [KeePass Password Safe][2]. For Android, the KeePass port I'm using is [KeePassDroid][3].
17
-
18
-> KeePassDroid makes recalling passwords as easy as copy/paste and also includes a password generator for creating strong passwords.
19
-
20
-<!--more-->
21
-
22
-KeePass ports like KeePassDroid store passwords in an encrypted file that can be easily shared between devices. That's where [Dropbox][4] comes in. When used together with DropBox, password files can be automatically synced between platforms and across devices.
23
-
24
-To use KeePass and Dropbox together to manage passwords that easily sync between devices:
25
-
26
-1.  Install DropBox on your PC/Mac and Android device
27
-2.  Put a KeePass port on each of the same devices
28
-3.  Move the KeePass KDB database files to the Dropbox cloud
29
-
30
-That's it! Those concerned about storing their passwords in a cloud can rest easy knowing the KeePass databases are stored encrypted using some of the strongest ciphers in existence today. So unless you're protecting the kind of info that might one day end up on [WikiLeaks][5], you've got little to worry about in storing your KeePass data online.
31
-
32
- [1]: http://www.habdas.org/2010/08/21/running-android-on-htc-hd2-leo/
33
- [2]: http://keepass.info/
34
- [3]: http://www.keepassdroid.com/
35
- [4]: https://www.dropbox.com/
36
- [5]: http://wikileaks.org/

+ 0
- 41
source/_posts/2011-01-03-making-free-voip-calls-on-android-froyo.md View File

@@ -1,41 +0,0 @@
1
----
2
-title: Making Free Calls on Android
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /making-free-voip-calls-on-android-froyo/
6
-comments: true
7
-categories:
8
-  - phreaking
9
-tags:
10
-  - android
11
-  - mobile
12
-  - thrifty
13
-  - phreaking
14
----
15
-During two recent trips to Central and South America I needed a way to call back to the States without spending a lot of money. After a little research I found a competitive rate: **free**. Using an Android-powered smartphone it's possible to make and receive calls free of charge from any Wi-Fi hotspot worldwide. In this post I'll explain how to do this for US-based mobile devices.
16
-
17
-> Using an Android-powered smartphone it's possible to make and receive calls free of charge from any Wi-Fi hotspot worldwide.
18
-
19
-<!--more-->
20
-
21
-First, sign-up for a free account at [sipgate.com][1] (or similar service) and choose to create a US-based telephone number. The account and phone number provide a method for connecting Internet calls with existing phone networks using a SIP client on the Android mobile device.
22
-
23
-![Download Sipdroid](http://qrcode.kaywa.com/img.php?s=3&d=http%3A%2F%2Fmarket.android.com%2Fsearch%3Fq%3Dpname%3Aorg.sipdroid.sipuapure)
24
-
25
-The SIP client I've used to is sipdroid. Download it from the Android Market. There may be multiple versions. The base version is all that is needed.
26
-
27
-Once the SIP client is installed it can be connected with Sipgate for Internet calling. To do this enter the SIP credentials from your Sipgate softphone (see Settings on Sipgate website) into Sipdroid. Make sure this is done in an area with Wi-Fi connectivity to verify the service registered correctly.
28
-
29
-After the SIP account is registered with Sipdroid the mobile device can begin receiving calls at the new phone number created. Outbound calls *would* cost money, but can be made for free using the Google Voice service and a little more work.
30
-
31
-To begin making outbound calls first register the SIP number as a new phone on Google Voice (via Settings in the web interface) and set it as use it as a forwarding device for calls to the Google Voice number.
32
-
33
-![Download Google Voice Callback](http://qrcode.kaywa.com/img.php?s=3&d=http%3A%2F%2Fmarket.android.com%2Fsearch%3Fq%3Dpname%3Acom.xinlu.gvdial)
34
-
35
-Once the number is added to Google Voice download and install Google Voice Callback from the Market. When enabled, this nifty app will use your Google account to connect two US-based telephone numbers using the Google Voice service. Be sure Google Voice is set-up to forward to your SIP number.
36
-
37
-Now give it a try! Jump on a Wi-Fi hotspot, make sure Sipdroid registers correctly and dial a number using the dialer as usual. Once dialed, Google Voice Callback will intercept the call and command Google Voice to do it instead. Google Voice will dial the SIP number first, which will ring the Android device via the SIP client. Once picked up, ringing can be heard on the line as Google Voice calls the initial number dialed. Ta-da!
38
-
39
- [1]: http://www.sipgate.com
40
-
41
- *[SIP]: Session Initiation Protocol

+ 0
- 57
source/_posts/2011-01-17-direct-boot-gingerbread-on-the-hd2.md View File

@@ -1,57 +0,0 @@
1
----
2
-title: Direct Boot Gingerbread on the HD2
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /direct-boot-gingerbread-on-the-hd2/
6
-comments: true
7
-categories:
8
-  - phreaking
9
-tags:
10
-  - android
11
-  - mobile
12
-  - modding
13
----
14
-
15
-![HTC HD2 running Android Gingerbread](../assets/DSC00963-2.jpg)
16
-
17
-Since the [release of a direct-boot utility for the HD2][1] there has been a flurry of activity on the XDA forums to get Android 2.3 (Gingerbread) working on the HTC HD2 smartphone. I recently switched from [dual-booting Android and WinMo][2] to a Gingerbread direct boot method and am pleased with the improvement in boot speed and battery life. But as with the dual-boot method, there are still a few hiccups here and there. Read on to learn how to replace WinMo with a Nandroid version of Android Gingerbread on the HTC HD2.
18
-
19
-<!--more-->
20
-  
21
-> **Forget Gingerbread!** Learn how to <a href="/running-ice-cream-sandwich-on-the-htc-hd2">run Ice Cream Sandwich on the HD2</a>.
22
-
23
-<strong id="install-hard-spl">Install Hard SPL</strong> (HSPL). HSPL3 is a custom bootloader [available for download][3] on XDA. HSPL is required to update the radio and flash custom ROMs to the phone. It is safe to install and can be uninstalled by rerunning the program setup file.
24
-
25
-Next <strong id="upgrade-to-a-new-radio">update to a new radio</strong>. [Radios and installation instructions][4] can be found on the forums at XDA. Be sure to use a compatible version. See my [current set-up][5] for what I’m using.
26
-
27
-After the radio is updated <strong id="install-magldr">install MAGLDR bootloader</strong>. MAGLDR serves as a second bootloader, which runs after HSPL, and can be used to Flash Nandroid ROMs to the HD2 or even play a game of Tetris. [Download MAGLDR][6] from the forums at XDA or start Googling.
28
-
29
-To <strong id="install-gingerbread">install Gingerbread on the HD2</strong> first download any of the recent Gingerbread Nandroid ROMs from the [HD2 Android NAND Development forum][7] to a PC and extract it. Then perform a soft reset while holding down the power off button until the MAGLDR boot menu appears. Select the `USB Flasher` option and connect the HD2 to a PC using a USB cable. Once the USB connection is established run the Android installer EXE file that came with the NAND ROM to complete the installation. Alternatively, you can install a ROM straight from a zip file using <abbr title="ClockworkMod">CWM</abbr> Recovery.
30
-
31
-Since upgrading to Gingerbread and Nandroid the biggest advantages I've noticed over [dual-booting form the SD card][2] have been:
32
-
33
-- Faster boot time;
34
-- Improved battery life; and
35
-- Easier setup and maintenance.
36
-
37
-If things seem buggy, try out a different [NAND ROM from the XDA forums][8]. Different builds will have different features working so plan to spend some time trying out different ROMs to find the best one. To get set-up more quickly on a new Android installation check out my advice on [Managing Passwords on Android][9]. Not sure which to install? Try copying my [current set-up][5] to get started.
38
-
39
-<a id="current-setup"></a>Current set-up (last updated 09-Nov-11):
40
-
41
-- <b>Device:</b> TMOUS HTC HD2
42
-- <b>HSPL:</b> [CotullaHSPL3 (SPL-2.08-HSPL)][2]
43
-- <b>Radio:</b> [2.15.50.14][4]
44
-- <b>Boot Loader:</b> [MAGLDR v1.13][10]
45
-- <b>Android ROM:</b> [NexusHD2-Gingerbread_V3.2a_NAND_(Android-2.3.7)][11]
46
-
47
- [1]: http://www.xda-developers.com/android/breaking-magldr-for-the-hd2-boot-directly-to-android/
48
- [2]: //running-android-on-htc-hd2-leo/
49
- [3]: http://forum.xda-developers.com/showpost.php?p=6891358&postcount=1893
50
- [4]: http://forum.xda-developers.com/showthread.php?t=611787
51
- [5]: #current-setup
52
- [6]: http://forum.xda-developers.com/showthread.php?p=10197474#post10197474
53
- [7]: http://forum.xda-developers.com/forumdisplay.php?f=928
54
- [8]: http://forum.xda-developers.com/forumdisplay.php?f=743
55
- [9]: //managing-passwords-on-android/
56
- [10]: http://forum.xda-developers.com/showpost.php?p=10197474&postcount=1
57
- [11]: http://forum.xda-developers.com/showthread.php?t=905060 "[27.MAR][CWM] NexusHD2-Gingerbread V2.5 [Android2.3.3][Kernel: tytung_r8.3]"

+ 0
- 35
source/_posts/2011-03-06-optimize-mobile-performance-with-jdrop.md View File

@@ -1,35 +0,0 @@
1
----
2
-title: Optimize Mobile Performance with Jdrop
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /optimize-mobile-performance-with-jdrop/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - mobile
11
-  - performance
12
-  - ui
13
-  - debugging
14
-  - programming
15
----
16
-Last month [Steve Souders announced Jdrop][1], a JSON repository in the cloud. Using Jdrop and Souders' [Mobile Perf bookmarklet][2], developers can send mobile browser data to the cloud for more careful analysis on other devices.
17
-
18
-<!--more-->
19
-
20
-As a UI developer and fan of Souders' book _Even Faster Web Sites_ I couldn't resist giving Jdrop a try. After setting-up an account and installing the Mobile Perf bookmarklet on my Android 2.3 device I was up and running. During the process I learned two important things:
21
-
22
-*   Bookmarklets are helping close the gap between desktop plug-ins and mobile device browsers.
23
-*   Distributed JSON repositories provide a convenient way to visualize data from mobile devices on a remote server.
24
-
25
-[Mobile Perf bookmarklet][2] provides a pop-up dialog (right) that provides easy access to other bookmarklets and performance tools, many of which have the ability to send data to [Jdrop][3] for subsequent analysis on another device.
26
-
27
-Info that can be sent back to Jdrop include a listing of external page resources, page source and DOM Monster performance analysis. Other tools such as Firebug Lite provide limited features but can be handy for gaining access to the console or inspecting the DOM.
28
-
29
-As mobile performance testing and debugging tools become more sophisticated, using bookmarklets to interface with a JSON cloud like Jdrop provides a great way to share mobile browser data between devices. Having these data available in the cloud enables developers to visualize information in more usable ways. But even with these advancements there is still room for improvement. Applications I would like to see developed in the future include remote script debugging, script error monitoring and client-side performance metric logging.
30
-
31
- [1]: http://www.stevesouders.com/blog/2011/02/16/jdrop-json-in-the-cloud/
32
- [2]: http://stevesouders.com/mobileperf/
33
- [3]: http://jdrop.org/
34
-
35
- *[JSON]: JavaScript Object Notation

+ 0
- 61
source/_posts/2011-04-17-get-sideways-with-html5-in-eclipse.md View File

@@ -1,61 +0,0 @@
1
----
2
-title: Get sideways with HTML5 in Eclipse
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /get-sideways-with-html5-in-eclipse/
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - eclipse
11
-  - html
12
-  - ide
13
-  - editors
14
----
15
-There are few front-end web developers I know who actually use the Eclipse editor for development. Whether it's the complexity of the IDE or simply resistance to change I cannot say. Working with Eclipse on enterprise apps has some serious advantages when it comes to working in multidisciplinary teams. And wrenching on a UI is no exception.
16
-
17
-As of late HTML5 is beginning to bear the shine of a recently waxed [Tesla Roadster][1]. It's hard not to want to jump right in and hit the gas. But wait, the [HTML5 spec][2] is still in draft. Is it safe to turn over the ignition? Well, [it depends][3]. But here are [5 reasons to start using HTML5 now][4].
18
-
19
-Last year when Eclipse Helios was released HTML5 didn't validate within the IDE. But somewhere between that release and the latest Helios service release, support was added for [actual native* *HTML5][5] elements in Eclipse, no plugin required! And you don't need to be running Aptana either. Awesomesauce!
20
-
21
-The following instructions will help Eclipse newcomers and experienced client-side developers alike get started, kinda like a big smokey burnout.
22
-
23
-<!--more-->
24
-
25
-## To get going
26
-
27
-1.  Download and isntall the latest Eclipse IDE for Java EE Developers package. Until Indigo GA packages are released in June you can use [Helios Service Release 2][6]. The package comes with WTP components like [JavaScript Development Tools][7] conveniently pre-installed.
28
-2.  Fire up the IDE.
29
-3.  Select a workspace and create or import a project. If you're just starting off, try creating a new Static Web Project named `HTML5` with the default values (`File` > `New` > `Static Web Project`, then click `Finish`).
30
-4.  Create a new HTML File (`File` > `New` > `HTML File`) using the HTML5 Template, available by selecting `Next` after naming the new file and choosing `New HTML File (5)`, and choosing `Finish`.
31
-
32
-If prompted during the process, choose to switch to the Web perspective. Once complete, you should should see something similar to the following:  
33
-```html
34
-<!DOCTYPE html>
35
-<html>
36
-<head>
37
-<meta charset="ISO-8859-1">
38
-<title>Insert title here</title>
39
-</head>
40
-<body>
41
-</body>
42
-</html>
43
-```
44
-
45
-If you're not satisfied with the limited characters displayable by the Latin-1 character set you can change the default encoding type for new template-based files from the Eclipse preferences by going to `Window` > `Preferences` > `Web`, clicking `HTML Files` and choosing something else (psst, go for the `UTF-8`).
46
-
47
-Save the new file and run it by choosing `Run` > `Run As` > `Run on Server`. By default the internal Eclipse browser will be used. To change the default browser select `Window` > `Web Browser`, and select a different browser from the list.
48
-
49
-Your battery should now be fully charged and ready to lay some rubber as you race into the future with HTML5 in Eclipse. Now go [take a HTML5 test drive][8] and see if you can get sideways.
50
-
51
- [1]: http://www.xkcd.com/766/
52
- [2]: http://dev.w3.org/html5/spec/
53
- [3]: http://caniuse.com/#cats=HTML5
54
- [4]: http://blogs.sitepoint.com/5-reasons-why-you-can-use-html5-today/
55
- [5]: http://my.opera.com/haavard/blog/2011/04/13/native-html5
56
- [6]: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr2
57
- [7]: http://www.eclipse.org/webtools/jsdt/
58
- [8]: http://introducinghtml5.com/
59
-
60
- *[GA]: General Acceptance
61
- *[WTP]: Web Tools Platform

+ 0
- 15
source/_posts/2011-09-22-html5-cross-browser-polyfills.md View File

@@ -1,15 +0,0 @@
1
----
2
-title: HTML5 Cross Browser Polyfills
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /html5-cross-browser-polyfills/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - html
11
-  - javascript
12
-  - ui
13
-format: link
14
----
15
-Recently ran across this impressive list of HTML5 cross-browser shim/polyfills on GitHub on the Modernizer Wiki: <https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills>. A perfect excuse to try out the Link format in the WordPress Twenty Eleven theme.

+ 0
- 24
source/_posts/2011-09-26-switching-from-firebug-to-chrome-dev-tools.md View File

@@ -1,24 +0,0 @@
1
----
2
-title: Switching from Firebug to Chrome Dev Tools
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /switching-from-firebug-to-chrome-dev-tools/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - browser compatability
11
-  - debugging
12
-  - mobile
13
-  - javascript
14
-  - ui
15
-  - programming
16
-format: link
17
----
18
-Here's the presentation given at Google I/O this year by Paul Irish and Pavel Feldman that got me to switch to Chrome Developer Tools promptly after watching: [http://youtu.be/N8SS-rUEZPg][1]. If you're a front-end web developer and haven't seen this yet take a look. It just may change the way you work.
19
-
20
-<!-- more -->
21
-
22
-{% youtube N8SS-rUEZPg %}
23
-
24
- [1]: http://youtu.be/N8SS-rUEZPg "Google I/O 2011: Chrome Dev Tools Reloaded"

+ 0
- 21
source/_posts/2011-11-13-mobile-emulators-simulators-the-ultimate-guide.md View File

@@ -1,21 +0,0 @@
1
----
2
-title: 'Mobile Emulators &#038; Simulators: The Ultimate Guide'
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /mobile-emulators-simulators-the-ultimate-guide/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - android
11
-  - blackberry
12
-  - browser compatibility
13
-  - debugging
14
-  - emulators
15
-  - ios
16
-  - mobile
17
-format: link
18
----
19
-Developing for mobile? You're gonna need an emulator. Here's a [list of emulators and simulators][1] that can be used to test your mobile webapps
20
-
21
- [1]: http://www.mobilexweb.com/emulators

+ 0
- 62
source/_posts/2011-11-21-push-upstream-with-egit-and-eclipse-indigo.md View File

@@ -1,62 +0,0 @@
1
----
2
-title: Push Upstream with EGit and Eclipse Indigo
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /push-upstream-with-egit-and-eclipse-indigo/
6
-comments: true
7
-categories:
8
-  - debugging
9
-tags:
10
-  - eclipse
11
-  - egit
12
-  - github
13
-  - putty
14
-  - ssh
15
----
16
-While working through the [EGit User Guide][1] I ran into difficulty pushing files upstream using Eclipse Indigo SR1 (build 20110916-0149). The difficulties manifested themselves at first with an `auth failed` error, which was quickly resolved with a [visit to Stack Overflow][2]. But after fixing that problem I began seeing the following error while trying to push to a remote repo:
17
-
18
-    Cannot get remote repository refs.
19
-
20
-    Reason:
21
-    ssh://git@github.com:22: Passphrase for C:\Users\...\.ssh\id_rsa
22
-
23
-<!--more-->
24
-
25
-Initial research indicated that Eclipse/EGit SSH authentication [has][3] <a href="http://egit.eclipse.org/r/#change,3796" class="broken_link">problems</a>. So I just kept messing around until I was able to get things working. After a little Googling and even more fiddling I found two solutions:
26
-
27
-*   [A simple fix that skips the passphrase altogether](#simple-fix); and
28
-*   [A more robust fix that uses PuTTY for file transfers over SSH](#using-putty).
29
-
30
-## <a id="simple-fix"></a>Simple fix that skips the passphrase and uses only Eclipse
31
-
32
-1.  Use ssh-keygen from Git Bash, [or Eclipse][6], to generate an RSA key, but do so *without* setting a passphrase.**  
33
-    **
34
-2.  Open and copy the public key from ~/.ssh/id_rsa.pub and add it to GitHub via the SSH Public Keys section in [Account Settings][7].
35
-3.  Restart Eclipse. (Note: Not doing this was tripping me up for a while.)
36
-4.  Try the [Push Upstream steps][8] again from the EGit User Guide.
37
-
38
-The obvious pitfall here is that a passphrase cannot be associated with the RSA key. If skipping the passphrase is out of the question the following solution may be a little more up your alley.
39
-
40
-## <a id="using-putty"></a>Use PuTTY for file transfers over SSH from within Eclipse
41
-
42
-1.  Download the following [PuTTY][9] binaries: Plink, Pageant and PuTTYgen.
43
-2.  Use PuTTYgen to generate a new public/private key pair *with* a passphrase. Open and copy the public key from `~/.ssh/id_rsa.pub` and add it to GitHub via the SSH Public Keys section in [Account Settings][7]. Save the private key file in your `~/.ssh` directory for later.
44
-3.  Run Pageant and add the key created during the last step, entering the passhprase when prompted. Leave this utility running.
45
-4.  Cache the server's host key in the registry by:
46
-1.  From a bash prompt like Git Bash execute the following command (assumes Plink binary is accessible from the current path): `plink git@github.com`
47
-2.  Verify the RSA key fingerprint matches GitHub's and, if they match, choose to store the key in the registry.
48
-
49
-5.  Add a new environment variable called GIT_SSH and point it to the downloaded Plink binary (e.g. `C:\Windows\system32\plink.exe`). EGit will attempt to use this binary for SSH, if configured.
50
-6.  Restart Eclipse, ensuring Pageant is still running with the private key available.
51
-7.  Try the [Push Upstream steps][8] again from the EGit User Guide.
52
-
53
-If done correctly, Eclipse should allow pushes to the remote repo without any further configuration, though Pageant must be running with the private key configured for it to work correctly. If problems continue see the [SSH issues][10] in the GitHub help documentation for additional information. Good luck!
54
-
55
- [1]: http://wiki.eclipse.org/EGit/User_Guide
56
- [2]: http://stackoverflow.com/questions/3601805/auth-problem-with-egit-and-github
57
- [3]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=326526
58
- [6]: http://stackoverflow.com/questions/3601805/auth-problem-with-egit-and-github/5965118#5965118
59
- [7]: https://github.com/account/
60
- [8]: http://wiki.eclipse.org/EGit/User_Guide#Push_Upstream
61
- [9]: http://www.putty.org/
62
- [10]: http://help.github.com/ssh-issues/

+ 0
- 54
source/_posts/2011-12-05-running-ice-cream-sandwich-on-the-htc-hd2.md View File

@@ -1,54 +0,0 @@
1
----
2
-title: Running Ice Cream Sandwich on the HTC HD2
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /running-ice-cream-sandwich-on-the-htc-hd2/
6
-comments: true
7
-categories:
8
-  - phreaking
9
-tags:
10
-  - android
11
-  - hd2
12
-  - htc
13
-  - mobile
14
----
15
-The HD2 proves yet again to have been a great purchase. Just as soon as Android evolved to version 4.0 with ICS so too did [ICS AOSP Hit the HD2][1]. Continue reading to learn how to direct-boot Ice Cream Sandwich using Nandroid on the HTC HD2.
16
-
17
-<!--more-->
18
-
19
-To get started, **complete my existing instructions** to [install HSPL][2], [upgrade to a new radio][3] and [install MAGLDR][4]. These updates are needed to flash custom ROMs on the HD2. (Note: [cLK][5] can be as an alternative to MAGLDR in some cases, but both require HSPL be installed first.) Installation times vary widely by skill level. Once installed, return here to finish the rest.
20
-
21
-As a debugging tool for beta ROM installations **download and store a functional copy of Android Gingerbread** on the SD card, in case there is a need to revert from ICS to an earlier, bug-free version of Android. The [Gingerbread ROM I used to use][6] worked for me.
22
-
23
-**Download and install Ice Cream Sandwich** from the [XDA forums][7]. With MAGLDR it is easiest to upgrade using the [ClockworkMod Recovery][9] utility, accessible via the MAGLDR main menu once installed. To access ClockworkMod Recovery, enter MAGLDR (reset phone with `shut down` key depressed) and choose `AD Recovery` from the main menu. The resulting menu system provides methods for installing and restoring ROMs from ZIP archives stored on the SD card. (Note: If upgrading from an existing Android NAND ROM, the system partition size may need to be increased before installation as per the ROM instructions.)
24
-
25
-{% youtube LChoaaLBTDQ %}
26
-
27
-If installation problems occur please be sure to follow **all** of the instructions provided with the ROM. Once installed, if things seem buggy, consider [direct-booting Gingerbread][10], or, if using the old [dual-booting Android and WinMo][11], switch over to a direct-boot method such as this one. Or simply try simply copying the set-up below. Those with an [Android password management system][12] will revel knowing how much time their careful planning has saved them once again.
28
-
29
-HD2 set-up (last updated <time datetime="2012-08-30">30-Aug-12</time>):
30
-
31
-**Device:** TMoUS HTC HD2  
32
-**HSPL:** [CotullaHSPL3 (SPL-2.08-HSPL)][13]  
33
-**Radio:** [2.15.50.14][14]  
34
-**Boot Loader: **[MAGLDR v1.13][15]  
35
-**Android ROM:** [NexusHD2-ICS-CM9-HWA_V2.6][16]  
36
-**Recovery:** [ClockworkMod Recovery v1.3][9]
37
-
38
- *[ICS]: Ice Cream Sandwich
39
-
40
- [1]: http://www.xda-developers.com/android/ics-aosp-hits-the-hd2/
41
- [2]: /2011/01/17/direct-boot-gingerbread-on-the-hd2#install-hard-spl
42
- [3]: /2011/01/17/direct-boot-gingerbread-on-the-hd2#upgrade-to-a-new-radio
43
- [4]: /2011/01/17/direct-boot-gingerbread-on-the-hd2#install-magldr
44
- [5]: http://forum.xda-developers.com/showthread.php?t=901305
45
- [6]: http://www.habdas.org/2011/01/17/direct-boot-gingerbread-on-the-hd2/#current-setup
46
- [7]: http://forum.xda-developers.com/forumdisplay.php?f=928
47
- [9]: http://forum.xda-developers.com/showthread.php?t=898913
48
- [10]: /2011/01/17/direct-boot-gingerbread-on-the-hd2/
49
- [11]: http://www.habdas.org/2010/08/21/running-android-on-htc-hd2-leo/
50
- [12]: /2010/10/10/managing-passwords-on-android/
51
- [13]: http://forum.xda-developers.com/showpost.php?p=6891358&postcount=1893
52
- [14]: http://forum.xda-developers.com/showthread.php?t=611787
53
- [15]: http://forum.xda-developers.com/showpost.php?p=10197474&postcount=1
54
- [16]: http://forum.xda-developers.com/showthread.php?t=1434860

+ 0
- 17
source/_posts/2011-12-20-adwords-keyword-tool.md View File

@@ -1,17 +0,0 @@
1
----
2
-title: Improve SEO with AdWords Keyword Tool
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /adwords-keyword-tool/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - keywords
11
-  - seo
12
-  - usability
13
-format: link
14
----
15
-Working on SEO and need to find out which keywords to optimize for? Need ideas keyword changes? The [AdWords Keyword Tool][1] ought to help.
16
-
17
- [1]: https://adwords.google.com/select/KeywordToolExternal "https://adwords.google.com/select/KeywordToolExternal"

+ 0
- 41
source/_posts/2012-01-15-get-started-with-php-in-eclipse.md View File

@@ -1,41 +0,0 @@
1
----
2
-title: Get started with PHP in Eclipse
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /get-started-with-php-in-eclipse/
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - eclipse
11
-  - php
12
-  - zend
13
-  - programming
14
----
15
-Eclipse is a powerful IDE supporting many different languages, including PHP. Unfortunately, many Eclipse installations do not provide PHP language support right out of the box—some assembly required. This article will focus on getting Eclipse set-up for PHP development and local debugging.
16
-
17
-<!--more-->
18
-
19
-To get started, first download and install the PDT plug-in for Eclipse. [PDT installation instructions][1] are available on Eclipsepedia. Once installed, a PHP perspective will become available, providing PHP syntax highlighting and code completion, as well as the ability to create PHP project types. The basics are now in place for developing PHP applications, save for local debugging.
20
-
21
-Debugging PHP apps locally requires users to install a separate debugging tool. Two currently available PHP debugging solutions include XDebug and Zend. We will focus on getting set-up using Zend as it is relatively easy to install and use. We will not discuss XDebug because, at the time of writing, attempts to get XDebug up-and-running ended in nothing but frustration.
22
-
23
-To use Zend for PHP debugging first [download and install PHP][2], if not already available, which is required for Zend to work properly. With PHP installed, [download and install Zend Server CE][3], the free community edition. When the server is running return to Eclipse to configure it to use Zend:
24
-
25
-1.  Start or restart the Eclipse IDE.
26
-2.  Create a new PHP Project in Eclipse.  
27
-    **Note:** Eclipse may default the project contents to the local Zend server. This can be changed if desired so that projects are consolidated in a single workspace.
28
-3.  Open project Properties dialog and enable project specific settings from the PHP Debug panel.
29
-4.  If not already selected, choose Zend Debugger as the PHP Debugger and set the Base Path to `/`, the local root.  
30
-    **Note:** Zend CE restricts users from hosting multiple PHP projects simultaneously.
31
-5.  Choose OK to save settings and close the Properties dialog.
32
-
33
-With Zend installed and Eclipse configured it should now possible to debug PHP on the localhost. To do so create a simple PHP file of the hello world variety, select it in the PHP Explorer (visible from the PHP Perspective), press **F11** or choose **Debug As…** and select **PHP Web Page** from the Debug As dialog. The Launch URL should be something like `http://localhost/index.php`. If the Launch URL includes the project name, Zend debugging may not function as expected.
34
-
35
-Once debugging is started the browser will open as well as the Debug perspective in Eclipse. The Eclipse Debug perspective will be stopped on the first PHP instruction encountered and ready for debugging. Press **F8** to resume processing and then switch back to the PHP Perspective. Local PHP debugging is now available.
36
-
37
- *[PDT]: PHP Development Tools
38
-
39
- [1]: http://wiki.eclipse.org/PDT/Installation
40
- [2]: http://us.php.net/downloads
41
- [3]: http://www.zend.com/en/products/server-ce/downloads

+ 0
- 17
source/_posts/2012-01-25-jsonview-google-chrome-extension.md View File

@@ -1,17 +0,0 @@
1
----
2
-title: JSONView for Google Chrome
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /jsonview-google-chrome-extension/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - debugging
11
-  - javascript
12
-  - json
13
-format: link
14
----
15
-Learned about the [JSONView Google Chrome extension][1]. A handy tool for viewing formatted JSON data in the browser. There's also an add-on for Firefox.
16
-
17
- [1]: https://chrome.google.com/webstore/detail/chklaanhfefbnpoihckbnefhakgolnmc

+ 0
- 135
source/_posts/2012-01-29-drupal-7-for-wordpress-admins.md View File

@@ -1,135 +0,0 @@
1
----
2
-title: Drupal 7 for WordPress Admins
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /drupal-7-for-wordpress-admins/
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - blogging
11
-  - cmf
12
-  - cms
13
-  - drupal
14
-  - webmaster
15
-  - wordpress
16
----
17
-WordPress continues to become more and more sophisticated as time draws on, with a constantly improving admin dashboard and easy-to-use plugin architecture. And themes like [Twenty Eleven][1] give both bloggers and web developers something to appreciate. But while WordPress is a great CMS for personal blogs, it's not well suited for more complex applications such as e-commerce, discussion forums, or collaborative wikis. [Drupal][2], on the other hand, and by design, excels at all of the above and more. This article will look at some of the similarities and differences between WordPress and Drupal 7, explain how to accomplish some of the less intuitive administration procedures in Drupal, share some newbie gotchas and timesavers, and provide a list of modules useful to get a new Drupal site off the ground. It is assumed readers are new to Drupal but have a familiarity with using the [WordPress][3] blogging platform. 
18
-
19
-<!--more-->
20
-
21
-## Similarities between WordPress and Drupal
22
-
23
-Drupal and WordPress aren't all that dissimilar at first glance. For instance, both of them are CMSs. Both run using PHP. Both allow users to install different themes and plug-ins/modules. And both can be used to create a blog. Even when moving between the CMS dashboards not a lot changes. Listed here are a number of comparable features and the different terms used for them between the two apps:
24
-
25
-WordPress 3 | Drupal 7
26
---- | ---
27
-Users | People
28
-Settings | Configuration
29
-Plugins | Modules
30
-Posts, Pages & Media | Content
31
-Widgets | Blocks
32
-Menu | Menus
33
-Tags & Categories | Taxonomy
34
-Themes | Themes
35
-
36
-As you can see both Drupal and WordPress contain a number of similar features, even with similar names. But regardless of the name, not all of the features are exactly alike. For example, due to its modular nature and dependency management capabilities, Drupal users will find themselves installing and managing a greater number of modules. Some modules must be installed on top of the Drupal core simply to achieve the same level of functionality provided by WordPress out of the box, such as with Drupal's [URL aliases][4] and [Pathauto][5]. However, the flexibility and extensive configuration options typically built into Drupal modules often outweigh the additional effort involved in setting them up correctly. This is one area where WordPress and Drupal begin to diverge.
37
-
38
-## Differences in content management underpinnings
39
-
40
-WordPress and Drupal content types draw clear comparisons, mainly due to the limited set of types available in WordPress. Notice how Drupal can contain a number of content types whereas WordPress uses only two. In Drupal, not everything is a page or a post as with WordPress:
41
-
42
-WordPress 3 | Drupal 7
43
---- | ---
44
-Post | Article
45
-Page | Basic page
46
-– | Blog entry
47
-– | Book page
48
-– | Poll
49
-– | Webform
50
-– | And more…
51
-
52
-Another area where Drupal stands apart from WordPress is in its extensible, open-source architecture. Based on the concept of building with [nodes][6] and [views][7], Drupal gives a number of ways to customize the site. However, the in-depth customization capabilities also present a small learning curve for users more familiar with WordPress.
53
-
54
-## Tricky site administration concepts in Drupal
55
-
56
-The following administration concepts are not immediately obvious when coming from WordPress to Drupal:
57
-
58
-* Creating PHP snippets
59
-* Injecting custom CSS into a theme
60
-
61
-PHP snippets provide a method for executing PHP code from an arbitrary block of content sitting in one of the theme's block regions. Snippet blocks can supplement existing modules or function as self-contained module replacement. To create one first enable the *PHP filter module*, pre-installed as a part of Drupal 7 core. Once enabled, add a new content block and choose the *PHP code* content format. Enter PHP code into the block body, name the code snippet (consider prefixing with "Snippet:") and save and position in one of a theme's block regions to activate.
62
-
63
-Cosmetic tweaks can be made to the site using [CSS Injector][8]. For example, [DISQUS][9] users viewing the comment system using the Drupal 7 Garland theme may notice alignment issues in the DISQUS UI as a result of cascading bullet styles. To resolve this issue add a CSS injector rule titled "Garland-Disqus List Style Fix" and enter the following code:  
64
-
65
-```css
66
-#dsq-content li,
67
-#dsq-recentcomments li {
68
-  list-style: none;
69
-}
70
-```
71
-
72
-Save any changes and reload the page, or, if CSS caching is enabled, clear the cache from the *Performance* section of the site's Configuration.
73
-
74
-## Drupal newb gotchas and timesavers
75
-
76
-A few tips that just may save a frustrating amount of time digging:
77
-
78
-* If a timeout error occurs during module installation of or while saving configuration, [increase the memory limit][10] in PHP.ini. It is possible for timeout errors to cause partial module installations which, if left unaddressed, can lead to confusion later on.
79
-* When installing libraries for the [Wysiwyg][11] module buttons may not be visible by default, true for *all* libraries in Drupal 7. Individual buttons can be enabled, however, via the Buttons and Plugins dialog accessible from the Wysisyg profiles list (look for the Edit link). If no buttons are enabled for the library installed it may appear as if Wysiwyg or its libraries are not functioning properly, so don't be fooled.
80
-
81
-## Modules to get Drupal up and running quickly
82
-
83
-The following list of Drupal 7 modules was compiled as <a href="http://www.canthespam.org/" class="broken_link">canthespam.org</a> was pieced together and represents a list of some of the modules used to create one of the world's first and only spam microblogs:
84
-
85
-* Start with the [Drupal 7 top ten contributed modules][12] which includes must-have modules such as [Google Analytics][13] and [Webform][14] as well as other modules likely to be rolled into the core for the Drupal 8 release.
86
-* [DISQUS][9] is a comments platform that helps you build an active community from your website's audience.
87
-* [Fivestar][15] adds a clean, attractive voting widget to nodes in Drupal 5, node and comments in Drupal 6, and any entity in Drupal 7.
88
-* [Form Builder][16] allows users to build entire Form API structures through a graphical, AJAX-like interface.
89
-* [Mollom][17] is an “intelligent” content moderation web service. By monitoring content activity on all sites in the Mollom network, Mollom is in a unique position to determine if a post is potentially spam; not only based on the posted content, but also on the past activity and reputation of the poster.
90
-* [Gravatar][18] integrates Drupal user pictures with the service provided by Gravatar, a globally recognized avatar.
91
-* [Colorbox][19] is a light-weight, customizable lightbox plugin for jQuery 1.3 through 1.6. This module allows for integration of Colorbox into Drupal.
92
-* [CSS Injector][8] Allows administrators to inject CSS into the page output based on configurable rules. It's useful for adding simple CSS tweaks without modifying a site's official theme. There's also a [JS Injector][20] based off CSS Injector currently in development.
93
-* [Twitter][21] provides API integration with the Twitter microblogging service and (theoretically) API-compatible alternatives like Identi.ca.
94
-* [Global redirect][22] is a module that performs 301 redirects and helps prevent crawlers from indexing a single page from multiple paths.
95
-* [XML Sitemap][23] creates a sitemap that conforms to the sitemaps.org specification.
96
-* [Shortcode][24] provides a shortcode API and basic shortcodes through Drupal filters.
97
-* [AdSense][25] provides web content providers with the means to earn revenue from visitors by displaying ads from Google AdSense™ advertising service on their sites.
98
-* [Location][26] allows real-world geographic locations to be associated with Drupal nodes, including people, places, and other content.
99
-* [Backup and Migrate][27] simplifies the task of backing up and restoring your Drupal database or copying your database from one Drupal site to another.
100
-
101
-## Summing things up
102
-
103
-As explained in this article, WordPress and Drupal share a number of similarities and differences. At surface level both share a lot of features in common. But both CMSs have some significant differences in their use content types, and management and display of data. The article explored similarities and differences between WordPress and Drupal, explained some of the less intuitive site administration concepts, shared a number of gotchas and provided a listing of useful modules for starting a new site. Drupal is a significant departure from the polish WordPress site administrators may have grown used to, but it also offers many additional capabilities WordPress does not.
104
-
105
-<div class="wp_plus_one_button">
106
-  <g:plusone size="medium" href="http://www.habdas.org/drupal-7-for-wordpress-admins/" callback="wp_plus_one_handler"></g:plusone>
107
-</div>
108
-
109
- [1]: http://wordpress.org/extend/themes/twentyeleven
110
- [2]: http://drupal.org/
111
- [3]: http://wordpress.com/
112
- [4]: http://drupal.org/node/120631
113
- [5]: http://drupal.org/project/pathauto
114
- [6]: http://drupal.org/documentation/modules/node
115
- [7]: http://drupal.org/project/views
116
- [8]: http://drupal.org/project/css_injector
117
- [9]: http://drupal.org/project/disqus
118
- [10]: http://drupal.org/node/207036
119
- [11]: http://drupal.org/project/wysiwyg
120
- [12]: http://drupal.org/node/1182798
121
- [13]: http://drupal.org/project/google_analytics
122
- [14]: http://drupal.org/project/webform
123
- [15]: http://drupal.org/project/fivestar
124
- [16]: http://drupal.org/project/form_builder
125
- [17]: http://drupal.org/project/mollom
126
- [18]: http://drupal.org/project/gravatar
127
- [19]: http://drupal.org/project/colorbox
128
- [20]: http://drupal.org/project/js_injector
129
- [21]: http://drupal.org/project/twitter
130
- [22]: http://drupal.org/project/globalredirect
131
- [23]: http://drupal.org/project/xmlsitemap
132
- [24]: http://drupal.org/project/shortcode
133
- [25]: http://drupal.org/project/adsense
134
- [26]: http://drupal.org/project/location
135
- [27]: http://drupal.org/project/backup_migrate

+ 0
- 24
source/_posts/2012-03-10-remote-project-in-eclipse.md View File

@@ -1,24 +0,0 @@
1
----
2
-title: Remote projects in Eclipse
3
-author: Josh Habdas
4
-excerpt: Create a Remote Project in Eclipse using Remote Systems Explorer
5
-layout: post
6
-permalink: /remote-project-in-eclipse/
7
-comments: true
8
-categories:
9
-  - tutorials
10
-tags:
11
-  - eclipse
12
-  - editors
13
-format: aside
14
----
15
-Remote projects in Eclipse can be a great way of managing websites from thin clients and sites with existing backup processes in place. To create a remote project use RSE to establish a new connection using one of the available connection types, such as SSH. (Note: SSH may need to be explicitly enabled via the site's web hosting control panel to function correctly with Eclipse.) Once a remote connection is established successfully, open up the Remote Systems view and drill down into the site via the tree view control. Find the the folder containing your desired project starting point, open its context menu and choose the Create Remote Project option to create a new remote project in Eclipse.
16
-
17
-Once the remote project is finished syncing, it will appear in the Project and Package Explorer views. Opening the context menu for a remote project from one of the Explorer views will bring up additional options, such as project type configuration. The same menu also provides easy access to the Remote Systems view, helpful for file transfers.
18
-
19
-Visit the [Target Management][1] page at [Eclipse.org][2] to learn more.
20
-
21
- *[RSE]: Remote Systems Explorer
22
-
23
- [1]: http://www.eclipse.org/tm/
24
- [2]: http://www.eclipse.org/

+ 0
- 37
source/_posts/2012-04-14-on-touch-events-mobile-web-app-usability.md View File

@@ -1,37 +0,0 @@
1
----
2
-title: On touch events and mobile web app usability
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /on-touch-events-mobile-web-app-usability/
6
-comments: true
7
-categories:
8
-  - opinion
9
-tags:
10
-  - mobile
11
-  - progressive enhancement
12
-  - javascript
13
-  - responsive
14
-  - usability
15
----
16
-I recently heard a talk from Peter-Paul Koch of [QuirksMode][1] on the touch events in mobile. During the presentation PPK gave us a great sound bite to use when dealing with the *300ms delay* many touch devices today use for capturing double-tap (zoom) events, which he called "stick with click". Under "stick with click" developers are discouraged from hijacking `ontouchstart` in an attempt to make click events occur without a noticeable delay. Though a good rule of thumb, I view it as more of a best practice rather than a hard-and-fast rule. And here's why…
17
-
18
-<!--more-->
19
-
20
-When considering perceived latency in a UI, it's logical to first think about the the long-standing guidelines on [Response Time Limits][2] by usability guru Jakob Nielsen, two of which are applicable with regard to two-tap zooming:
21
-
22
-*   **0.1 second** is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.
23
-*   **1.0 second** is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.
24
-
25
-Three-hundred millis is three times greater than the ideal response time, which, in some user interfaces, could be too slow and cause frustration for users. The Google Voice mobile webapp ran into a similar challenge over a year ago and crafted a [Fast Button workaround][3] using some creative event handling a method they called "busting ghost clicks", which allows click handlers to be used in conjunction with touch events.
26
-
27
-A caveat to rejigging the event handling, however, is that zooming should be disabled entirely. If it is not, double-taps on the so-called Fast Button would not behave as mobile web users have come to expect, leading to a less awesome user experience. And though the Google workaround compensates for buttons, working with more complex controls and widgets or multi-touch gestures is likely to dredge up some painful and time-devouring edge cases to handle.
28
-
29
-Nevertheless, recent advocacy for [Mobile First][4] (thanks Luke W) and [Responsive Web Design][5] seem to play well with the Fast Button workaround by making it possible to build a mobile web application that with a display adjusts intelligently to the viewport and with which zooming a page is not required.
30
-
31
-In summary, the 300ms delay used in mobile devices for double-tap detection is three times greater than the ideal 100ms (or shorter!) delay in a UI and, though Google has a nice workaround it should only be used with caution, and only in mobile web apps that do not allow page zooming. And when you find yourself doing a lot of event handling on your own and wonder if there's a better way, consider "stick with click".
32
-
33
- [1]: http://quirksmode.org/
34
- [2]: http://www.useit.com/papers/responsetime.html
35
- [3]: http://code.google.com/mobile/articles/fast_buttons.html
36
- [4]: http://www.abookapart.com/products/mobile-first
37
- [5]: http://www.alistapart.com/articles/responsive-web-design/

+ 0
- 35
source/_posts/2012-08-13-emulating-ie-with-virtualbox.md View File

@@ -1,35 +0,0 @@
1
----
2
-title: Emulating IE with VirtualBox
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /emulating-ie-with-virtualbox/
6
-comments: true
7
-categories:
8
-  - debugging
9
-tags:
10
-  - browser compatibility
11
-  - emulators
12
-  - testing
13
-  - virtualbox
14
-  - vm
15
-  - windows
16
----
17
-Looking for a new solution to the old IE compatibility testing conundrum today and chanced across this nifty solution for VirtualBox: <http://xdissent.github.com/ievms/>.
18
-
19
-<!--more-->
20
-
21
-Using cURL and a few simple commands you can download, extract *and* install Internet Explorer 6-9 VMs in one shot. But you must be patient as the downloads can take a while. Depending on the version of IE installed, VMs range from around 2GB to 5GB or more. The cURL script handles all of the downloading, as shown:
22
-
23
-![Patience tested as bits of the IE virtual image archive are assimilated.](../assets/curlin-ievms-e1345009175500.png)
24
-
25
-Once a VM is downloaded and extracted by the script, it is installed in VirtualBox automatically. Start the virtual machine to begin booting into Windows, as shown:
26
-
27
-![Not quite there yet… Patience young grasshopper.](../assets/ie6-loading-e1345009231635.png)
28
-
29
-Once Windows boots, login to the provided user account with the password **Password1**. Once logged into the user account, install the Guest Additions and then reboot to ensure the VM is working top shape. (Note: Some browsers, like IE6 require additional installation steps. See the [ievms script doc][1] for more detailed instructions.) Once finished, you can get reacquainted with an old friend, as shown:
30
-
31
-![Success. Where do you want to go today?](../assets/ie6-emulated-e1345009017851.png)
32
-
33
-**UPDATE (2014-02-01):** The IEVMs script now supports IE 10 and 11, and newer versions no longer require a password is entered to boot into the guest OS.
34
-
35
- [1]: http://xdissent.github.com/ievms/

+ 0
- 59
source/_posts/2013-02-16-amp-up-coffeescript-coding-sublime-text.md View File

@@ -1,59 +0,0 @@
1
----
2
-title: Amp up CoffeeScript coding with Sublime Text
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /amp-up-coffeescript-coding-sublime-text/
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - css
11
-  - debugging
12
-  - git
13
-  - github
14
-  - ide
15
-  - javascript
16
-  - coffeescript
17
-  - programming
18
-  - version control
19
-  - editors
20
----
21
-Sublime Text with [CoffeeScript][1] is a JavaScript developer's dream, but one that doesn't evaporate in the fog of sleep shortly after waking. After learning about Sublime Text at Fluent Conf 2012 during a [plenary talk by Paul Irish][2], I immediately began looking for ways to incorporate it into my workflow. And now, after having used it for over 8 months in my day-to-day work, I wanted to share a quick primer for those who want to amp up CoffeeScript coding with Sublime Text too.
22
-
23
-<!--more-->
24
-
25
-But first thing's first, go and [download Sublime Text][3]. The app is nagware until you purchase a license and register it, which I ended up doing after a couple of months of periodic and persistant annoyance (and, of course, once I realized how utterly awesome Sublime Text was). The licences are per-user, and not per-machine, meaning that users can purchase the app once and enjoy it on multiple machines using the same license. It almost feel's like [pirating][4]--but it's not.
26
-
27
-![Registered version of Sublime Text 2 running under Windows 8](../assets/st2.png)
28
-
29
-In the above image we have a CoffeeScript file open, but all the code visible in the editor appears in a chilling bone white. How is that going to amp up coding speed? Simple: it's not. So next step is to install some syntax highlighters and, while at it, some other useful packages as well.
30
-
31
-> By default, Sublime Text does not come with support for CoffeeScript.
32
-  
33
-To install the CoffeeScript syntax highlighter and other packages in Sublime Text with ease, we're gonna need a package manager. Fortunately, there's already one available, appropriately named <a href="http://wbond.net/sublime_packages/package_control">Sublime Package Control</a>. Go ahead and install that now.
34
-
35
-With the package manager installed, use it to install the <a href="https://github.com/Xavura/CoffeeScript-Sublime-Plugin">CoffeeScript</a> package if using ST2 or [Sublime Better CoffeeScript](https://github.com/aponxi/sublime-better-coffeescript) for ST3. Once installed successfully, CoffeeScript files (those ending in the `.coffee` extension) opened after the package is installed will begin appearing with syntax highlighting, like magic.
36
-  
37
-![Sublime Text 2 showing CoffeeScript syntax highlighting](../assets/st2-coffee_hilight.png)
38
-    
39
-Syntax highlighting isn't the only thing the CoffeeScript package does. It also provides a number of convenience code snippets and other facilities to help make working with CoffeeScript easy peasy. But one thing the CoffeeScript add-on for Sublime Text doesn't do is static code analysis such as linting. However, with Sublime Package Control, adding linting capabilities for CoffeeScript, as well as many other popular languages, is as easy as a few keystrokes and the installation of the <a href="https://github.com/SublimeLinter/SublimeLinter">SublimeLinter</a>. And presto! Now all you have to worry about for the most part are logic errors and workflow snafus. Unfortunately, the only known method for coping with those that I'm aware of are experience, a curious mind and constant experimentation to find what works best for you.
40
-
41
-In summary, this primer has shown how to use a combination of tools to amp up CoffeeScript coding with Sublime Text for a better, faster and easier coding experience. The article covered installation of Sublime Text and Sublime Package Control, as well as two packages to help streamline CoffeeScript coding. Now, when the JS developer wakes up, they'll be dreaming up the next innovative web application rather than the tools needed to build it.
42
-
43
-## Related Sublime packages to try
44
-
45
-- [js2coffee](https://github.com/rstacruz/js2coffee) can be used to convert existing JavaScript files
46
-- [CoffeeCompile](https://github.com/surjikal/sublime-coffee-compile) allows you to compile some or all of your CoffeeScript
47
-
48
-## Other Sublime bundles worth checking out
49
-
50
-- [Git](https://github.com/kemayo/sublime-text-2-git) enables easy code management using the Git DCVS
51
-- [Stack Overflow](https://github.com/ericmartel/Sublime-Text-2-Stackoverflow-Plugin) allows quick knowledge base searches from within the editor
52
-- [Stylus](https://github.com/billymoon/Stylus), [LESS](https://github.com/danro/LESS-sublime) and [Sass](https://github.com/nathos/sass-textmate-bundle) provide CSS preprocessor support as needed
53
-- [Handlebars](https://github.com/daaain/Handlebars) adds syntax highlighting and tab triggers for commonly used block helpers
54
-- [Tag](https://github.com/SublimeText/Tag) helps facilitate writing HTML
55
-
56
- [1]: http://coffeescript.org/
57
- [2]: http://www.youtube.com/watch?v=f7AU2Ozu8eo
58
- [3]: http://www.sublimetext.com/download
59
- [4]: http://xkcd.com/553/

+ 0
- 35
source/_posts/2013-02-26-holy-grail-rich-internet-applications.md View File

@@ -1,35 +0,0 @@
1
----
2
-title: The Holy Grail of Rich Internet Applications
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /holy-grail-rich-internet-applications/
6
-comments: true
7
-categories:
8
-  - opinion
9
-tags:
10
-  - accessibility
11
-  - amd
12
-  - html
13
-  - patterns
14
-  - programming
15
-  - javascript
16
-  - ria
17
-  - seo
18
-  - progressive enhancement
19
-format: aside
20
----
21
-One of the largest perceived drawbacks to creating a SPA or other Rich Internet Application is that they're not SEO friendly or very accessible. With the advent of technologies such as ARIA, HTML5 and Node.js, things are changing. Web apps are becoming more usable and accessible, though also making them crawlable and highly performant is a formidable challenge. To solve this problem I for one am behind [Derick Bailey's approach][1] for using HTML5 pushState and PE to achieve SEO and accessibility. After all, the hashbang method suggested by Google has a major problem: [the URLs are not semantic][2].
22
-
23
-It seems as though I'm not alone in my belief that [Progressive Enhancement][3] is possible in a single-page application, and the following article by Airbnb points toward the fact that they were able to achieve PE in a RIA using a technique they're calling *The Holy Grail*. Under the approach, and per my understanding, content is rendered server-side first using both the same templating logic, routes and models, served up to the user agent, and then progressively enhanced afterwards with JavaScript.
24
-
25
-A successful quest for The Holy Grail should yield a fully-crawlable Rich Internet Application with phenomenal "time to content" that doesn't tax crawlers with ajax and will function in most any browser, even with JavaScript disabled.
26
-
27
-Check out the [Airbnb article][4] referenced, which depicts the Holy Grail in a linked image, and ask yourself if you're drinking from the right cup. You must choose, but choose wisely.
28
-
29
- *[SPA]: Single-Page Application
30
- *[PE]: Progressive Enhancement
31
-
32
- [1]: http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/
33
- [2]: http://danwebb.net/2011/5/28/it-is-about-the-hashbangs
34
- [3]: http://alistapart.com/article/understandingprogressiveenhancement
35
- [4]: http://nerds.airbnb.com/weve-launched-our-first-nodejs-app-to-product

+ 0
- 52
source/_posts/2013-03-09-movies-on-the-cheap-with-vudu-in-home-disc-to-digital.md View File

@@ -1,52 +0,0 @@
1
----
2
-title: Movies on the cheap with VUDU In Home Disc to Digital
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /movies-on-the-cheap-with-vudu-in-home-disc-to-digital/
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - cinephile
11
-  - thrifty
12
-  - movies
13
----
14
-As I [mentioned][1] in late January, VUDU users now have the ability to upgrade their existing DVDs to HDX for $5 and stream them right at home. But I wanted to unpack this statement a little for those not on the Twitters and those who have not used VUDU or UltraViolet before. This information will be most useful to value-conscious consumers who already have DVD collections and are in the process of or have already purchased high-definition Internet TVs for their homes.
15
-
16
-<!--more-->
17
-
18
-## The value proposition
19
-
20
-Individuals can start convert their existing DVD disc collections to 1080p HDX high-defintion digital format for a nominal fee, and stream the converted movies to their televisions and other devices using an internet connection. The current cost for conversion for DVDs is **$2 per movie or $5 for a 1080p upgrade**, and $2 for Blu-ray to HDX.
21
-
22
-Moving to digital streaming unlocks some long-awaited advantages for thrifty cinephiles, including:
23
-
24
-*   Ability to own 1080p HDX movies without spending a lot of extra money.
25
-*   Stream movies instantly on many devices without need for an attached disc player.
26
-
27
-## Getting started
28
-
29
-To get started you'll need accounts with [VUDU][2] and [UltraViolet][3]; a computer with a DVD-ROM and [VUDU In Home Disc to Digital][4] (currently in beta); a 10mbps internet connection; and, for course, a credit card.
30
-
31
-## Converting movies
32
-
33
-To convert a movie in seconds from home simply grab a disc from your video collection, feed it into a DVD-ROM and use the Disc To Digital feature of [VUDU To Go][4] app to pay for the conversion. The entire process takes only seconds, and the movie will be instantly available to stream once complete.
34
-
35
-![Screenshot showing a $5 DVD to HDX video conversion using VUDU To Go BETA](../assets/vudu2go-darko.png)
36
-
37
-While not all movies can be converted, the amount of supported movies has been growing.
38
-
39
-## Watching movies
40
-
41
-View movies added to the UltraViolet cloud using any compatible device or application; such as VUDU on a Smart TV, set-top box or game console, or from other UV supporting applications and devices. For more information, checkout the [UltraViolet][3] and [VUDU][2] websites.
42
-
43
-## Movies on the cheap
44
-
45
-As the Blu-ray revolution has occurred, the price of DVDs has been driven down significantly. Consider purchasing used DVDs and then converting them with the HDX upgrade. Flea markets are a great place to find used DVDs. And the bargain bins at stores like FYE, Walmart and Best Buy are great places to look as well. <a href="https://twitter.com/UVVU/status/311992215327100928">According to UltraViolet</a>, to ensure the film can be converted just search vudu.com and look for the UV icon.
46
-
47
- [1]: https://twitter.com/jhabdas/status/297194375539224576
48
- [2]: http://www.vudu.com
49
- [3]: http://www.uvvu.com
50
- [4]: http://www.vudu.com/in_home_disc_to_digital.html
51
-
52
- *[HDX]: High Definition eXperience

+ 0
- 17
source/_posts/2013-03-19-using-promises-for-non-ajax-asynchronous-callbacks-in-javascript.md View File

@@ -1,17 +0,0 @@
1
----
2
-title: Using promises for non-ajax asynchronous callbacks in JavaScript
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /using-promises-for-non-ajax-asynchronous-callbacks-in-javascript/
6
-comments: true
7
-categories:
8
-  - reference
9
-tags:
10
-  - ajax
11
-  - javascript
12
-  - debugging
13
-  - programming
14
-  - patterns
15
-format: link
16
----
17
-After recently falling prey (again) to the immediate execution of a counter-based timing function used to execute a non-Ajax asynchronous callback method in JS, I wanted to share this very useful article I stumbled upon while looking for an approach that would meet my needs: <http://sporto.github.com/blog/2012/12/09/callbacks-listeners-promises/>

+ 0
- 99
source/_posts/2013-03-24-host-websites-cloud-10-minutes.md View File

@@ -1,99 +0,0 @@
1
----
2
-author: Josh Habdas
3
-layout: post
4
-title: Host websites in the cloud in 10 minutes
5
-permalink: "/host-websites-cloud-10-minutes/"
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - cloud
11
-  - hosting
12
-  - web
13
-  - webmaster
14
-published: true
15
----
16
-
17
-Hosting companies Bluehost and Dreamhost offer simple, one-click installation of popular blogging platforms like WordPress, Drupal and Joomla. The affordable hosting plans offered are low-cost, but you tend to get what you pay for: shoddy up-time and slow server responses. What would our hero Mario do about this? I'm thinking he'd <a href="http://features.peta.org/mario-kills-tanooki/" rel="nofollow">Tanooki suit up</a>, make a mad dash and fly to the first cloud he found. And that's what this post is all about. Read on to learn how to host a website in the cloud in 10 minutes. It may not be as simple as 1-click hosting, but it'll almost certainly be faster. And you'll earn some geek cred for doing something complicated to do something simple.
18
-
19
-<!--more-->
20
-
21
-## Getting started
22
-
23
-To get started, [create an AWS account][1]. From there, you'll be able to create virtual machine instances from the [EC2 dashboard][2] – just **Launch Instance** and follow the wizard. For my instance, I used 64-bit Ubuntu Server 12.04.1 LTS.
24
-
25
-Once the instance is up, **configure the security group** to enable TCP traffic over port 22 (SSH) and port 80 (HTTP), and generate and share a SSH key pair for secure connections to the instance.
26
-
27
-Windows users can use PuTTY to connect to the instance over SSH using the [guide provided by Amazon][3]. The method provided requires that PuTTYgen is used to convert the PEM private key format to the PPK format used by PuTTY.
28
-
29
-## Host websites in the cloud
30
-
31
-Once the instance is created and configured to accept SSH and HTTP traffic, it can be used to run a web server so that it can receive web traffic. Follow the steps here to shell into the instance using its public DNS, and install and run a scalable web server called Nginx:
32
-
33
-<pre>ssh -l ubuntu ec2-54-244-194-251.us-west-2.compute.amazonaws.com
34
-sudo apt-get update
35
-sudo apt-get install nginx
36
-sudo service nginx start</pre>
37
-
38
-For Amazon AMI instances, login with the username `ec2-user` and not `ubuntu`. And use `yum` instead of `apt-get`. Additionally, the command needed to start Nginx may differ by environment.
39
-
40
-If [using Windows with PuTTY][3] to shell in, the first command above will not be necessary–though connections will still be required to authenticate with a username, as shown here:
41
-
42
-![Specifying the user to login as to PuTTY and authenticating using imported SSH key](../assets/aws-putty.png)
43
-  
44
-Once authenticated and the above commands executed, you can test that the web server service started successfully by curling the localhost from the bash prompt:
45
-  
46
-    curl localhost
47
-  
48
-If the web server is running, you'll receive a response similar to the following:
49
-
50
-```html  
51
-<html>
52
-<head>
53
-<title>Welcome to nginx!</title>
54
-</head>
55
-<body bgcolor="white" text="black">
56
-<center><h1>Welcome to nginx!</h1></center>
57
-</body>
58
-</html>
59
-```
60
-  
61
-Assuming the security groups were configured correctly, this is the same content that would be sent back to a browser if it were to hit the public DNS on port 80 (the default port for HTTP requests). Confirm this now by running the following command using the instance's public DNS provided in the EC2 dashboard:
62
-  
63
-    curl -v ec2-54-244-194-251.us-west-2.compute.amazonaws.com
64
-  
65
-The verbose flag will show some additional diagnostic information and will include the HTTP headers–useful for debugging.
66
-  
67
-If the server doesn't respond, ensure the Ubuntu instance and Nginx are both running, and the security group has been configured to allow traffic on port 80. If you're not able to `curl` the url, you can also try navigating to the public DNS using a web browser, as pictured here:
68
-  
69
-![Page served by Nginx webserver running on the Amazon Web Services cloud](../assets/aws-nginx.png)
70
-
71
-## Personalizing the content
72
-    
73
-Now that the website is hosted and functional, the content can be personalized. To personalize the content, **modify the `index.html` file** containing the HTML being served by Nginx to say something less boring.
74
-
75
-**Note:** <a href="http://www.vim.org/" rel="nofollow">Vim</a> will be used for this exercise, though some users may find <a href="http://www.nano-editor.org/" rel="nofollow">nano</a> easier to wrap their heads around.
76
-
77
-    sudo vim /usr/share/nginx/www/index.html
78
-
79
-Make some changes using the [Vim cheat sheet][4] for reference, and then save and exit Vim by pressing `Esc` followed by `:wq` and finally `Enter`.
80
-
81
-So long as no caching is being done, Nginx will respond with the personalized content the next time the page is retrieved. And that's all there is to host websites in the cloud.
82
-
83
-## Taking it to the next level
84
-
85
-Assuming static pages are old hat, consider using Nginx to do something a tad more interesting, such as hosting a dynamic webapp using one of the [Brunch.io Skeletons][5]. Of course, to do that you'll need to install a few more packages—and that, unfortunately, is going to take [a little longer than 10 minutes][6].
86
-
87
-## Keep your head in the clouds
88
-
89
-If you are using an affordable hosting solution like BlueHost or DreamHost, and looking to beef up performance and improve up-time without getting too complicated or going through too much effort, consider enabling a CDN like [CloudFlare][7]. Integrations can be set-up manually, or, in some cases, set up with a hosting company integration script. And depending on the amount of site traffic and CDN used, the service may come for free.
90
-
91
- [1]: https://portal.aws.amazon.com/gp/aws/developer/registration/
92
- [2]: https://console.aws.amazon.com/ec2/
93
- [3]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
94
- [4]: http://cheat.errtheblog.com/s/vim
95
- [5]: https://github.com/brunch/brunch/wiki/Skeletons
96
- [6]: http://developing-modern-web-applications-on-windows-vagrant/
97
- [7]: https://www.cloudflare.com/
98
-
99
- *[LTS]: Long-Term Support

+ 0
- 174
source/_posts/2013-04-01-sftp-to-ubuntu-server-sublime-text.md View File

@@ -1,174 +0,0 @@
1
----
2
-title: SFTP to Ubuntu server with Sublime Text
3
-author: Josh Habdas
4
-layout: post
5
-permalink: /sftp-to-ubuntu-server-sublime-text/
6
-comments: true
7
-categories:
8
-  - tutorials
9
-tags:
10
-  - cloud
11
-  - coding
12
-  - ssh
13
-  - ftp
14
-  - ftps
15
-  - sftp
16
-  - linux
17
-  - ubuntu  
18
----
19
-About a year ago I explained how to set-up a [remote project in Eclipse][1]. Since then I've ditched Eclipse in favor of Sublime Text. But, even with the cat's pajamas of modern code editors (that's Sublime), getting source files from development to production meant carrying around some extra baggage:
20
-
21
-*   A deployment process, often manual, or, if automated, tightly coupled with the application sources (zomg! oh n0s!!), must be created and followed.
22
-*   At least two environments, likely not running on the same platform, must be stood-up and carried: development and production.
23
-*   Windows users, who may not have a good method for developing for today's Linux-based hosting environments, are pretty much snowed from the get-go.
24
-
25
-I'm deliberately oversimplifying here for the sake of TL;DR, so let me get the point. If you're running a small site, are capable of failing fast and failing often, don't have a lot of code contributors or are for some reason stuck working on an IBM Aptiva with 16MB RAM upgrade, you can pretty much skip the pain points in the list above and just manage code directly on the web server remotely. How is that possible? Simple. SFTP to Ubuntu server with Sublime Text as explained in this article.
26
-
27
-<!--more-->
28
-
29
-## Gather your forces
30
-
31
-To SFTP to Ubuntu server with Sublime Text the following needed is:
32
-
33
-*   Sublime Text, of course. Google it, or or simply follow my [Sublime Text amp up tutorial][2].
34
-*   An Ubuntu micro instance with shared SSH key and Nginx running, all of which can be [set-up in about 10 minutes][3] using Amazon Web Services.
35
-*   [Sublime SFTP][4] package for Sublime Text.
36
-*   If you're running Windows \*sigh\*, you're also going to need [PuTTy][5].
37
-
38
-Please note that this article assumes use of Ubuntu Server 12.04.01 LTS and Sublime Text 2. Obviously these steps may differ slightly for alternate configurations and may not hold steady as the ground moves beneath them over time.
39
-
40
-## Choose a file transfer method
41
-
42
-For secure file transfers we're going to use SFTP (not to be confused with FTPS, which uses FTP over TLS/SSL), although the Sublime SFTP package supports both. FTP is not a good option in general as it sends passwords unencrypted over the wire. The choice to use SFTP over FTPS was based on the following factors:
43
-
44
-*   Using SFTP allows us to authenticate on the remote host using the same SSH key pair used for existing SSH connections, wereas FTPS requires passwords–though potentially encrypted over the wire–are stored unsecured in a plain text config file for use with the Sublime SFTP package.
45
-*   SFTP utilizes the existing OpenSSH server pre-installed on the Ubuntu Server micro instance on AWS, whereas FTPS requires a separate tool such as [vsftpd][6].
46
-*   Based on my research FTPS is becoming antiquated and has a number of other drawbacks when compared with SFTP. So there!
47
-
48
-## Configure the server
49
-
50
-In this section, we'll configure the Ubuntu server by adding a new user account and allowing it to receive SSH connections, and then modify the server's SSH configuration so that it'll accept SFTP connections over port 22.
51
-
52
-### Create new user account for SFTP connections
53
-
54
-While it may be possible to use an existing user account to perform SFTP, we'll be creating a new user account specifically for SFTP connections.
55
-
56
-Shell into the Ubuntu server using SSH as [explained previously][7] and issue the following commands in sequence, following any intermediary prompts presented, to create the new user account and add the authorized key for SSH logins:
57
-
58
-<pre>sudo adduser sftpuser
59
-sudo mkdir /home/sftpuser/.ssh
60
-sudo chown sftpuser:sftpuser /home/sftpuser/.ssh
61
-sudo cp /home/ubuntu/.ssh/authorized_keys /home/sftpuser/.ssh
62
-sudo chown sftpuser:sftpuser /home/sftpuser/.ssh/authorized_keys</pre>
63
-
64
-The above assumes the existing SSH-authorized user has the username **ubuntu**, from which we will borrow the authorized_keys file.
65
-
66
-### Confirm user account setup successful
67
-
68
-To verify the new user account was set-up successfully, simply try shelling into it with the new username. If it works, you can skip the user account confirmations and just go <a href="http://kotaku.com/latest-japanese-schoolgirl-trend-fake-dragon-ball-atta-460482170" rel="nofollow">hadoukening</a> or something.
69
-
70
-Otherwise, use the following commands to confirm things went as planned and debug common issues in creating the user account. Each command will be *followed* by an explanation of what it does and how to verify it worked.
71
-
72
-    ll /home/sftpuser
73
-
74
-**Lists directory contents with permissions, like `ls -al`.** Use it to confirm the new user's home directory has been created and that the .ssh subdirectory has the same ownership as other subdirectories within, e.g.
75
-
76
-`drwxr-xr-x 2 sftpuser sftpuser 4096 Mar 31 23:26 .ssh/` 
77
-
78
-    ll /home/sftpuser/.ssh/
79
-
80
-**Lists directory contents with permissions, like `ls -al`.** Use it to confirm the new user's .ssh subdirectory contains a file called authorized\_keys, the authorized\_keys file is contains the same ownership as the .ssh directory and the permissions are set properly, e.g.
81
-
82
-`-rw----- 1 sftpuser sftpuser  385 Mar 31 23:26 authorized_keys`
83
-
84
-    sudo cat /home/sftpuser/.ssh/authorized_keys /home/ubuntu/.ssh/authorized_keys
85
-
86
-**Concatenates and outputs the contents of two files.** Use it to confirm the authorzed_keys file under the sftpuser home directory contains the same data as the file by the same name under the ubuntu directory (based on configuration assumption, above).
87
-
88
-    sudo grep -i "sftpuser" /etc/shadow | awk -F':' '{ print $2 }'
89
-
90
-**Outputs the hash of the password for a specified user.** Use it to confirm the password is set (i.e. longer than a single character) as SSH and SFTP authentication may not work without it.
91
-
92
-### Modify the SSH server configuration
93
-
94
-I'm going to borrow some of these instructions from <a href="http://about.me/bengarrett" rel="nofollow">Ben Garrett</a>, who admittedly borrowed them from [Mark Van den Borre][8]. I have chosen not to link the specific articles here so as not to let my readers meander into the unknown, because neither of those articles worked for this use case without further experimentation.
95
-
96
-Backup and modify the SSH server configuration file, setting the cursor to line 76 of the file:
97
-
98
-    sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
99
-    sudo nano +76 /etc/ssh/sshd_config
100
-
101
-Comment out the line shown below, and add the specified line below it:
102
-
103
-```sh sshd_config
104
-#Subsystem sftp /usr/lib/openssh/sftp-server
105
-Subsystem sftp internal-sftp
106
-```
107
-
108
-Add the following to the bottom of the file, save and exit:
109
-
110
-```sh sshd_config
111
-# Custom for SFTP connections
112
-Match group sftpuser
113
-    ChrootDirectory /usr/share/nginx/www
114
-    X11Forwarding no
115
-    AllowTcpForwarding no
116
-    ForceCommand internal-sftp
117
-```
118
-
119
-The above will set-up some basic security. It creates a match group set to the name of the group that was created earlier when the user account was added. It also jails users in the group to a specific `ChrootDirectory` directory–in this case to the web root for Nginx, which can vary by system.
120
-
121
-Once complete, restart the SSH server service to apply the configuration changes: