-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
484 lines (308 loc) · 18.2 KB
/
Copy pathindex.html
File metadata and controls
484 lines (308 loc) · 18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>andruli's blog</title>
<meta name="author" content="Andrés Bordese">
<meta name="description" content="FancyBox images are one of the coolest ways of displayng images on your web site, and it is easy to add FancyBox support for your octopress blog. We& …">
<img id="portrait" src="/profile.jpg" alt="portrait" />
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://andruli.github.io">
<!-- FavIcon -->
<link href="/favicon.png" rel="icon" size=256x256>
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon">
<!-- /FavIcon -->
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/atom.xml" rel="alternate" title="andruli's blog" type="application/atom+xml">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/libs/jquery.min.js"%3E%3C/script%3E'))</script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<!-- Load jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict(); // ender.js conflicts with jQuery
</script>
<!-- Load FancyBox -->
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" />
<script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>
<!-- Fix FancyBox style for OctoPress -->
<style type="text/css">
.fancybox-wrap { position: fixed !important; }
.fancybox-opened {
-webkit-border-radius: 4px !important;
-moz-border-radius: 4px !important;
border-radius: 4px !important;
}
.fancybox-close, .fancybox-prev span, .fancybox-next span {
background-color: transparent !important;
border: 0 !important;
}
</style>
<!-- Custom Scripts -->
<script language="Javascript" type="text/javascript">
// ender.js gobbles jQuery's ready event: Use ender.js $ instead
$(document).ready(function() {
jQuery(".fancybox").fancybox();
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-50216902-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">andruli's blog</a></h1>
<h2>A blogging framework for hackers.</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="https://www.google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:andruli.github.io" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/04/22/fancybox-images-and-octopress/">Fancybox Images and Octopress</a></h1>
<p class="meta">
<time datetime="2014-04-22T15:28:51-03:00" pubdate data-updated="true">Apr 22<span>nd</span>, 2014</time>
| <a href="/blog/2014/04/22/fancybox-images-and-octopress/#disqus_thread"
data-disqus-identifier="http://andruli.github.io/blog/2014/04/22/fancybox-images-and-octopress/">Comments</a>
</p>
</header>
<div class="entry-content"><p>FancyBox images are one of the coolest ways of displayng images on your web site, and it is easy to add FancyBox support for your octopress blog.</p>
<p>We’ll use a modified version of <a href="https://gist.github.com/sukima">sikima’s</a> fancybox plugin.</p>
<h1>Installing fancybox plugin</h1>
<ul>
<li><p>Download <a href="http://fancyapps.com/fancybox/#license">fancybox</a>.</p></li>
<li><p>Copy the content of <code>path/to/fancybox/source</code> to <code>$OCTOPRESS_PATH/source/fancybox</code>.</p></li>
</ul>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>cp -R fancybox/source /path/to/octopress/source/fancybox
</span></code></pre></td></tr></table></div></figure>
<ul>
<li>Copy <a href="/resources/photos_tag.rb">this</a> modified version of <a href="https://gist.github.com/sukima">sikima’s</a> fancybox plugin to you <code>path/to/octopress/plugins/</code> folder.</li>
</ul>
<p>There are a few styling mistakes that fancybox has when it is runing inside octopress. To fix this the plugin provides the fancyboxstylefix tag.</p>
<ul>
<li>Add the following code to you <code>path/to/octopress/source/_includes/custom/head.html</code></li>
</ul>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'><span class="c"><!-- Load jQuery --></span>
</span><span class='line'><span class="nt"><script </span><span class="na">src=</span><span class="s">"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></script></span>
</span><span class='line'><span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></span>
</span><span class='line'> <span class="nx">jQuery</span><span class="p">.</span><span class="nx">noConflict</span><span class="p">();</span> <span class="c1">// ender.js conflicts with jQuery</span>
</span><span class='line'><span class="nt"></script></span>
</span><span class='line'>
</span><span class='line'><span class="c"><!-- Load FancyBox --></span>
</span><span class='line'><span class="nt"><link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">href=</span><span class="s">"/fancybox/jquery.fancybox.css"</span> <span class="nt">/></span>
</span><span class='line'><span class="nt"><script </span><span class="na">src=</span><span class="s">"/fancybox/jquery.fancybox.pack.js"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></script></span>
</span><span class='line'>
</span><span class='line'>{% fancyboxstylefix %}
</span><span class='line'>
</span><span class='line'><span class="c"><!-- Custom Scripts --></span>
</span><span class='line'><span class="nt"><script </span><span class="na">language=</span><span class="s">"Javascript"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></span>
</span><span class='line'> <span class="c1">// ender.js gobbles jQuery's ready event: Use ender.js $ instead</span>
</span><span class='line'> <span class="nx">$</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">ready</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'> <span class="nx">jQuery</span><span class="p">(</span><span class="s2">".fancybox"</span><span class="p">).</span><span class="nx">fancybox</span><span class="p">();</span>
</span><span class='line'> <span class="p">});</span>
</span><span class='line'><span class="nt"></script></span>
</span></code></pre></td></tr></table></div></figure>
<ul>
<li>Fix the css by appending the following to your <code>path/to/octopress/sass/custom/_styles.scss</code></li>
</ul>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
</pre></td><td class='code'><pre><code class='html'><span class='line'>/* FancyBox Galleries */
</span><span class='line'>$rad: 6px;
</span><span class='line'>ul.gallery {
</span><span class='line'> border: thin solid gray;
</span><span class='line'> -webkit-border-radius: $rad;
</span><span class='line'> -moz-border-radius: $rad;
</span><span class='line'> border-radius: $rad;
</span><span class='line'> text-align: center;
</span><span class='line'> padding: 5px;
</span><span class='line'> li {
</span><span class='line'> display: inline;
</span><span class='line'> padding: 5px;
</span><span class='line'> }
</span><span class='line'>}
</span></code></pre></td></tr></table></div></figure>
<ul class="gallery">
<li><a href="/images/posts/fancybox/profile.jpg" class="fancybox" rel="gallery-f581f3cd2a4fad49fd69893747244870" title=""><img src="/images/posts/fancybox/profile_m.jpg" alt="" /></a></li><li><a href="/images/posts/fancybox/favicon.png" class="fancybox" rel="gallery-f581f3cd2a4fad49fd69893747244870" title=""><img src="/images/posts/fancybox/favicon_m.png" alt="" /></a></li>
</ul>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/04/20/launch-sublime-3-from-the-command-line/">Launch Sublime 3 From the Command Line</a></h1>
<p class="meta">
<time datetime="2014-04-20T14:19:26-03:00" pubdate data-updated="true">Apr 20<span>th</span>, 2014</time>
| <a href="/blog/2014/04/20/launch-sublime-3-from-the-command-line/#disqus_thread"
data-disqus-identifier="http://andruli.github.io/blog/2014/04/20/launch-sublime-3-from-the-command-line/">Comments</a>
</p>
</header>
<div class="entry-content"><p>Under a GNU/Linux enviroment like <a href="http://www.ubuntu.com">Ubuntu</a> when you install sublime 2/3 you’ll also get a command line utility to launch the program. Sadly in OSx we don’t have it, but it is quiet easy to get that feature to work, just type on a terminal:</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>ln -s /Applications/Sublime<span class="se">\ </span>Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
</span></code></pre></td></tr></table></div></figure>
<p>Et voilà, now you can launch sublime from the terminal just typing <code>subl</code>.</p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/04/20/solving-bundle-install-problems-under-mac-osx/">Solving Bundle Install Problems Under Mac OSx</a></h1>
<p class="meta">
<time datetime="2014-04-20T12:37:18-03:00" pubdate data-updated="true">Apr 20<span>th</span>, 2014</time>
| <a href="/blog/2014/04/20/solving-bundle-install-problems-under-mac-osx/#disqus_thread"
data-disqus-identifier="http://andruli.github.io/blog/2014/04/20/solving-bundle-install-problems-under-mac-osx/">Comments</a>
</p>
</header>
<div class="entry-content"><p>If you are a mac OSx user like me (I’m on 10.9.2) you’ll notice that you can’t bundle any gems for ruby.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>bundle install
</span><span class='line'>
</span><span class='line'> Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
</span><span class='line'> ...
</span><span class='line'> Make sure that <span class="sb">`</span>gem install RedCloth -v <span class="s1">'4.2.9'</span><span class="sb">`</span> succeeds before bundling.
</span></code></pre></td></tr></table></div></figure>
<p>My first attempt was to simply follow the advice of the <code>bundle install</code> exit message, but the build keep crashing.
After a lot of hours of web surfing I have finally found a solution.</p>
<p>It seams that the defaul mac OSx compiler <code>cLang</code> is treating all warnings as error. To fix this we’ll have to tell the compiler not to do this including the <code>CFLAG</code> -Wno-error=unused-command-line-argument-hard-error-in-future</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'><span class="nv">$ </span>sudo <span class="nv">ARCHFLAGS</span><span class="o">=</span>-Wno-error<span class="o">=</span>unused-command-line-argument-hard-error-in-future bundle install
</span></code></pre></td></tr></table></div></figure>
<p>Et voilà, problem solved =D.</p>
</div>
</article>
<div class="pagination">
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/blog/2014/04/22/fancybox-images-and-octopress/">Fancybox Images and Octopress</a>
</li>
<li class="post">
<a href="/blog/2014/04/20/launch-sublime-3-from-the-command-line/">Launch Sublime 3 From the Command Line</a>
</li>
<li class="post">
<a href="/blog/2014/04/20/solving-bundle-install-problems-under-mac-osx/">Solving Bundle Install Problems Under Mac OSx</a>
</li>
</ul>
</section>
<section class="googleplus">
<h1>
<a href="https://plus.google.com/+AndresBordese?rel=author">
<img src="http://www.google.com/images/icons/ui/gprofile_button-32.png" width="32" height="32">
Google+
</a>
</h1>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright © 2014 - Andrés Bordese -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
var disqus_shortname = 'andruli';
var disqus_script = 'count.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript">
(function() {
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
script.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
})();
</script>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>