-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
534 lines (271 loc) · 14.1 KB
/
index.html
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
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<!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>Arnab's Universe</title>
<meta name="author" content="Arnab Deka">
<meta name="description" content="Tweet Debugging Warnings in Tests Tuesday, February the 5th, 2013 | Comments 1
Object#id will be deprecated; use Object#object_id Hate seeing …">
<!-- 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://arnab-deka.com/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="Arnab's Universe" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7241491-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" id="sidebar">
<!-- Logo -->
<aside id="logo" class="clearfix">
<div class="clearfix">
<a href="/">Arnab's Universe</a>
</div>
</aside>
<ul id="menu">
<li class="title">
<h1 id="title"><a href="/">Arnab's Universe</a></h1>
</li>
<li class="subtitle">
<h2 id="subtitle">... and all the parallel ones.</h2>
</li>
<li class="link">
<a href="/blog/archives">archives</a>
</li>
<li class="link">
<a href="/about/">about</a>
</li>
<li class="link">
<a href="/contact/">contact</a>
</li>
<li class="link">
<a href="/resume/">resume</a>
</li>
<li class="link">
<a href="/speaking/">speaking</a>
</li>
<li class="link rss">
<a href="/atom.xml">rss feed</a>
</li>
<li class="link">
<a href="http://twitter.com/or9ob/">twitter</a>
</li>
<li class="link">
<a href="http://github.com/arnab/">github</a>
</li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:arnab-deka.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<!-- Octopress Love -->
<aside id="octopress_linkback">
<a href="http://octopress.org/">
<span class="unicode_square">
<span class="unicode_circle">
</span>
</span>
<span class="octopress">Powered by Octopress</span>
</a>
</aside>
</header>
<section id="main">
<article class="post">
<div class="sharing-box">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arnab-deka.com/index.html" data-via="or9ob" data-counturl="http://arnab-deka.com/index.html" data-size="large">Tweet</a>
<div class="g-plusone" data-size="medium"></div>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
</div>
<header>
<h2 class="entry-title">
<a href="/posts/2013/02/debugging-warnings-in-tests/">Debugging Warnings in Tests</a>
</h2>
<p class="meta">
<time datetime="2013-02-05T14:28:00+05:30" pubdate data-updated="true">Tuesday, February the 5<span>th</span>, 2013</time>
| <a href="/posts/2013/02/debugging-warnings-in-tests/#disqus_thread">Comments</a>
</p>
</header>
<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='sh'><span class='line'>Object#id will be deprecated; use Object#object_id
</span></code></pre></td></tr></table></div></figure>
<p>Hate seeing warnings in your test output? Yeah me too. Came across a
fairly weird bug today and this is how I debugged it.</p>
<footer>
<a rel="full-article" href="/posts/2013/02/debugging-warnings-in-tests/">Continue reading →</a>
</footer>
</article>
<article class="post">
<div class="sharing-box">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arnab-deka.com/index.html" data-via="or9ob" data-counturl="http://arnab-deka.com/index.html" data-size="large">Tweet</a>
<div class="g-plusone" data-size="medium"></div>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
</div>
<header>
<h2 class="entry-title">
<a href="/posts/2013/02/hello-jquery-prettytextdiff/">Hello jQuery.PrettyTextDiff</a>
</h2>
<p class="meta">
<time datetime="2013-02-03T10:56:00+05:30" pubdate data-updated="true">Sunday, February the 3<span>rd</span>, 2013</time>
| <a href="/posts/2013/02/hello-jquery-prettytextdiff/#disqus_thread">Comments</a>
</p>
</header>
<p>For some work I did recently, I had to produce a visual diff of text.
A visual diff makes it easy for the user to understand what exactly
changed with a quick scan.</p>
<p>There’s an excellent library from Google, called
<a href="http://code.google.com/p/google-diff-match-patch/">diff_match_patch</a>
that does a really good job of analyzing the text and producing the
diffs in a programatic manner. However, it lacks the sauce to visually
present it to the user.</p>
<p>So I wrote a jQuery library which is a wrapper around Google’s library
and makes it trivial to wow your users.</p>
<footer>
<a rel="full-article" href="/posts/2013/02/hello-jquery-prettytextdiff/">Continue reading →</a>
</footer>
</article>
<article class="post">
<div class="sharing-box">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arnab-deka.com/index.html" data-via="or9ob" data-counturl="http://arnab-deka.com/index.html" data-size="large">Tweet</a>
<div class="g-plusone" data-size="medium"></div>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
</div>
<header>
<h2 class="entry-title">
<a href="/posts/2012/09/state-of-e-commerce-in-india/">State of E-commerce in India</a>
</h2>
<p class="meta">
<time datetime="2012-09-23T00:00:00+05:30" pubdate data-updated="true">Sunday, September the 23<span>rd</span>, 2012</time>
| <a href="/posts/2012/09/state-of-e-commerce-in-india/#disqus_thread">Comments</a>
</p>
</header>
<p>So, since moving back to India 4 months ago, we’ve trying to buy stuff
off the internet, like we did back in Seattle (oh Amazon), from
diapers to audio CDs (whaaaat? I know). While the world is much much
better compared to 2006, there are still some Idiocracies in the UX
and process. There are the big players (<a href="http://www.flipkart.com/">FlipKart</a>, <a href="http://www.infibeam.com/">infibeam</a>
and the like) where (from the 4 months experience) you’d find what you
are looking almost 6-7 times out of 10. The long-tail of e-commerce in
India is the real deal though – the tail is really really long. I use
<a href="http://www.junglee.com/">Junglee.com</a> to find the long time and almost always (9+ out of
10) the things I am looking for are found somewhere. Funny thing is
that you’ll never find two things you need in one site. Over these 4
months, I don’t think any of these sites have come up more than once
in my search.</p>
<footer>
<a rel="full-article" href="/posts/2012/09/state-of-e-commerce-in-india/">Continue reading →</a>
</footer>
</article>
<article class="post">
<div class="sharing-box">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arnab-deka.com/index.html" data-via="or9ob" data-counturl="http://arnab-deka.com/index.html" data-size="large">Tweet</a>
<div class="g-plusone" data-size="medium"></div>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
</div>
<header>
<h2 class="entry-title">
<a href="/posts/2012/09/emacs-change-fonts-dynamically-based-on-screen-resolution/">Emacs: Change Fonts Dynamically Based on Screen Resolution</a>
</h2>
<p class="meta">
<time datetime="2012-09-23T00:00:00+05:30" pubdate data-updated="true">Sunday, September the 23<span>rd</span>, 2012</time>
| <a href="/posts/2012/09/emacs-change-fonts-dynamically-based-on-screen-resolution/#disqus_thread">Comments</a>
</p>
</header>
<p>I regularly switch between a <a href="http://www.apple.com/thunderbolt/">Thunderbolt display</a> at home and the <a href="http://www.apple.com/macbook-pro/features/">Mac’s native retina display</a> when I’m in a coffee shop or the like.</p>
<p>It bugs me that I have to adjust emac’s font manually when I switch displays – started “re-using” emacs again last week. So I automated this today:</p>
<footer>
<a rel="full-article" href="/posts/2012/09/emacs-change-fonts-dynamically-based-on-screen-resolution/">Continue reading →</a>
</footer>
</article>
<article class="post">
<div class="sharing-box">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://arnab-deka.com/index.html" data-via="or9ob" data-counturl="http://arnab-deka.com/index.html" data-size="large">Tweet</a>
<div class="g-plusone" data-size="medium"></div>
<div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
</div>
<header>
<h2 class="entry-title">
<a href="/posts/2012/09/allowing-and-testing-cors-requests-in-rails/">Allowing and Testing CORS Requests in Rails</a>
</h2>
<p class="meta">
<time datetime="2012-09-19T14:28:00+05:30" pubdate data-updated="true">Wednesday, September the 19<span>th</span>, 2012</time>
| <a href="/posts/2012/09/allowing-and-testing-cors-requests-in-rails/#disqus_thread">Comments</a>
</p>
</header>
<p>I’m currently writing a <code>backbone</code>-based <code>Javascript</code> app that’s going
to directly call a <code>REST</code>-style API (implemented with <code>Rails</code> ).</p>
<blockquote><p>CORS (Cross-Origin Resource Sharing) is new technique makes it
possible for AJAX requests to directly talk to HTTP-services outside
it’s own domain. Read this <a href="http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/" title="Cross Domain AJAX with CORS">awesome primer</a> to read more on CORS.</p></blockquote>
<p>While there are lots of examples that show how to allow CORS requests
in Rails (just <a href="http://goo.gl/d8g3j">google</a>), they almost never have tests with them.
While it’s simple to test the HTTP headers, you may have to look
around a little (or a lot) on how to test a HTTP “OPTIONS” request.
When you make CORS requests, the browser may make a pre-flight
“OPTIONS” request to verify that the server allows CORS.</p>
<footer>
<a rel="full-article" href="/posts/2012/09/allowing-and-testing-cors-requests-in-rails/">Continue reading →</a>
</footer>
</article>
<nav role="navigation" id="pagination">
<span class="next">
<a href="/posts/page/2/" rel="next">Continue →</a>
</span>
</nav>
</section>
<script type="text/javascript">
var disqus_shortname = 'arnabdeka';
var disqus_script = 'count.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + 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.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 = 'http://platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>