-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.xml
692 lines (486 loc) · 45.6 KB
/
feed.xml
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
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
<channel>
<title xml:lang="en">Anand Iyer • CS PhD Student @ UC Berkeley</title>
<atom:link type="application/atom+xml" href="http://localhost:4000/feed.xml" rel="self"/>
<link>http://localhost:4000</link>
<pubDate>Wed, 14 Jun 2017 11:20:54 -0700</pubDate>
<lastBuildDate>Wed, 14 Jun 2017 11:20:54 -0700</lastBuildDate>
<language>en-US</language>
<generator>Jekyll v3.4.3</generator>
<description>Anand's personal website</description>
<image>
<description>Anand's personal website</description>
<url>http://localhost:4000/img/logo-rss.png</url>
<title>Anand Iyer • CS PhD Student @ UC Berkeley</title>
<link>http://localhost:4000</link>
<width>144</width>
<height>73</height>
</image>
<item>
<title>Managing Finances in Grad School</title>
<link>http://localhost:4000/blog/2014/managing-finances-in-gradschool.html</link>
<pubDate>Sat, 20 Dec 2014 00:25:00 -0800</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>Finance</category>
<guid isPermaLink="true">http://localhost:4000/blog/2014/managing-finances-in-gradschool.html</guid>
<description><p>Managing finances is one of the biggest challenges for a graduate student. This is especially true in the case of students with a family. This post is an attempt to summarize a few things that worked for me in getting my finances under control. Although this post is written with married graduate students in mind, I believe it is as useful, if not more, for others as well. </p>
<ul>
<li>
<p><strong>Track your cash flow</strong>. You should know where your money is going. I use <a href="https://www.mint.com" target="_blank">Mint</a> and <a href="https://www.personalcapital.com" target="_blank">Personal Capital</a> for this purpose. </p>
</li>
<li>
<p>Once you understand your spending patterns, <strong>create a budget</strong>. Have a goal in mind when creating the budget. For instance, my goal is to save a particular amount of money from every pay check. The good folks at YNAB is giving away their highly acclaimed software, You Need A Budget (YNAB), for <a href="http://www.youneedabudget.com/blog/2014/ynab-is-now-free-for-college-students/" target="_blank">free for students</a>. </p>
</li>
<li>
<p>It is hard, but make efforts to <strong>stick with your budget</strong>. <a href="https://levelmoney.com" target="_blank">Level</a> app helps me with this, it shows me how much I can spend without going over my budget. </p>
</li>
<li>
<p>Bank with an institution that does not ridicule you with miniscule rates and outrageous maintenance fee. I use <a href="http://www.ally.com/bank/online-savings-account/" target="_blank">Ally</a> bank. </p>
</li>
<li>
<p>If you manage to save money, <strong>invest your savings</strong>. With long-term inflation rate <a href="https://ycharts.com/indicators/us_inflation_rate" target="_blank">above 3%</a>, a savings account is a bad investment choice. <a href="https://www.wisebanyan.com/referral/yPHVSiMvT" target="_blank">WiseBanyan</a> lets you invest as low as $10 a month in a combination of stock and bond ETFs for free. The stock market has returned an average of <a href="http://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/histretSP.html" target="_blank">over 7%</a> historically. Assuming this holds in the future, investing $500 every month will make your net worth exceed the <a href="http://money.cnn.com/2014/06/11/news/economy/middle-class-wealth/" target="_blank">median American middle class</a> by the time you graduate! </p>
</li>
<li>
<p>Sign up for good cashback credit cards such as the Chase Freedom card. If you have more than one credit card, an interesting app to use is <a href="https://www.walla.by" target="_blank">Wallaby</a>, which tells you the best card to use when you shop. </p>
</li>
<li>
<p>Cellphone service is a basic necessity, but gone are those days when you had to spend a fortune on a decent plan. <a href="https://ringplus.net" target="_blank">RingPlus</a> and <a href="https://www.freedompop.com" target="_blank">FreedomPop</a> are among a new breed of operators offering <strong>FREE</strong> service. </p>
</li>
<li>
<p>While it is convenient to order things from Amazon and have it delivered to your home, many everyday essentials such as toothpaste, mouthwash, soap, body wash etc can be obtained absolutely <em>free</em> if you are willing to <strong>do a little bit of couponing</strong> along with some help from store specific blogs such as <a href="http://www.iheartcvs.com" target="_blank">IHeartCVS</a> and <a href="http://www.iheartwags.com" target="_blank">IHeartWags</a>. However, I must warn you that couponing is very additctive. </p>
</li>
</ul>
</description>
</item>
<item>
<title>Fixing missing bootcamp partition in OSX</title>
<link>http://localhost:4000/blog/2014/fixing-missing-bootcamp-partition-in-osx.html</link>
<pubDate>Wed, 28 May 2014 01:25:00 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2014/fixing-missing-bootcamp-partition-in-osx.html</guid>
<description><p><strong>Symptom:</strong> You use Bootcamp to dual-boot OSX and Windows. After installing Windows, you are not able to see the BOOTCAMP partition in OSX. If you try viewing the disk using disk utility, the BOOTCAMP partition is greyed out, and shows up as FAT formatted although it is NTFS formatted.</p>
<p>Turns out the issue occurs because of a modification during Windows installation. Once Bootcamp Assistant (BCA) created the BOOTCAMP partition and restarted the system, I noticed that there was an additional small-sized partition created (~600MB) just before the BOOTCAMP partition. Instead of ignoring it, I deleted and recreated the bootcamp partition from Windows setup hoping the wasted space would be reclaimed. That was a bad idea.</p>
<p>When you do this, it confuses the hybrid GPT/MBR partitioning scheme used by BCA. Essentially, when you remove/resize/add partitions via Windows setup, that information gets updated in the MBR record, but is not synced to the GPT record. Thus, Windows will see the OSX partition, but not vice-versa.</p>
<p>The easy way to fix this without going through the pain of removing and reinstalling Windows from scratch is to sync the MBR info back to the GPT record. Here’s how to do it:</p>
<p>First, we need detailed information on the MBR record—where the partition starts, where it ends etc. For this purpose, use the <code>gptsync</code> tool. Homebrew has the gptsync package, but if you try to use it, you’ll end up with the following error:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> Warning: Unknown GPT spec revision 0x00010000 </code></pre></figure>
<p>This is because of 64-bit incompatability. A fixed version of gptsync aimed at OSX, extracted from rEFIt is available <a href="https://github.com/JrCs/gptsync">here</a>. Just compile it using Xcode, and you’re good to go.</p>
<p>Running <code>gptsync</code> on my machine resulted in the following:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> &gt; ./gptsync /dev/disk0
Current GPT partition table:
<span class="c"># Start LBA End LBA Type</span>
<span class="m">1</span> <span class="m">40</span> <span class="m">409639</span> EFI System <span class="o">(</span>FAT<span class="o">)</span>
<span class="m">2</span> <span class="m">409640</span> <span class="m">250801735</span> Mac OS X HFS+
<span class="m">3</span> <span class="m">250801736</span> <span class="m">252071271</span> Mac OS X Boot
<span class="m">4</span> <span class="m">252071936</span> <span class="m">500117503</span> Basic Data
Current MBR partition table:
<span class="c"># A Start LBA End LBA Type</span>
<span class="m">1</span> <span class="m">1</span> <span class="m">409639</span> ee EFI Protective
<span class="m">2</span> <span class="m">409640</span> <span class="m">250801735</span> af Mac OS X HFS+
<span class="m">3</span> * <span class="m">250802176</span> <span class="m">251518975</span> <span class="m">07</span> NTFS/HPFS
<span class="m">4</span> <span class="m">251518976</span> <span class="m">500115455</span> <span class="m">07</span> NTFS/HPFS </code></pre></figure>
<p>In the scenario above, the solution was to modify the GPT table to match the MBR table. Essentially, delete partitions 3 and 4, and then recreate it as per MBR. For this purpose, I used the gdisk tool available <a href="http://www.rodsbooks.com/gdisk/">here</a>. Once installed, run the tool (usage instructions are similar to fdisk, tutorial is available on the tool’s website). I used <code>d</code> command to delete partitions 3 and 4, <code>n</code> command to recreate them with first sector and last sector noted from MBR and type 0700. Once done, check the changes using command <code>p</code>, and verify for errors using <code>v</code>. If there are no errors, confirm the changes by writing them with command <code>w</code>, reboot and enjoy! </p>
</description>
</item>
<item>
<title>Re-signing IPA files</title>
<link>http://localhost:4000/blog/2013/re-signing-ipa-files.html</link>
<pubDate>Thu, 28 Mar 2013 23:49:00 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2013/re-signing-ipa-files.html</guid>
<description><p>Scenario: You have an IPA that you want to test on a device, but the IPA was generated using a provisioning profile that does not include the device, and was signed with a certificate that is not yours. You drag this IPA to XCode’s organizer window hoping it would be installed on the connected device, but this results in an <code>Unknown error</code>.</p>
<p>Turns out that this is easy to fix. Here’s how to make it work. </p>
<p>First, unpack the IPA (<code>unzip -q &lt;IPA&gt;</code>). This would create a directory named <code>Payload</code> and a few other files. Delete the existing signature in the extracted package:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> rm -rf <span class="s2">&quot;Payload/*.app/_CodeSignature&quot;</span> <span class="s2">&quot;Payload/*.app/CodeResources&quot;</span></code></pre></figure>
<p>For the next step, you need two things: a valid provisioning profile and a valid certificate. Both can be obtained via the iOS developer portal. </p>
<p>Replace the provisioning profile first</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> cp &lt;PROVISIONING_PROFILE&gt; <span class="s2">&quot;Payload/*.app/embedded.mobileprovision&quot;</span></code></pre></figure>
<p>Then resign using your certificate (the certificate must be present in your keychain)</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
/usr/bin/codesign -f -s <span class="s2">&quot;&lt;CERTIFICATE&gt;&quot;</span> --resource-rules <span class="s2">&quot;Payload/*.app/ResourceRules.plist&quot;</span> <span class="s2">&quot;Payload/*.app&quot;</span></code></pre></figure>
<p>Now you can recreate the IPA and then drag &amp; drop it in the XCode organizer to install it on the device!</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> zip -qr &lt;IPA_resigned&gt; Payload </code></pre></figure>
<p><strong>Edit:</strong> If you are looking for user friendly options, check out the <a href="http://floatlearning.com/2011/11/re-signing-an-ios-app-without-xcode/" target="_blank">script by Daniel</a> or the <a href="http://www.gorbster.net/blog/archives/273" target="_blank">app by Brian</a>. </p>
</description>
</item>
<item>
<title>Gnuplot cairo terminal errors in Mountain Lion</title>
<link>http://localhost:4000/blog/2013/gnuplot-cairo-terminal-errors-in-mountain-lion.html</link>
<pubDate>Sun, 17 Mar 2013 20:31:00 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2013/gnuplot-cairo-terminal-errors-in-mountain-lion.html</guid>
<description><p>I love the cairo terminal in gnuplot, it creates amazing plots. My recent upgrade to Mountain Lion broke my homebrew based gnuplot installation, throwing a bunch of glib errors when I set the terminal to pdfcairo or pngcairo (normal terminals work fine): </p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> Error: GLib-GObject-CRITICAL **: gtype.c:2720: You forgot to call g_type_init<span class="o">()</span> </code></pre></figure>
<p>This is essentially an issue with the latest version of Pango package. There are two ways to fix this: </p>
<ul>
<li>Force homebrew to go back to a lower version of Pango; this error seems to appear in versions 1.32.6 or later.</li>
<li>Patch the gnuplot installation’s Cairo terminal as suggested <a href="https://github.com/mxcl/homebrew/pull/18528" target="_blank">here</a>.</li>
</ul>
<p><strong>Note:</strong> If you are not getting cairo terminals in your gnuplot installation, reinstall it with cairo option enabled: <code>brew install gnuplot --cairo</code></p>
</description>
</item>
<item>
<title>Latex Tips Collection</title>
<link>http://localhost:4000/blog/2013/latex-tips-collection.html</link>
<pubDate>Sun, 13 Jan 2013 07:56:30 -0800</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>latex</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2013/latex-tips-collection.html</guid>
<description><p>Over time, I’ve come across many useful Latex tips and tricks scattered across the internet. Here’s an attempt to collect some of those:</p>
<ul>
<li>
<p><strong><a href="http://gurmeet.net/computer-science/latex-tips-n-tricks-for-conference-papers/">Tips for Conference Papers</a> by Gurmeet Singh</strong></p>
<p>A nice set of tricks that saves your life at the last minute during deadlines.</p>
</li>
<li>
<p><strong><a href="http://www.read.seas.harvard.edu/~kohler/latex.html">Latex Usage Notes</a> by Eddie Kohler</strong></p>
<p>Solutions for common Latex problems, tips on proper formatting, etc.</p>
</li>
<li>
<p><strong><a href="http://www.tablesgenerator.com">Table Generator</a></strong></p>
<p>Easy way to generate latex source code for tables, supports booktabs style too!</p>
</li>
<li>
<p><strong><a href="http://detexify.kirelabs.org/classify.html">Detexify</a></strong></p>
<p>Find latex symbols by simply drawing them. Huge time saver when you are working on a deadline.</p>
</li>
</ul>
</description>
</item>
<item>
<title>Syncing folders outside Dropbox folder</title>
<link>http://localhost:4000/blog/2012/syncing-folders-outside-dropbox-folder.html</link>
<pubDate>Mon, 15 Oct 2012 23:25:03 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>any folder</category>
<category>dropbox</category>
<category>sugarsync</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2012/syncing-folders-outside-dropbox-folder.html</guid>
<description><p>A big complaint I have about <a href="http://db.tt/VZd1Zsgp">Dropbox</a> is that unlike <a href="https://www.sugarsync.com/referral?rf=fevam6f0oyxab&amp;utm_source=website&amp;utm_medium=web&amp;utm_campaign=referral&amp;shareEvent=2630716">SugarSync</a>, it doesn’t allow me to sync any folder in my computer (essentially, I need to place the folders I want to be synced inside the “Dropbox” folder).</p>
<p>Recently, I found a workaround for this problem. Here’s the trick to syncing any folder in your computer: softlink the folder to your Dropbox folder!</p>
<p>If you’re using a Mac (or Linux), just use the following command:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> ln -s /full-path-to-folder/file-to-sync ~/Dropbox/desired-folder-name</code></pre></figure>
<p>That’s it, from now on, all file(s) in the actual path would now sync with Dropbox.</p>
</description>
</item>
<item>
<title>Doxygen and OSX: Graphviz and other errors</title>
<link>http://localhost:4000/blog/2011/doxygen-and-osx.html</link>
<pubDate>Sun, 09 Oct 2011 16:16:05 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>doxygen</category>
<category>graphviz</category>
<category>lion</category>
<category>osx</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2011/doxygen-and-osx.html</guid>
<description><p>I’m a big fan of <a href="http://www.doxygen.org/">Doxygen</a>. I use it all the time to generate and analyze call trees. Recently, I wanted to use it in my MacbookPro for analyzing an open source project. There is a binary for SnowLeopard <a href="http://www.stack.nl/~dimitri/doxygen/download.html">here</a> that works in Lion too, but it was throwing lots of errors regarding Graphviz. Here are two things that I had to do to make it finally work:</p>
<ul>
<li>
<p>For some reason, long file names do not work in OSX. By default, Doxygen uses long names. So you need to set the <code>SHORT_NAMES</code> to <code>YES</code> in your doxygen file. If you are using the Wizard (GUI), then save your settings file (<code>File-&gt;Save</code>), and then manually edit the file in a text editor. </p>
</li>
<li>
<p>GraphViz is included in the dmg file. You need to set appropriate path to the dot file for graphviz to work. Try setting it to <code>/Applications/Doxygen.app/Contents/Resources</code>. If that fails, then use macports to install graphviz, and use that path.</p>
</li>
</ul>
</description>
</item>
<item>
<title>Making QXDM COM object work with Python</title>
<link>http://localhost:4000/blog/2011/making-qxdm-com-object-work-with-python.html</link>
<pubDate>Sat, 19 Feb 2011 08:21:17 -0800</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>COM</category>
<category>python</category>
<category>qxdm</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2011/making-qxdm-com-object-work-with-python.html</guid>
<description><p>Qualcomm’s <a href="http://www.qualcomm.com/products_services/testing_diagnostics/qxdm_pro.html">QXDM</a> is an amazing tool for getting diagnostic information from mobile phones. It supports automation where you can write scripts to interface with the COM object exposed by QXDM.</p>
<p>The default installation of QXDM comes with a number of examples on how to use this object. Unfortunately, all the examples are in Perl. Although I like Perl, recently I have been using Python for all my scripting needs. It’s actually very easy to convert all these scripts to Python. Here’s how:</p>
<ul>
<li>
<p>First, you need Python to be able to access COM objects. For this purpose, I used the Python comtypes package. Download and install it from <a href="http://sourceforge.net/projects/comtypes/files/">SourceForge</a>.</p>
</li>
<li>
<p>Now, you can do the following in your script:</p>
</li>
</ul>
<figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="kn">from</span> <span class="nn">comtypes.client</span> <span class="kn">import</span> <span class="n">CreateObject</span>
<span class="c"># For ISF file post-processing</span>
<span class="n">IISF</span> <span class="o">=</span> <span class="n">CreateObject</span><span class="p">(</span><span class="s">&quot;DMCoreAutomation.ItemStoreFiles&quot;</span><span class="p">)</span>
<span class="c"># For accessing data directly from QXDM. </span>
<span class="c"># Note that the script needs to be run as admin.</span>
<span class="n">QXDM</span> <span class="o">=</span> <span class="n">CreateObject</span><span class="p">(</span><span class="s">&quot;QXDM.Application&quot;</span><span class="p">)</span><span class="err"> </span></code></pre></figure>
</description>
</item>
<item>
<title>It's raining job offers at CET!</title>
<link>http://localhost:4000/blog/2010/its-raining-job-offers-at-cet.html</link>
<pubDate>Fri, 24 Dec 2010 03:38:31 -0800</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>cet</category>
<category>job offers</category>
<category>placements</category>
<category>Miscellaneous</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/its-raining-job-offers-at-cet.html</guid>
<description><p>Seems like it has been a fantastic placement season for the 2011 batch at my alma mater, <a href="http://en.wikipedia.org/wiki/College_of_Engineering,_Trivandrum">College of Engineering, Trivandrum</a> (CET). According to <a href="http://www.hinduonnet.com/2010/12/21/stories/2010122165900300.htm">this</a> article from <strong>The Hindu</strong>, 1019 job offers were made to a total of 540 students. Here’s the breakdown (courtesy: The Hindu):</p>
<p><img src="http://www.anand-iyer.com/blog/wp-content/uploads/2010/12/2010122165900301.jpg" alt="" /></p>
<p>Way to go CETians!!</p>
</description>
</item>
<item>
<title>Qualnet 4.0.1 woes!</title>
<link>http://localhost:4000/blog/2010/qualnet-4-0-1-woes.html</link>
<pubDate>Thu, 23 Dec 2010 01:06:15 -0800</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>qualnet 4.0</category>
<category>vc++</category>
<category>visual studio 2005</category>
<category>windows 7</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/qualnet-4-0-1-woes.html</guid>
<description><p>For my latest work, I am using the Qualnet simulator tool. Unfortunately, the version that I have access to is pretty old (version 4.0.1). Consequently, I had a lot of trouble getting it to compile in Windows 7. For those who are having the same trouble, see if what I did works for you:</p>
<ul>
<li>
<p>This version of Qualnet is only compatible with Visual Studio 2005 (I have tried VS 2008 and VS 2010 - although I succeeded in compiling, the executable crashes all the time). Install VS 2005 if you can get hold of it, or install Visual C++ 2005 Express edition which is available for free.</p>
</li>
<li>
<p>The second thing that is essential for building Qualnet is Windows 7 SDK. Download and install this from Microsoft.</p>
</li>
<li>
<p>Once you have both these installed, run the <code>vsvars32.bat</code> file to set the right environment variables. <code>vsvars32.bat</code> is available in the following folder: <code>C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\</code></p>
</li>
<li>
<p>Now try compiling qualnet. I used the following command inside <code>c:\qualnet\4.0\main</code> folder:</p>
</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
nmake /f Makefile-windows-vc8
</code></pre></figure>
<ul>
<li>
<p>For most, the compilation will fail giving errors in <code>oslrv2_nigata.cpp</code>. So go ahead and comment out this file in the makefile present in <code>qualnet\libraries\wireless\src</code></p>
</li>
<li>
<p>Try compiling again. Now the compiler would throw errors wherever routines from the file that we commented out. I had to comment out its usage wherever compilation broke.</p>
</li>
<li>
<p>Once I did that, compilation went smooth, and I was able to get qualnet working.</p>
</li>
</ul>
</description>
</item>
<item>
<title>ImportError with IronPython in C#</title>
<link>http://localhost:4000/blog/2010/importerror-with-ironpython-in-c.html</link>
<pubDate>Thu, 30 Sep 2010 15:48:44 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>C#</category>
<category>IronPython</category>
<category>searchpaths</category>
<category>xmlrpclib</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/importerror-with-ironpython-in-c.html</guid>
<description><p>I was using IronPython to execute python code inside my C# implementation lately, and I encountered this error when trying to use xmlrpclib:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
ImportError: No module named xmlrpclib.</code></pre></figure>
<p>It was really frustrating because if I try the same in IronPython console, it works fine. It turned out that this was a problem with search paths. When called via C# code, IronPython does not search for missing libraries unless you provide it a path to search for. Here’s how I solved this issue:</p>
<ol>
<li>First, find out the search paths that IronPython is using in console mode:</li>
</ol>
<figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="kn">import</span> <span class="nn">sys</span>
<span class="k">print</span> <span class="n">sys</span><span class="o">.</span><span class="n">path</span></code></pre></figure>
<p>This will print all the search paths. Save these paths somewhere.</p>
<ol>
<li>Now include all these search paths inside your C# code:</li>
</ol>
<figure class="highlight"><pre><code class="language-csharp" data-lang="csharp"><span class="n">ScriptEngine</span> <span class="n">Engine</span> <span class="p">=</span> <span class="n">Python</span><span class="p">.</span><span class="n">CreateEngine</span><span class="p">();</span>
<span class="n">ICollection</span><span class="p">&lt;</span><span class="kt">string</span><span class="p">&gt;</span> <span class="n">Paths</span> <span class="p">=</span> <span class="n">Engine</span><span class="p">.</span><span class="n">GetSearchPaths</span><span class="p">();</span>
<span class="n">Paths</span><span class="p">.</span><span class="n">Add</span><span class="p">(</span><span class="s">&quot;&lt;Path&gt;&quot;</span><span class="p">);</span>
<span class="n">Engine</span><span class="p">.</span><span class="n">SetSearchPaths</span><span class="p">(</span><span class="n">Paths</span><span class="p">);</span></code></pre></figure>
<p>Replace <code>&lt;Path&gt;</code> with the path you saved earlier. Now IronPython will search all these pathsbefore failing with an ImportError.</p>
</description>
</item>
<item>
<title>Conky like system monitor for Windows</title>
<link>http://localhost:4000/blog/2010/conky-like-system-monitor-for-windows.html</link>
<pubDate>Wed, 23 Jun 2010 06:15:57 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>conky</category>
<category>rainmeter</category>
<category>system monitor</category>
<category>windows</category>
<category>Miscellaneous</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/conky-like-system-monitor-for-windows.html</guid>
<description><p>Ever since I came across <a href="http://conky.sourceforge.net/">Conky</a>, I have been using it on all my machines running Ubuntu (for those who are interested, I use <a href="http://gnome-look.org/content/show.php/CONKY-colors?content=92328">Conky-Colors</a> for easy configuration). I also use Windows extensively and had always wanted to have something similar to Conky. It seems like my quest has finally ended. My good friend suggested that I try <a href="http://rainmeter.net/">RainMeter</a>, and I was impressed with the results! It’s extremely customizable, has tons of skins to choose from, and is not heavy on the system.</p>
<p>Here’s a screenshot (the theme I’m using is <a href="http://jsmorley.deviantart.com/art/JSMeterII-161282085">JSMeterII</a>):</p>
<p><img src="/img/Desktop-300x187.png" alt="" /></p>
</description>
</item>
<item>
<title>NS3 in Eclipse</title>
<link>http://localhost:4000/blog/2010/ns3-in-eclipse.html</link>
<pubDate>Sun, 30 May 2010 11:58:55 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>10.04</category>
<category>eclipse</category>
<category>galileo</category>
<category>lucid lynx</category>
<category>ns3</category>
<category>ubuntu</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/ns3-in-eclipse.html</guid>
<description><p>I found <a href="http://www.nsnam.org/wiki/index.php/HOWTO_configure_eclipse_with_ns-3">this</a> wiki page on configuring NS3 with Eclipse and decided to give it a try. I had trouble compiling, and Eclipse kept giving the following error:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
Cannot run program <span class="s2">&quot;waf&quot;</span>: Unknown reason<span class="o">)</span></code></pre></figure>
<p>After spending a little time with the configuration, the following additional tweaking seems to be working (in Ubuntu 10.04, Eclipse version 3.5.2 Galileo with ns-allinone-3.8):</p>
<ol>
<li>
<p>Create a new External tool configuration. The location should be the location to waf (<code>${workspace_loc:/ns3/waf}</code> in my case) and working directory should be the directory where waf is present (<code>${workspace_loc:/ns3/}</code> in my case). In arguments textbox, provide the following: <code>--run "${string_prompt}"</code>. Now when you try to build the project (right click on the <code>project -&gt; Build Project</code>), it should work.</p>
</li>
<li>
<p>To run NS3 programs using waf, you need to create a new Run configuration. Make the new configuration to be a C/C++ application. Select the project you want this run configuration to be associated with, and give the complete path to waf as the C/C++ program. Click on the arguments tab, and provide the same argument as above. Now when you try to run a program, a dialog box should pop-up asking for the input arguments to waf and your program should run.</p>
</li>
</ol>
</description>
</item>
<item>
<title>NS2 in Ubuntu 10.04</title>
<link>http://localhost:4000/blog/2010/ns2-in-ubuntu-10-04.html</link>
<pubDate>Wed, 19 May 2010 04:13:49 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>10.04</category>
<category>lucid lynx</category>
<category>ns2</category>
<category>ubuntu</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/ns2-in-ubuntu-10-04.html</guid>
<description><p>I spent a reasonably long time getting NS-2 (ns-allinone-2.34) to work in Ubuntu 10.04. Here’s how I finally did it:</p>
<p>Install necessary tools for building:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> sudo apt-get install build-essential autoconf automake libxmu-dev gcc-4.3</code></pre></figure>
<p>It turns out that otcl does not like the version of gcc installed by default in Lucid. So go ahead and change <code>ns-allinone-2.34/otcl-1.13/Makefile.in</code>. Find the line that says:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="nv">CC</span><span class="o">=</span> @CC@</code></pre></figure>
<p>and change it to:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="nv">CC</span><span class="o">=</span> gcc-4.3</code></pre></figure>
<p>Now try doing <code>./install</code> from the ns-allinone-2.34 directory. It should work.</p>
</description>
</item>
<item>
<title>ath5k “Master” mode</title>
<link>http://localhost:4000/blog/2010/ath5k-master-mode.html</link>
<pubDate>Thu, 06 May 2010 09:11:34 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>10.04</category>
<category>ath5k</category>
<category>hostapd</category>
<category>lucid lynx</category>
<category>ubuntu</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/ath5k-master-mode.html</guid>
<description><p>To enable Master mode in ath5k, do the following:</p>
<ol>
<li>
<p>Make sure you are running kernel 2.6.29 or higher. If not, you need to get the latest patches for ath5k.</p>
</li>
<li>
<p>Install hostapd. It is available in Ubuntu repositories.</p>
</li>
<li>
<p>Create a config file for hostapd. A simple one is:</p>
</li>
</ol>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">interface</span><span class="o">=</span>wlan0
<span class="nv">driver</span><span class="o">=</span>nl80211
<span class="nv">ssid</span><span class="o">=</span><span class="nb">test</span>
<span class="nv">channel</span><span class="o">=</span>1</code></pre></figure>
<ol>
<li>Now you can start hostapd to put the card in master mode:</li>
</ol>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
sudo hostapd &lt;config_file&gt;</code></pre></figure>
</description>
</item>
<item>
<title>Royaltek RBT-2300 and Karmic Koala</title>
<link>http://localhost:4000/blog/2010/royaltek-rbt-2300-and-karmic-koala.html</link>
<pubDate>Wed, 31 Mar 2010 15:48:46 -0700</pubDate>
<dc:creator>anandpiyer</dc:creator>
<category>9.10</category>
<category>GPS</category>
<category>royaltek</category>
<category>ubuntu</category>
<category>Tips</category>
<guid isPermaLink="true">http://localhost:4000/blog/2010/royaltek-rbt-2300-and-karmic-koala.html</guid>
<description><p>I recently had to make use of a GPS logger in Linux. Here’s how I made it work in Karmic, incase any one is interested:</p>
<ul>
<li>First, make sure you have necessary bluetooth packages. If not, install it using:</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
sudo apt-get install bluetooth
sudo apt-get install libbluetooth-dev</code></pre></figure>
<ul>
<li>Switch on the GPS, scan and check if you can find the device:</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
sudo hcitool scan</code></pre></figure>
<p>The output would be something like the following:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
Scanning ...
00:aa:bb:cc:dd:ee BlueGPS CCDDEE</code></pre></figure>
<p>We are interested in the channel in which the device operates. Let’s find that out:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
sudo sdptool records 00:aa:bb:cc:dd:ee</code></pre></figure>
<p>This will give you lots of information about the device. Pay attention to the channel. For instance, my device says:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
Service Name: Dev B
Service RecHandle: 0x10000
Service Class ID List:
<span class="s2">&quot;Serial Port&quot;</span> <span class="o">(</span>0x1101<span class="o">)</span>
Protocol Descriptor List:
<span class="s2">&quot;L2CAP&quot;</span> <span class="o">(</span>0x0100<span class="o">)</span>
<span class="s2">&quot;RFCOMM&quot;</span> <span class="o">(</span>0x0003<span class="o">)</span>
&lt;strong&gt;Channel: 1&lt;/strong&gt;
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100</code></pre></figure>
<ul>
<li>Use this channel to create an entry in the <code>rfcomm.conf</code> file:</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
sudo gedit /etc/bluetooth/rfcomm.conf</code></pre></figure>
<p>enter the following at the end of the file:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
<span class="c"># Bluetooth GPS</span>
rfcomm2 <span class="o">{</span>
<span class="nb">bind </span>yes,
device 00:aa:bb:cc:dd:ee,
channel 1,
comment <span class="s2">&quot;Serial Port&quot;</span>,
<span class="o">}</span></code></pre></figure>
<p>Once you have done this, you can connect to the device:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="nv">$ </span>sudo rfcomm connect 2
Connected /dev/rfcomm2 to 00:aa:bb:cc:dd:ee on channel 1
Press CTRL-C <span class="k">for</span> hangup</code></pre></figure>
<ul>
<li>I found rtkgps (<a href="http://wohlberg.net/public/software/misc/rtkgps/">http://wohlberg.net/public/software/misc/rtkgps/</a>) to be a good utility to access GPS logs.</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
rtkgps -d /dev/rfcomm2 <span class="nb">read</span></code></pre></figure>
</description>
</item>
</channel>
</rss>