xonecas.io
2495
Xg

xonecas.github.com / commit 36fcafc

poole?

rbdev2013-12-30 36fcafc82c70ab8426b7a2ed5789e9385e43faac parent c258f7a

55 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

404.html+9−0
@@ -0,0 +1,9 @@
1+---
2+layout: default
3+title: "404: Page not found"
4+---
5+
6+<div class="page">
7+ <h1 class="page-title">404: Page not found</h1>
8+ <p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="/">Head back home</a> to try finding it again.</p>
9+</div>
CNAME+1−0
@@ -0,0 +1 @@
1+getpoole.com
LICENSE.md+9−0
@@ -0,0 +1,9 @@
1+# Released under MIT License
2+
3+Copyright (c) 2013 Mark Otto.
4+
5+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
README.markdown+0−1
@@ -1 +0,0 @@
1-My Jekyll based blog hosted at xonecas.github.com
README.md+82−0
@@ -0,0 +1,82 @@
1+# Poole
2+
3+In the novel, *The Strange Case of Dr. Jeykll and Mr. Hyde*, Mr. Poole is Dr. Jekyll's virtuous and loyal butler. Similarly, Poole serves as an upstanding and effective foundation for Jekyll themes by [@mdo](https://twitter.com/mdo).
4+
5+There are currently two themes built on Poole:
6+
7+* [Hyde](http://hyde.getpoole.com)
8+* [Lanyon](http://lanyon.getpoole.com)
9+
10+
11+## Usage
12+
13+### 1. Install Jekyll
14+
15+Poole is built for use with Jekyll, so naturally you'll need to install that. On Macs, it's rather straightforward:
16+
17+```bash
18+$ gem install jekyll
19+```
20+
21+**Windows users:** Windows users have a bit more work to do, but luckily [@juthilo](https://github.com/juthilo) has your back with his [Run Jekyll on Windows](https://github.com/juthilo/run-jekyll-on-windows) guide.
22+
23+You may also need to install Pygments, the Python syntax highlighter for code snippets that plays nicely with Jekyll. Read more about this [in the Jekyll docs](http://jekyllrb.com/docs/templates/#code_snippet_highlighting).
24+
25+### 2a. Quick start
26+
27+To help anyone with any level of familiarity with Jekyll quickly get started, Poole includes everything you need for a basic Jekyll site. To that end, just download Poole and start up Jekyll.
28+
29+### 2b. Roll your own Jekyll site
30+
31+Folks wishing to use Jekyll's templates and styles can do so with a little bit of manual labor. Download Poole and then copy what you need (likely `_layouts/`, `*.html` files, `atom.xml` for RSS, and `public/` for CSS, JS, etc.).
32+
33+### 3. Running locally
34+
35+To see your Jekyll site with Poole applied, start a Jekyll server. In Terminal, from `/Poole` (or whatever your Jekyll site's root directory is named):
36+
37+```bash
38+$ jekyll serve
39+```
40+
41+Open <http://localhost:4000> in your browser, and voilà. You're done.
42+
43+
44+## Options
45+
46+Poole includes some customizable options, typically applied via classes on the `<body>` element.
47+
48+
49+### Rems, `font-size`, and scaling
50+
51+Poole is built almost entirely with `rem`s (instead of pixels like Hyde 1.1.x). `rem`s are like `em`s, but instead of building on the immediate parent's `font-size`, they build on the root element, `<html>`.
52+
53+By default, we use the following:
54+
55+```css
56+html {
57+ font-size: 16px;
58+ line-height: 1.5;
59+}
60+@media (min-width: 48rem) { /* ~768px */
61+ html {
62+ font-size: 20px;
63+ }
64+}
65+
66+```
67+
68+To easily scale your site's typography and components, simply customize the base `font-size`s here.
69+
70+
71+## Author
72+
73+**Mark Otto**
74+<https://github.com/mdo>
75+<https://twitter.com/mdo>
76+
77+
78+## License
79+
80+Open sourced under the [MIT license](LICENSE.md).
81+
82+<3
_config.yml+24−1
@@ -1 +1,24 @@
1-pygments: true
1+# Dependencies
2+markdown: rdiscount
3+pygments: true
4+
5+# Permalinks
6+permalink: pretty
7+
8+# Setup
9+title: Poole
10+tagline: 'The Jekyll butler'
11+description: 'Base theme for Jekyll themes by @mdo.'
12+url: http://getpoole.com
13+
14+author:
15+ name: 'Mark Otto'
16+ url: https://twitter.com/mdo
17+
18+paginate: 5
19+
20+# Custom vars
21+version: 1.0.0
22+
23+github:
24+ repo: https://github.com/poole
_includes/about.markdown+0−4
@@ -1,4 +0,0 @@
1-
2-Sean is a web developer and very enthusiastic about the web as a platform. Right now he is a very happy engineer over at [redbeacon.com](http://redbeacon.com/) and spending his free time is some secret project.
3-
4-Who am I? Sean's robot of course, he is using [jekyll](http://jekyllrb.com/) to power me.
_includes/analytics.html+0−13
@@ -1,13 +0,0 @@
1-<script type="text/javascript">
2-
3- var _gaq = _gaq || [];
4- _gaq.push(['_setAccount', 'UA-38882692-1']);
5- _gaq.push(['_trackPageview']);
6-
7- (function() {
8- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
9- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
10- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
11- })();
12-
13-</script>
_includes/blyve.markdown+0−1
@@ -1 +0,0 @@
1-blyve.
_includes/buttons.html+0−10
@@ -1,10 +0,0 @@
1-<!-- github -->
2-<div>
3- <iframe src="http://ghbtns.com/github-btn.html?user=xonecas&type=follow&count=false" allowtransparency="true" frameborder="0" scrolling="0" width="250" height="30"></iframe>
4-</div>
5-<!-- twitter -->
6-<div>
7- <a href="https://twitter.com/xonecas" class="twitter-follow-button" data-show-count="false" data-dnt="true">Follow @xonecas</a>
8- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
9-</div>
10-
_includes/disqus.html+0−14
@@ -1,14 +0,0 @@
1-<div id="disqus_thread"></div>
2-<script type="text/javascript">
3- /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
4- var disqus_shortname = 'xonecas'; // required: replace example with your forum shortname
5-
6- /* * * DON'T EDIT BELOW THIS LINE * * */
7- (function() {
8- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
9- dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
10- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11- })();
12-</script>
13-<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
14-<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
_includes/edshelf.markdown+0−3
@@ -1,3 +0,0 @@
1-#### Full stack engineer / architech
2-
3-At edshelf I was brought in to satisfy the need to have a full stack engineer, fit to work with both nodejs and client side technologies. Since then we have build a performant node server based on the express framework and a complete user interface based on [ Twitter's Bootstrap ](http://twitter.github.com/bootstrap/index.html) and [ Yahoo!'s YUI3 ](http://yuilibrary.com/projects/yui3/).
_includes/gsnap.markdown+0−1
@@ -1 +0,0 @@
1-gsnap.
_includes/head.html+28−0
@@ -0,0 +1,28 @@
1+<head>
2+ <link href="http://gmpg.org/xfn/11" rel="profile">
3+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
4+
5+ <!-- Enable responsiveness on mobile devices-->
6+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
7+
8+ <title>
9+ {% if page.title %}
10+ {{ page.title }}
11+ {% else %}
12+ {{ site.title }}
13+ {% endif %}
14+ &middot; {{ site.tagline }}
15+ </title>
16+
17+ <!-- CSS -->
18+ <link rel="stylesheet" href="/public/css/poole.css">
19+ <link rel="stylesheet" href="/public/css/syntax.css">
20+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700">
21+
22+ <!-- Icons -->
23+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-144-precomposed.png">
24+ <link rel="shortcut icon" href="/public/favicon.ico">
25+
26+ <!-- RSS -->
27+ <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
28+</head>
_includes/sidebar.html+0−18
@@ -1,18 +0,0 @@
1-<div>
2- <div>
3- <a href="//www.gravatar.com/avatar/9ae495ba55b662af127e43af7296dc5e.png"
4- target="_blank" title="╯°□°)╯︵ ┻━┻">
5- <img class="pull-left avatar"
6- alt="Sean Caetano Martin's profile picture"
7- src="//www.gravatar.com/avatar/9ae495ba55b662af127e43af7296dc5e.png">
8- </a>
9- <h1>
10- <a href="/"></a>
11- </h1>
12- </div>
13- <div class="muted">
14- {% capture about %}{% include about.markdown %}{% endcapture %}
15- {{ about | markdownify }}
16- {% include buttons.html %}
17- </div>
18-</div>
_layouts/default.html+24−14
@@ -1,16 +1,26 @@
1-<!doctype html>
2-<html lang="en">
3- <head>
4- <title>Sean Caetano Martin</title>
5- <meta charset="utf-8">
6- <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
7- <link href="/css/native.css" rel="stylesheet">
8- <link href='http://fonts.googleapis.com/css?family=Bitter:400,700,400italic' rel='stylesheet' type='text/css'>
9- <link href="/css/style.css" rel="stylesheet">
10- </head>
11- <div class="container-fluid">
12- {{ content }}
1+<!DOCTYPE html>
2+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
3+
4+ {% include head.html %}
5+
6+ <body>
7+
8+ <div class="container content">
9+ <div class="masthead">
10+ <h3 class="masthead-title">
11+ <a href="/" title="Home">{{ site.title }}</a>
12+ <small>{{ site.tagline }}</small>
13+ </h3>
14+ </div>
15+
16+ {{ content }}
17+
18+ <div class="footer">
19+ <p>
20+ &copy; {{ site.time | date: '%Y' }}. All rights reserved.
21+ </p>
22+ </div>
1323 </div>
14- {% include analytics.html %}
15- </body>
24+
25+ </body>
1626 </html>
_layouts/page.html+8−0
@@ -0,0 +1,8 @@
1+---
2+layout: default
3+---
4+
5+<div class="page">
6+ <h1 class="page-title">{{ page.title }}</h1>
7+ {{ content }}
8+</div>
_layouts/post.html+20−27
@@ -1,32 +1,25 @@
11 ---
22 layout: default
33 ---
4+
45 <div class="post">
5- <div class="hero-unit banner">
6- <a class="pull-right text-right" href="/">
7- Front page
8- <img class="img-circle img-polaroid" src="//2.gravatar.com/avatar/9ae495ba55b662af127e43af7296dc5e?size=32" width=32 alt="My handsome self." title="╯°□°)╯︵ ┻━┻">
9- </a>
10- {{ content }}
11- </div>
12- <div class="row-fluid">
13- <div class="offset2 span6">
14- {% include disqus.html %}
15- </div>
16- <div class="span2">
17- <h3>Related</h3>
18- <ul class="nav nav-tabs nav-stacked">
19- {% for post in site.related_posts limit:3 %}
20- <li>
21- <a href="{{ post.url }}">
22- <strong>{{ post.title }}</strong><br>
23- <small class="muted">
24- {{ post.date | date_to_string }}
25- </small>
26- </a>
27- </li>
28- {% endfor %}
29- </ul>
30- </div>
31- </div>
6+ <h1 class="post-title">{{ page.title }}</h1>
7+ <span class="post-date">{{ page.date | date_to_string }}</span>
8+ {{ content }}
9+</div>
10+
11+<div class="related">
12+ <h2>Related Posts</h2>
13+ <ul class="related-posts">
14+ {% for post in site.related_posts limit:3 %}
15+ <li>
16+ <h3>
17+ <a href="{{ post.url }}">
18+ {{ post.title }}
19+ <small>{{ post.date | date_to_string }}</small>
20+ </a>
21+ </h3>
22+ </li>
23+ {% endfor %}
24+ </ul>
3225 </div>
_posts/2011-07-19-creativejs.com-three.js-tutorial.markdown+2−8
@@ -1,14 +1,8 @@
11 ---
22 layout: post
3+title: CreativeJS - Three.js Tutorial
34 ---
45
5-Creativejs - Three.js tutorial
6-------------------------------
7-
8-San Jose, Aug 19, 2011
9-
10-I completed [this](http://creativejs.com/tutorials/three-js-part-1-make-a-star-field/) tutorial. You can see the end result [here](//xonecas.com/creativejs-threejs-part1/), although it has been modified because I did my homework.
11-
12-At the end of the tutorial Seb challenges everyone to do some exercises (homework): change the direction, shape, color and angle of the particles.
6+I completed [this](http://creativejs.com/tutorials/three-js-part-1-make-a-star-field/) tutorial. At the end of the tutorial Seb challenges everyone to do some exercises (homework): change the direction, shape, color and angle of the particles.
137
148 For a deeper look on what is going on there, check out the [Github repo](https://github.com/xonecas/creativejs-threejs-part1). The evolution of the code is neatly organized with (git) tags.
_posts/2011-07-20-fractal-tree.markdown+1−5
@@ -1,10 +1,6 @@
11 ---
22 layout: post
3+title: Fractal Tree
34 ---
45
5-Fractal tree
6-------------
7-
8-San Jose, Aug 20, 2011
9-
106 Credits go to [Christian Heilmann](http://twitter.com/codepo8) for making the [original](http://t.co/NcEGMRd). I made [this](//xonecas.github.com/fractal-tree) to learn how he did the tree, and to play around with Twitter Bootstrap and smoke.js.
_posts/2011-09-19-binary-search-twitter-size.markdown+7−9
@@ -1,13 +1,9 @@
11 ---
22 layout: post
3+title: Binary Searchy in less than 140 characters.
34 ---
45
5-Binary Search, Twitter size
6----------------------------
7-
8-San Jose, Aug 20, 2011
9-
10-`function f(a,v,l,h){var m;return hv ? f(a,v,l, m-1): a[m] &lt; v ? f(a,v,m+1,h): m; }`
6+`function f(a,v,l,h){var m;return h<l ? !-1: a[(m=~~(l+(h-l)/2))]>v ? f(a,v,l, m-1): a[m] < v ? f(a,v,m+1,h): m; }`
117
128 And it works too!
139
@@ -18,18 +14,20 @@ Here's the **clean** implementation:
1814 {% highlight javascript %}
1915 function fn (a, v, l, h) {
2016 var m;
21- if (h &lt; l) {
17+ if (h < l) {
2218 return false;
2319 }
2420
2521 m = Math.floor(l + (h - l) / 2);
2622
27- if (a[m] &gt; v) {
23+ if (a[m] > v) {
2824 return fn(a, v, l, m-1);
29- } else if (a[m] &lt; v) {
25+ } else if (a[m] < v) {
3026 return fn(a, v, m+1, h);
3127 } else {
3228 return m;
3329 }
3430 }
3531 {% endhighlight %}
32+
33+**UPDATE**: It was pointed out to me that I could have saved another character by using `!1` instead of using `!-1`
_posts/2012-06-25-a-little-chrome-app.markdown+1−5
@@ -1,12 +1,8 @@
11 ---
22 layout: post
3+title: An example Chrome app
34 ---
45
5-A little Chrome app
6--------------------
7-
8-San Jose, Jul 6, 2012
9-
106 I've been using [Backbone.js](http://documentcloud.github.com/backbone/backbone.js) and after a few hours of reading the source in the browser my eyes demanded some syntax highlight. I assumed someone would've done this by now, but I could only find apps that provide much more than a nicer **reading** environment (I'm not looking to edit code on the browser). *Great!*, I tough to myself, *I get to roll my own*! Because I read mostly javascript source code, I focused on that, maybe if the need …
117
128 So to get started I looked around for highlighting libraries, and found a couple of heavyweights and then I saw [hijs.js by cloudhead](https://github.com/cloudhead/hijs) and I grabbed it!
_posts/2013-02-22-google-webfonts-and-the-flash-of-unstyled-text.markdown+0−40
@@ -1,40 +0,0 @@
1----
2-layout: post
3----
4-
5-Google webfonts and the flash of unstyled text.
6------------------------------------------------
7-
8-Sunnyvale, Feb 22, 2013
9-
10-Ever noticed that if you use [Google Webfonts](//www.google.com/webfonts) you might have noticed your custom font text flashing into the custom font from the basic browser supported font. This is because the font takes sometime to download, and the document is usually ready before, so your text is visible. There some extreme fixes, like hiding the whole page while it load, and then showing it all in one move. I chose to do something lighter, because I like seeing the site coming to life, and for …
11-
12-#### The Javascript
13-{% highlight javascript %}
14- // google web font, no flash of unstyled text
15- window.WebFontConfig = {
16- google: { families: ['Quantico:700,700italic:latin'] },
17- active: function () {
18- // font is ready, assume jquery
19- $(function () {
20- // on your css make sure you make all the elements that us this font visibility: hidden;
21- $('h1, .custom-font').css({ visibility: 'visible' });
22- });
23- }
24- };
25-{% endhighlight %}
26-
27-#### The css
28-{% highlight css %}
29- /* google web font */
30- h1 {
31- visibility: hidden;
32- font-family: 'Quantico', sans-serif;
33- font-weight: 700;
34- }
35-{% endhighlight %}
36-
37-This is the code I'm using on this site (the h1 header has a custom font). Take this as a proof of concept. Some things to keep in mind:
38-
39- + The active property passed to the WebFontConfig is a function that gets called when all of the fonts have either loaded successfully or failed. You can either retry or ignore. If you ignore the elements will act as esxpected and use the first available font in the css declaration.
40- + This function can at times be called before the `domready` event, so we make sure to wait for that before we show the elements. This might cause a slight delay for the text to appear. This can be solved most of the times, by giving priority to the google webfonts code, before all.
_posts/2013-02-24-ups-and-downs.markdown+0−25
@@ -1,25 +0,0 @@
1----
2-layout: post
3----
4-
5-Ups and downs
6--------------
7-
8-Palo Alto, Feb 24, 2013
9-
10-I don't like camelCase. I don't think it helps making code more readable. With this said, I mostly work with Javascript. I know... It's like hell on earth since JS good practices usually ask for camelCase. I would very much rather user '_' for separation, like those lucky python folks.
11-I follow the good practices when coding for others, public apis where camelcase is expected. But everywhere else I use _ as a separator. This is my dirty secret. And so far I'm ok with this, even if at times, from project to project I roll back on this decision. At [blyve](//blyve.com) underscores where ok and I follow the basic rule I stated above. Altough at [edshelf](//edshelf.com) I rolled back. I'm using camelCase *agains't my will* because I enforced it on myself. I did this because I'm th …
12-
13-Here is an example:
14-
15-{% highlight javascript %}
16- $(function () {
17- var bucket = {}, // namespace
18- this_is_my_awesome_func = function () {}; // private api, underscores used
19-
20- bucket.Search = function () {};
21- bucket.Search.prototype = {
22- newSearch: function () {}, // public api, camelCase expected
23- };
24- });
25-{% endhighlight %}
_posts/2013-02-25-random-title-generator.markdown+1−5
@@ -1,12 +1,8 @@
11 ---
22 layout: post
3+title: Random Titles
34 ---
45
5-Random title generator
6-----------------------
7-
8-Sunnyvale, Feb 24, 2013
9-
106 Titles are hard, giving something a name demands thinking about it and making a decision. Unless of course you know some javascript. And... I do. So I can't come up with a title, I'll let the code choose a random(ish) one for us.
117
128 This is done with an array of nouns, an array of adjectives and a prefix to the title. The basic idea is to randomly concatenate those terms together. Since the prefix would become repetitive, I've set it to only show up 50% of the times.
_posts/2013-02-26-easy-way-to-randomly-choose-a-vim-colorscheme.markdown+0−35
@@ -1,35 +0,0 @@
1----
2-layout: post
3----
4-
5-Easy way to randomly choose a vim colorscheme
6----------------------------------------------
7-
8-Sunnyvale, Feb 26, 2013
9-
10-Have you ever caught yourself cycling through your colorschems with `:colo <TAB>`? I have and I always endup using a colorscheme from the subset that I know and like.
11-
12-The Idea: What if vim new what subset is that? Which colorschemes I like?
13-
14-Solution: Tell vim exactly that.
15-
16-Create an collection of colorschemes you like, put them in your config with this code:
17-
18-{% highlight vim %}
19-
20- function! ToggleScheme()
21- if has("gui_running")
22- " this is the collection of colorschemes
23- let schemes = 'FreshCut Peacock Revelation TronLegacy Yule'
24- let seconds = str2nr(strftime('%S'))
25- " number needs to match the schemes count
26- execute 'colorscheme '.split(schemes)[seconds%5]
27- redraw
28- endif
29- endfunction
30- command! ToggleScheme :call ToggleScheme()
31- map <leader>x :ToggleScheme<CR>
32- set background=dark
33- call ToggleScheme()
34-
35-{% endhighlight %}
_posts/2013-02-28-experimenting-with-html-canvas.markdown+0−12
@@ -1,12 +0,0 @@
1----
2-layout: post
3----
4-
5-Experimenting with HTML canvas
6-------------------------------
7-
8-Sunnyvale, Feb 28, 2013
9-
10-A while ago I got curious about the canvas element, so I made myself a playground. I dug it up searching for a utility function I wrote somewhere (still to be found, but that is another story). Turns out it still works, and it is actually fun to play through. You can see the full blown thing [here](http://xonecas.github.com/2d-particle-experiements/) or use the `iframe` bellow.
11-
12-<div id="iframe"></div>
_posts/2013-02-28-the-back-button-the-xhr-and-the-chrome.markdown+0−14
@@ -1,14 +0,0 @@
1----
2-layout: post
3----
4-
5-The Back Button, the Ajax, and the Chrome
6------------------------------------------
7-
8-Sunnyvale, Feb 28, 2013
9-
10-Yesterday I came across a weird situation, that only happens on chrome (*shocking*!).
11-
12-At work, we have implemented `/search` as both a JSON endpoint and a HTML page. We choose what we send out depending on the `x-requested-with` header. Unfortunately doing this without any precaution, makes Chrome think that the latest response from `/search` xhr or page refresh is the latest version of `/search`. So when we try to navigate back to search, we get the JSON dump of the last executed search. This is simply resolved by adding a cache buster to the querystring, in our case that looks …
13-
14-Hope this helps someone debug the problem faster, and understand it.
_posts/2013-03-20-my-vimrc.markdown+0−115
@@ -1,115 +0,0 @@
1----
2-layout: post
3----
4-
5-My current vim setup!
6----------------------
7-
8-Sunnyvale, March 20, 2013
9-
10-I just tweaked my vim quite a bit. I have a 2 goals:
11-
12- + Adapt to different settings and environments.
13- + Easy to toggle light/dark backgrounds and colorschemes.
14-
15-I think I got it pretty close:
16-
17-{% highlight vim %}
18- filetype off
19- call pathogen#infect()
20- syntax on
21- filetype plugin indent on
22- set nocompatible
23- set modeline
24- set modelines=5
25- set encoding=utf-8
26- set relativenumber
27- set guioptions=
28- set directory^=~/.vswap
29- set ruler
30- set cursorline
31- set visualbell t_vb=
32- set incsearch
33- set smartcase
34- set smartindent
35- set hlsearch
36- set autoindent
37- set expandtab
38- set smarttab
39- set tabstop=4
40- set shiftwidth=4
41- set list
42- set listchars=tab:▸\ ,eol:¬,trail:⋅,extends:❯,precedes:❮
43- set showbreak=↪
44- set noesckeys
45- set laststatus=2 " Always show the statusline
46- set guifont=Menlo:h10
47- " === functions and mappings
48- " change background color
49- function! ToggleBg()
50- if &background == "light"
51- set background=dark
52- else
53- set background=light
54- endif
55- endfunction
56- " switch schemes randomly from the list
57- function! ToggleScheme()
58- let schemes = 'hemisu shiny-ninja'
59- let seconds = str2nr(strftime('%S'))
60- " number needs to match the schemes count
61- execute 'colorscheme '.split(schemes)[seconds%2]
62- redraw
63- endfunction
64- " === custom commands
65- command! ToggleBg :call ToggleBg()
66- command! ToggleScheme :call ToggleScheme()
67- " === extra mappings
68- map <leader>x :ToggleBg<CR>
69- map <leader>c :ToggleScheme<CR>
70- map <leader>n :NERDTreeToggle<CR>
71- " === thanks Ian, http://statico.github.com/vim.html
72- map <leader>] :bnext<CR>
73- map <leader>[ :bprev<CR>
74- nmap <leader>e :e#<CR>
75- nmap j gj
76- nmap k gk
77- nmap <leader>h :nohlsearch<CR>
78- nmap <leader>s :SyntasticCheck<CR>
79- nmap <leader>p :CtrlPBuffer<CR>
80- " === config vars ===
81- let g:indent_guides_guide_size = 1
82- " === colors ===
83- set background=dark
84- call ToggleScheme()
85- " === terminal mode ===
86- if !has('gui_running')
87- set listchars=tab:▸\ ,eol:¬,trail:⋅
88- set background=dark
89- colorscheme shiny-ninja
90- if &term =~ "xterm"
91- set t_Co=256
92- if has("terminfo")
93- let &t_Sf=nr2char(27).'[3%p1%dm'
94- let &t_Sb=nr2char(27).'[4%p1%dm'
95- else
96- let &t_Sf=nr2char(27).'[3%dm'
97- let &t_Sb=nr2char(27).'[4%dm'
98- endif
99- endif
100- endif
101- " === auto commands ===
102- au BufNewFile,BufRead *.jsm set filetype=javascript
103- au BufNewFile,BufRead *.less syn cluster sassCssAttributes add=@cssColors
104- " === syntastic
105- " let g:syntastic_<filetype>_checkers=['<checker-name>']
106- let g:syntastic_javascript_checkers=['jslint']
107-{% endhighlight %}
108-
109-Here is a list of dependencies to reproduce this setup:
110- + [vimrc](/assets/vimrc)
111- + [shiny-ninja](/assets/shiny-ninja.vim)
112- + [hemisu](https://github.com/noahfrederick/Hemisu)
113- + [noctu](https://github.com/noahfrederick/vim-noctu)
114-
115-*Note*: Post updated on March 25th, 2013
_posts/2013-04-15-day-1.markdown+0−22
@@ -1,22 +0,0 @@
1----
2-layout: post
3----
4-
5-Day One.
6---------
7-
8-Palo ALto, May 15 2013
9-
10-I had a really stressful weekend. I smoked a lot of cigarettes. I ate a lot of *quick*, unhealthy food.
11-
12-As I smoked my last ciggie last night, which is usually the best one for me. I figured out half way through it that it was tasting terrible. I slowly regressed in my mind to try to remember the last cigarette that I truly enjoyed. I can't, its a guess but I think right after the last time I has **CENSORED**.
13-
14-I quickly put out that cigarette and proclaimed "I am done.". I really am, it might be a rough set of weeks and months ahead of me, but never before (on my many attempts at this) have I ever done it because I wanted it for myself.
15-
16-So for day one, I started by waking up early, exercising and getting to work early. Why? Well lets think that through. I never really smoke during the day, it's after work that I usually crave it. With an early start, exercise and a long day at work it's almost guaranteed that I'll be too tired tonight to even think about anything other than my bed.
17-
18-That is the general plan. Along with that, is calorie counting and watching what I eat. I have learned from my previous attempts that I always get morbidly fat when I try to kick nicotine out.
19-
20-I'm not going to be too strict on what I eat, the basic idea is no junk food, and small portions. That should be good enough to keep me from swelling like a land wale (LOL)
21-
22-Wish me luck!
_posts/2013-12-31-whats-jekyll.md+8−0
@@ -0,0 +1,8 @@
1+---
2+layout: post
3+title: CreativeJS - Three.js Tutorial
4+---
5+
6+I completed [this](http://creativejs.com/tutorials/three-js-part-1-make-a-star-field/) tutorial. At the end of the tutorial Seb challenges everyone to do some exercises (homework): change the direction, shape, color and angle of the particles.
7+
8+For a deeper look on what is going on there, check out the [Github repo](https://github.com/xonecas/creativejs-threejs-part1). The evolution of the code is neatly organized with (git) tags.
_posts/_template.markdown+0−8
@@ -1,8 +0,0 @@
1----
2-layout: post
3----
4-
5-Template
6---------
7-
8-location, Mm DD YYYY
about.md+30−0
@@ -0,0 +1,30 @@
1+---
2+layout: page
3+title: About
4+---
5+
6+<p class="message">
7+ Hey there! This page is included as an example. Feel free to customize it for your own use upon downloading. Carry on!
8+</p>
9+
10+In the novel, *The Strange Case of Dr. Jeykll and Mr. Hyde*, Mr. Poole is Dr. Jekyll's virtuous and loyal butler. Similarly, Poole serves as an upstanding and effective foundation for Jekyll themes by [@mdo](https://twitter.com/mdo).
11+
12+There are currently two themes built on Poole:
13+
14+* [Hyde](http://hyde.getpoole.com)
15+* [Lanyon](http://lanyon.getpoole.com)
16+
17+Learn more and contribute on [GitHub](https://github.com/poole).
18+
19+## Setup
20+
21+Some fun facts about the setup of this project include:
22+
23+* Built for [Jekyll](http://jekyllrb.com)
24+* Developed on GitHub and hosted for free on [GitHub Pages](https://pages.github.com)
25+* Coded with [Sublime Text 2](http://sublimetext.org), an amazing code editor
26+* Designed and developed while listening to music like [Blood Bros Trilogy](https://soundcloud.com/maddecent/sets/blood-bros-series)
27+
28+Have questions or suggestions? Feel free to [open an issue on GitHub](https://github.com/poole/issues/new) or [ask me on Twitter](https://twitter.com/mdo).
29+
30+Thanks for reading!
assets/shiny-ninja.vim+0−207
@@ -1,207 +0,0 @@
1-" shiny-ninja.vim - Vim color scheme
2-" ----------------------------------------------------------
3-" Author: Sean Caetano Martin (@xonecas)
4-" Noah Frederick (http://noahfrederick.com/) (creatd hemisu)
5-" Version: 1.0.0
6-" License: Creative Commons Attribution-NonCommercial
7-" 3.0 Unported License (see README.md)
8-" Notes: This is a modified version of hemisu!
9-" ----------------------------------------------------------
10-
11-" Setup ----------------------------------------------------{{{
12-" Reset syntax highlighting
13-hi clear
14-if exists("syntax_on")
15- syntax reset
16-endif
17-
18-" Declare theme name
19-let g:colors_name="shiny-ninja"
20-
21-"}}}
22-" The Colors -----------------------------------------------{{{
23-" Define reusable colors
24-let s:black= { "gui": "#080808", "cterm": "232" }
25-let s:white= { "gui": "#eeeeee", "cterm": "255" }
26-let s:almostWhite= { "gui": "#dadada", "cterm": "253" }
27-let s:almostBlack= { "gui": "#121212", "cterm": "233" }
28-let s:middleDarkGrey= { "gui": "#606060", "cterm": "241" }
29-let s:middleLightGrey= { "gui": "#999999", "cterm": "246" }
30-let s:lightGrey= { "gui": "#b2b2b2", "cterm": "249" }
31-let s:darkGrey= { "gui": "#444444", "cterm": "238" }
32-
33-let s:darkSea= { "gui": "#0000d7", "cterm": "20" }
34-let s:middleDarkSea= { "gui": "#005fd7", "cterm": "26" }
35-let s:middleLightSea= { "gui": "#0087d7", "cterm": "32" }
36-let s:lightSea= { "gui": "#00d7d7", "cterm": "38" }
37-
38-let s:darkSky= { "gui": "#0000ff", "cterm": "21" }
39-let s:middleDarkSky= { "gui": "#005fff", "cterm": "27" }
40-let s:middleLightSky= { "gui": "#0087ff", "cterm": "33" }
41-let s:lightSky= { "gui": "#00afff", "cterm": "39" }
42-
43-let s:darkPurple= { "gui": "#8700d7", "cterm": "92" }
44-let s:middleDarkPurple= { "gui": "#875fd7", "cterm": "98" }
45-let s:middleLightPurple={ "gui": "#8787d7", "cterm": "104" }
46-let s:lightPurple= { "gui": "#87afd7", "cterm": "110" }
47-
48-let s:darkRed= { "gui": "#800000", "cterm": "1" }
49-let s:lightRed= { "gui": "#ff0000", "cterm": "9" }
50-
51-" Assign to semantic categories based on background color
52-if &background=="dark"
53- " Dark theme
54- let s:bg=s:black
55- let s:norm=s:almostWhite
56- let s:comment=s:middleDarkGrey
57- let s:dimmed=s:middleLightGrey
58- let s:subtle=s:darkGrey
59- let s:faint=s:almostBlack
60- let s:accent1=s:middleLightSky
61- let s:accent2=s:middleLightPurple
62- let s:accent3=s:lightPurple
63- let s:accent4=s:lightRed
64- let s:normRed=s:middleLightSea
65- let s:normPurple=s:middleLightPurple
66- let s:normSky=s:middleLightSky
67- let s:faintRed=s:darkSea
68- let s:faintPurple=s:darkPurple
69- let s:faintSky=s:darkSky
70-else
71- " Light theme
72- let s:bg=s:white
73- let s:norm=s:almostBlack
74- let s:comment=s:middleLightGrey
75- let s:dimmed=s:middleDarkGrey
76- let s:subtle=s:lightGrey
77- let s:faint=s:almostWhite
78- let s:accent1=s:middleDarkSky
79- let s:accent2=s:middleDarkPurple
80- let s:accent3=s:middleDarkSea
81- let s:accent4=s:darkRed
82- let s:normRed=s:middleDarkSea
83- let s:normPurple=s:middleDarkPurple
84- let s:normSky=s:middleDarkSky
85- let s:faintRed=s:lightSea
86- let s:faintPurple=s:lightPurple
87- let s:faintSky=s:lightSky
88-endif
89-
90-"}}}
91-" Utilility Function ---------------------------------------{{{
92-function! s:h(group, style)
93- execute "highlight" a:group
94- \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE")
95- \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE")
96- \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE")
97- \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE")
98- \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE")
99- \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE")
100- \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE")
101-endfunction
102-
103-"}}}
104-" Highlights - Vim >= 7 ------------------------------------{{{
105-if version >= 700
106- call s:h("CursorLine", { "bg": s:faint })
107- call s:h("MatchParen", { "fg": s:accent1, "bg": s:faint, "gui": "bold" })
108- call s:h("Pmenu", { "bg": s:faint })
109- call s:h("PmenuThumb", { "bg": s:norm })
110- call s:h("PmenuSBar", { "bg": s:subtle })
111- call s:h("PmenuSel", { "bg": s:faintSky })
112- call s:h("ColorColumn", { "bg": s:faintRed })
113- call s:h("SpellBad", { "sp": s:normRed, "gui": "undercurl" })
114- call s:h("SpellCap", { "sp": s:accent1, "gui": "undercurl" })
115- call s:h("SpellRare", { "sp": s:normPurple, "gui": "undercurl" })
116- call s:h("SpellLocal", { "sp": s:accent4, "gui": "undercurl" })
117- hi! link CursorColumn CursorLine
118-
119- " Use background for cterm Spell*, which does not support undercurl
120- execute "hi! SpellBad ctermbg=" s:faintRed.cterm
121- execute "hi! SpellCap ctermbg=" s:faintSky.cterm
122- execute "hi! SpellRare ctermbg=" s:faintPurple.cterm
123- execute "hi! SpellLocal ctermbg=" s:faint.cterm
124-endif
125-
126-"}}}
127-" Highlights - UI ------------------------------------------{{{
128-call s:h("Normal", { "fg": s:norm, "bg": s:bg })
129-call s:h("NonText", { "fg": s:subtle })
130-call s:h("Cursor", { "fg": s:bg, "bg": s:accent3 })
131-call s:h("Visual", { "bg": s:faintSky })
132-call s:h("IncSearch", { "bg": s:faintSky })
133-call s:h("Search", { "bg": s:faintPurple })
134-call s:h("StatusLine", { "fg": s:norm, "bg": s:faint, "gui": "bold", "cterm": "bold" })
135-call s:h("StatusLineNC", { "fg": s:dimmed, "bg": s:faint })
136-call s:h("SignColumn", { "fg": s:norm })
137-call s:h("VertSplit", { "fg": s:subtle, "bg": s:faint })
138-call s:h("TabLine", { "fg": s:dimmed, "bg": s:faint })
139-call s:h("TabLineSel", { "gui": "bold", "cterm": "bold" })
140-call s:h("Folded", { "fg": s:comment, "bg": s:faint })
141-call s:h("Directory", { "fg": s:accent1 })
142-call s:h("Title", { "fg": s:accent4, "gui": "bold", "cterm": "bold" })
143-call s:h("ErrorMsg", { "bg": s:faintRed })
144-call s:h("DiffAdd", { "bg": s:faintPurple })
145-call s:h("DiffChange", { "bg": s:faintRed })
146-call s:h("DiffDelete", { "fg": s:normRed, "bg": s:faintRed })
147-call s:h("DiffText", { "bg": s:faintRed, "gui": "bold", "cterm": "bold" })
148-call s:h("User1", { "fg": s:bg, "bg": s:normPurple })
149-call s:h("User2", { "fg": s:bg, "bg": s:normRed })
150-call s:h("User3", { "fg": s:bg, "bg": s:normSky })
151-hi! link WildMenu IncSearch
152-hi! link FoldColumn SignColumn
153-hi! link WarningMsg ErrorMsg
154-hi! link MoreMsg Title
155-hi! link Question MoreMsg
156-hi! link ModeMsg MoreMsg
157-hi! link TabLineFill StatusLineNC
158-hi! link LineNr NonText
159-hi! link SpecialKey NonText
160-hi! clear Ignore
161-
162-"}}}
163-" Highlights - Generic Syntax ------------------------------{{{
164-call s:h("Delimiter", { "fg": s:dimmed })
165-call s:h("Comment", { "fg": s:comment, "gui": "italic" })
166-call s:h("Underlined", { "fg": s:accent1, "gui": "underline", "cterm": "underline" })
167-call s:h("Type", { "fg": s:accent3 })
168-call s:h("String", { "fg": s:accent2 })
169-call s:h("Keyword", { "fg": s:accent2, "gui": "bold", "cterm": "bold" })
170-call s:h("Todo", { "fg": s:normRed, "gui": "bold", "cterm": "bold" })
171-call s:h("Function", { "gui": "bold", "cterm": "bold" })
172-hi! link Identifier Function
173-hi! link Statement Type
174-hi! link Constant Directory
175-hi! link Number Constant
176-hi! link Special Constant
177-hi! link PreProc Constant
178-hi! link Error ErrorMsg
179-
180-"}}}
181-" Highlights - HTML ----------------------------------------{{{
182-hi! link htmlLink Underlined
183-hi! link htmlTag Type
184-hi! link htmlEndTag htmlTag
185-
186-"}}}
187-" Highlights - CSS -----------------------------------------{{{
188-hi! link cssBraces Delimiter
189-hi! link cssSelectorOp cssBraces
190-hi! link cssClassName Normal
191-
192-"}}}
193-" Highlights - Markdown ------------------------------------{{{
194-hi! link mkdListItem mkdDelimiter
195-
196-"}}}
197-" Highlights - Shell ---------------------------------------{{{
198-hi! link shOperator Delimiter
199-hi! link shCaseBar Delimiter
200-
201-"}}}
202-" Highlights - JavaScript ----------------------------------{{{
203-hi! link javaScriptValue Constant
204-hi! link javaScriptNull Constant
205-hi! link javaScriptBraces Normal
206-
207-"}}}
assets/vimrc+0−89
@@ -1,89 +0,0 @@
1-filetype off
2-call pathogen#infect()
3-syntax on
4-filetype plugin indent on
5-set nocompatible
6-set modeline
7-set modelines=5
8-set encoding=utf-8
9-set relativenumber
10-set guioptions=
11-set directory^=~/.vswap
12-set ruler
13-set cursorline
14-set visualbell t_vb=
15-set incsearch
16-set smartcase
17-set smartindent
18-set hlsearch
19-set autoindent
20-set expandtab
21-set smarttab
22-set tabstop=4
23-set shiftwidth=4
24-set list
25-set listchars=tab:▸\ ,eol:¬,trail:⋅,extends:❯,precedes:❮
26-set showbreak=↪
27-set noesckeys
28-set laststatus=2 " Always show the statusline
29-set guifont=Menlo:h10
30-" === functions and mappings
31-" change background color
32-function! ToggleBg()
33- if &background == "light"
34- set background=dark
35- else
36- set background=light
37- endif
38-endfunction
Cut short: this commit's diff is over 1000 lines.
atom.xml+28−0
Cut short: this commit's diff is over 1000 lines.
clock.html+0−30
Cut short: this commit's diff is over 1000 lines.
css/flatty.css+0−168
Cut short: this commit's diff is over 1000 lines.
css/native.css+0−69
Cut short: this commit's diff is over 1000 lines.
css/style.css+0−11
Cut short: this commit's diff is over 1000 lines.
favicon.ico+0−0
Binary file, not shown.
img/blyve.png+0−0
Binary file, not shown.
img/edshelf.png+0−0
Binary file, not shown.
img/glyphicons-halflings-white.png+0−0
Binary file, not shown.
img/glyphicons-halflings.png+0−0
Binary file, not shown.
img/gsnap.png+0−0
Binary file, not shown.
index.html+33−30
Cut short: this commit's diff is over 1000 lines.
js/jquery.min.js+0−5
Cut short: this commit's diff is over 1000 lines.
js/rings.js+0−167
Cut short: this commit's diff is over 1000 lines.
js/script.js+0−42
Cut short: this commit's diff is over 1000 lines.
public/apple-touch-icon-144-precomposed.png+0−0
Binary file, not shown.
public/css/poole.css+389−0
Cut short: this commit's diff is over 1000 lines.
public/css/syntax.css+66−0
Cut short: this commit's diff is over 1000 lines.
public/favicon.ico+0−0
Binary file, not shown.
work.html+0−76
Cut short: this commit's diff is over 1000 lines.