<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4194045693156146911</id><updated>2024-10-12T07:10:20.888+08:00</updated><category term="Tips And Tricks"/><category term="Debian"/><category term="Mac"/><category term="Blog"/><category term="Bash"/><category term="BootCamp"/><category term="Linux"/><category term="Linux Mint"/><category term="Plugins Blogger"/><category term="Python"/><category term="R"/><category term="Eclipse"/><category term="Excel"/><category term="Oracle"/><category term="Quantmod"/><category term="VirtualBox"/><category term="Windows 7"/><category term="Adsense"/><category term="Ant"/><category term="CPAN"/><category term="Coding"/><category term="Core Dump"/><category term="FIX"/><category term="Frontrow"/><category term="Fun"/><category term="GTD"/><category term="Getting Referenced"/><category term="Getting Things Done"/><category term="Grep"/><category term="Jenkins"/><category term="Kernel"/><category term="Mercurial"/><category term="One Liner"/><category term="Outlook"/><category term="Perl"/><category term="Regular Expression"/><category term="SEO"/><category term="Solaris"/><category term="Svn"/><category term="Technology"/><category term="Unix"/><category term="Zenphoto"/><category term="easy_install"/><category term="hgsubversion"/><title type='text'>XiuxiXiuxi</title><subtitle type='html'>Sit back and enjoy.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xiuxixiuxi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-5361768681314834864</id><published>2013-04-03T22:03:00.000+08:00</published><updated>2013-04-03T22:03:00.747+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>How to install packages with easy_install or pip through proxy</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
There are two easy way to install packages for python (regardless of the platform you&#39;re using), namely easy_install and pip. The later is actually an overlay on the former.&lt;/div&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
They work very nicely, except with pesky proxies. Both of them have the ability to download through proxy, but they use different syntax.&lt;/div&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
For pip you will simply add the option &lt;i&gt;&#39;--proxy&#39;&lt;/i&gt; to indicate the proxy address like so:&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/AlexColson/5297905.js&quot;&gt;&lt;/script&gt;


&lt;br /&gt;
&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
Whereas easy_install will rely on environment variables, &lt;i&gt;http_proxy&lt;/i&gt;, &lt;i&gt;https_proxy&lt;/i&gt; , &lt;i&gt;ftp_proxy&lt;/i&gt;
&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/AlexColson/5297929.js&quot;&gt;&lt;/script&gt;


&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
If you want those settings to persist, don&#39;t forget to add them to your bashrc, or through your windows settings
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5361768681314834864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5361768681314834864'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2013/04/how-to-install-packages-with.html' title='How to install packages with easy_install or pip through proxy'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-8061631690055749990</id><published>2013-02-18T20:00:00.000+08:00</published><updated>2013-02-19T06:55:22.932+08:00</updated><title type='text'>Enabling WebSSO / Kerberos Auth in Firefox</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;I&#39;ve been using Chrome for a while, but i recently switched back to Firefox, at least for work (mostly for memory usage reasons).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp;XMarks makes the back and forth transition a piece of cake. The only issue that i had was with Kerberos / WebSSO which was enabled by default on Chrome but not Firefox.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;Its a simple configuration change though. all you need to do is access the settings by typing &quot;about:config&quot; in the address bar and search for the following items:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;network.negotiate-auth.trusted-uris: value= mySite1.com,mySite2.com&lt;/li&gt;
&lt;li&gt;network.negotiate-auth.delegation-uris : value= mySite1.com,mySite2.com&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;network.automatic-ntlm-auth.trusted-uris: value= mySite1.com,mySite2.com&lt;/li&gt;
&lt;li&gt;network.automatic-ntlm-auth.allow-proxies: value=true&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;network.negotiate-auth.allow-proxies: value=true&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
And you&#39;re good to go.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8061631690055749990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8061631690055749990'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2013/02/enabling-websso-kerberos-auth-in-firefox.html' title='Enabling WebSSO / Kerberos Auth in Firefox'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-6615918325219074731</id><published>2012-03-19T20:30:00.000+08:00</published><updated>2012-03-19T20:30:00.275+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BootCamp"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><title type='text'>Control fan speed under windows 7 installed with bootcamp on mac</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This week end temperature&amp;nbsp;suddenly came back to&amp;nbsp;30s (Celcius) which mean winter seems to be over here (HK). Although this is fantastic new as the weather was gorgeous, my trusty mac wasn&#39;t so happy. I put him under very heavy load, and cooling didn&#39;t seem to work so great.&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So i went trying to manually crank up the fan speed. I tried SpeedFan which is a very good tool, but&amp;nbsp;unfortunately doesn&#39;t seem to be able to control fan speed on my Mac running windows 7 (from what I&#39;ve read in various places&amp;nbsp;&amp;nbsp;this is &quot;normal&quot;).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Still I&#39;ve found a work around, simple increase the default running speed of the fans. It doesn&#39;t make my box more noisy, but that&#39;s fine for me. Do do that you need to change the default running speed of the fan under MacOs and it&#39;ll carry over to Windows7.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I did that using a tool named &lt;a href=&quot;http://www.lobotomo.com/products/FanControl/&quot; target=&quot;_blank&quot;&gt;&quot;Fan Control&quot;&lt;/a&gt;. Install it, raise the speed to max and all the thresholds to the minimum.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/6615918325219074731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/6615918325219074731'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2012/03/control-fan-speed-under-windows-7.html' title='Control fan speed under windows 7 installed with bootcamp on mac'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-4479086093408046908</id><published>2012-02-20T20:00:00.000+08:00</published><updated>2012-02-20T20:00:01.720+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ant"/><category scheme="http://www.blogger.com/atom/ns#" term="Jenkins"/><title type='text'>Ant - setting Environment variables in a Hudson/Jenkins build</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Today, while trying to setup Jenkins for a project, one of the job includes a ant build for a java project. This build has been working pretty well for some time, but i wanted to automate in inside Jenkins. I encountered a problem when i tried to create the new jenkins job, because the ant build references some environment variables.&lt;br /&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
The manual build itself was composed of two part, a shell script that set some environment variables, and the build.xml file itself which reference those variables. Obviously depending on different environment, the variables would have different values.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Inside the build file the variables are referenced like this:&lt;/div&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;property name=&quot;proj.lib.dir&quot; value=&quot;${env.SOME_DIR}&quot;&gt;
&lt;/property&gt;&lt;/pre&gt;
&lt;div&gt;
And the shell script simply does an &quot;export SOME_DIR=blablabla&quot; before calling ant.
&lt;br /&gt;
&lt;br /&gt;
So now the trick is to be able to define those environment variable inside the Jenkins job in such a way that ant would pick it up (without calling the actual shell script). When you setup the job, under Build &amp;gt; Invoke Ant, click on &quot;Advanced&quot; and in the &quot;Properties&quot; textbox, simple define the variable as follow:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx5r4zKhwvTmtC6i4i68KR5GXlx0pg1mkUZu7F68_ptw_Q98G46jA38dFiyDkeoB4R3xoOeG8gjAkHVD-18koO_B85ZLfsxiw1LkZh2X7tz89C9cuKH05ejfBERrOhtm5wraeLMJvN_3pR/s1600/Jenkins-Ant-SetVariable.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx5r4zKhwvTmtC6i4i68KR5GXlx0pg1mkUZu7F68_ptw_Q98G46jA38dFiyDkeoB4R3xoOeG8gjAkHVD-18koO_B85ZLfsxiw1LkZh2X7tz89C9cuKH05ejfBERrOhtm5wraeLMJvN_3pR/s640/Jenkins-Ant-SetVariable.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And you&#39;re good to go.&lt;br /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/4479086093408046908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/4479086093408046908'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2012/02/ant-setting-environment-variables-in.html' title='Ant - setting Environment variables in a Hudson/Jenkins build'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx5r4zKhwvTmtC6i4i68KR5GXlx0pg1mkUZu7F68_ptw_Q98G46jA38dFiyDkeoB4R3xoOeG8gjAkHVD-18koO_B85ZLfsxiw1LkZh2X7tz89C9cuKH05ejfBERrOhtm5wraeLMJvN_3pR/s72-c/Jenkins-Ant-SetVariable.PNG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-3050606089258396008</id><published>2012-02-07T17:35:00.000+08:00</published><updated>2012-02-07T17:35:18.586+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bash"/><category scheme="http://www.blogger.com/atom/ns#" term="One Liner"/><title type='text'>How to display the top x biggest folder under unix linux</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
As the titles mentions here&#39;s a little one liner when you want to find out who&#39;s are the top disk space users under a certain directory:&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;du -sk * | sort -nr | cut -f2 | head -5 | xargs du -sh&lt;/div&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
The command above show the top 5 offenders in a nice readable way (i.e not in kb which i find hard to read):
&lt;pre class=&quot;brush: shell&quot;&gt;$ du -sk * | sort -nr | cut -f2 | head -5 | xargs du -sh
 3.2G   Offender1
 1.8G   Offender2
 1.3G   Offender3
 1.1G   Offender4
 603M   Offender5
&lt;/pre&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3050606089258396008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3050606089258396008'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2012/02/how-to-display-top-x-biggest-folder.html' title='How to display the top x biggest folder under unix linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-3887212513396476714</id><published>2012-02-06T19:50:00.000+08:00</published><updated>2012-04-05T10:23:12.942+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bash"/><category scheme="http://www.blogger.com/atom/ns#" term="FIX"/><category scheme="http://www.blogger.com/atom/ns#" term="Grep"/><title type='text'>How to grep for NULL char</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Was trying to extract some FIX messages from log files, and more precisely filter out a number of messages like heartbeat. My initial thought was to do something like that:&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;cat fixlog.log | grep &#39;\[8=FIX.&#39; | tr &#39;\1&#39; &#39;|&#39; | grep -v &#39;\|35=0&#39;
&lt;/pre&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;br /&gt;
That works fine, except it&#39;s a little bit wasteful. What this command above does is, replace all the &lt;i&gt;null&lt;/i&gt;&amp;nbsp;character (that are used as delimiter in FIX messages) by &quot;|&quot;. So that got me thinking how I could filter out those without having to replace anything. My first idea was:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;cat C20120203.log | grep &#39;\[8=FIX.&#39; | grep -v &#39;\00135=D&#39;&lt;/pre&gt;
&lt;br /&gt;
That didn&#39;t work because grep was interpreting \001 as a back reference. Several variants later (among which the use of sed) and some&amp;nbsp;constructive&amp;nbsp;goggling made me understand that the the problem wasn&#39;t coming from grep but from bash and here&#39;s the proof.&lt;br /&gt;
&lt;br /&gt;
If you type the following (under linux):&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;$ echo &#39;\001&#39; | hexdump -C
00000000  5c 30 30 31 0a                                    |\001.|
00000005
&lt;/pre&gt;
&lt;br /&gt;
The trick is to tell bash do some quoting (escaping), and you do that by prefixing the string with $:
&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;$ echo $&#39;\001&#39; | hexdump -C
00000000  01 0a                                             |..|
00000002
&lt;/pre&gt;
&lt;br /&gt;
So putting it all together the original command above becomes:
&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;cat fixlog.log | grep &#39;\[8=FIX.&#39; | grep -v $&#39;\00135=0&#39;
&lt;/pre&gt;
The mechanism allow you to grep for any arbitrary ASCII character.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3887212513396476714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3887212513396476714'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2012/02/how-to-grep-for-null-char.html' title='How to grep for NULL char'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-8824138829790956914</id><published>2011-11-25T10:10:00.001+08:00</published><updated>2011-11-25T10:25:31.312+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="easy_install"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>How to use easy_install through a proxy</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You first need to make sure that the shell variable http_proxy is defined:&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;
$ env | grep http_proxy
http_proxy=http://your-proxy.com:yourport
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
On this done you can run simply run easy_install as follow:&lt;/div&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;
sudo -E easy_install your_package
&lt;/pre&gt;

The &quot;-E&quot; parameter for sudo preserves your environment (namely variables) which is not the default behavior.
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8824138829790956914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8824138829790956914'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/11/how-to-use-easyinstall-through-proxy.html' title='How to use easy_install through a proxy'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-5787916302498937473</id><published>2011-11-22T06:45:00.001+08:00</published><updated>2012-02-07T08:20:40.856+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><title type='text'>How to fix windows 7 install stuck at step &quot;Finalizing your settings&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
While trying to install windows 7 on my shiny Macbook, after the whole ordeal i had went through (See &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac.html&quot;&gt;here &lt;/a&gt;and &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac_21.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; for more details), I finally had the install going and was at the last step.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
By last step I mean my computer had already rebooted several times, went through &quot;Setting up your computer for first time use&quot;, and was at the step &quot;Finalizing your settings&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
Unfortunatly this last step took forever. By Forever i mean, after leaving my computer at it the whole night,&amp;nbsp;was still&amp;nbsp;stuck there in the morning.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
After a&amp;nbsp;bit of investigation on Mr Google, i found out that you can start a console by pressing &quot;Shift-F10&quot;. I then typed:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;tasklist /v | more



Image Name                     PID Session Name        Session#    Mem Usage Status          User Name                                              CPU Time Window Title                                                            
========================= ======== ================ =========== ============ =============== ================================================== ============ ========================================================================
System Idle Process              0 Services                   0         24 K Unknown         NT AUTHORITY\SYSTEM                                    13:03:01 N/A                                                                     
System                           4 Services                   0        500 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:27 N/A                                                                     
...
svchost.exe                   1840 Services                   0      1,908 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 N/A                                                                     
SearchIndexer.exe              752 Services                   0     10,956 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:03 N/A                                                                     
cmd.exe                       1176 Console                    1      7,372 K Running         NT AUTHORITY\SYSTEM                                     0:00:00 \sources\$oem$\post\kb890830-x86.exe                                    
conhost.exe                   1244 Console                    1      1,392 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 N/A                                                                     
svchost.exe                    240 Services                   0      2,020 K Unknown         NT AUTHORITY\LOCAL SERVICE                              0:00:00 N/A                                                                     
svchost.exe                   1956 Services                   0      5,828 K Unknown         NT AUTHORITY\SYSTEM                                     0:00:00 N/A                                                                     
cmd.exe                       3816 Console                    1      2,672 K Running         NT AUTHORITY\SYSTEM                                     0:00:00 Administrator: C:\Windows\system32\cmd.exe - tasklist  /v
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
And there&amp;nbsp;I saw this KB installer which didn&#39;t seem to be doing anything. So i simply killed it with &quot;taskkill /PID 1176&quot;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;br /&gt;
And tadam, the computer finally finished installed.&lt;br /&gt;
&lt;br /&gt;
That concludes this 3 parts guide ( &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac.html&quot; target=&quot;_blank&quot;&gt;part 1&lt;/a&gt; and &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac_21.html&quot; target=&quot;_blank&quot;&gt;part 2&lt;/a&gt; here) on how to install Windows 7 on a Macbook Pro circa 2009 with bootcamp 4.0.1.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;Don&#39;t forget to click the &quot;+1&quot; button if that was helpful :)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5787916302498937473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5787916302498937473'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/11/how-to-fix-windows-7-install-stuck-at.html' title='How to fix windows 7 install stuck at step &quot;Finalizing your settings&quot;'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-1664723402657743993</id><published>2011-11-21T19:28:00.001+08:00</published><updated>2012-04-17T20:24:58.745+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BootCamp"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>Install Windows 7 with boot camp on mac (Part 2)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Small resume from &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac.html&quot;&gt;Part 1&lt;/a&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;I am the (un)happy owner of a late 2008 Macbook Pro&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;My super Drive is DEAD&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;I have Mac OS X Lion installed on my mac&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;For whatever (foolish) reason I want to install Windows 7 on a Bootcamp partition&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;I used Bootcamp 4.0.1&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In the guide below i will explain how i managed to (finally) install Windows 7 on my bootcamp partition. But before we go further, some important warning. This whole procedure is at best dangerous, and is not for the faint hearted. It can possibly screw up your disk, follow it at your own risk. I strongly advise that you read this guide completely before starting this whole procedure by yourself. Now that you&#39;ve been warned, let&#39;s get started.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Pre-requisite:&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Have &lt;a href=&quot;http://www.virtualbox.org/&quot;&gt;Virtual Box &lt;/a&gt;installed on you Mac&lt;/li&gt;
&lt;li&gt;Have everything back up because there&#39;s a possibility that this procedure screw up your disk&lt;/li&gt;
&lt;li&gt;Download and put on a separate USB disk the&amp;nbsp;WindowsSupport (using bootcamp assistant)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
What this guide does is essentially do the initial install step of windows (copying all the files, formatting ...) from inside a VM, stop the VM right after the first reboot, &amp;nbsp;and then reboot your real machine this time to continue and finish the install.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
At the time of writing this guide i have VirtualBox 4.1.6 r74713, and i&#39;m running Mac OS 10.7.2.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 0&lt;/b&gt;: BACK UP ! and make sure you have an install CD / DVD / USB handy.&lt;/div&gt;
&lt;div&gt;
Use whatever solution you like, to backup your data, be it Time Machine, &lt;a href=&quot;http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html&quot;&gt;SuperDuper&lt;/a&gt; or &lt;a href=&quot;http://www.grapefruit.ch/iBackup/CNFJcLGa21dBvLIBDtThpBh0675RqQ&quot;&gt;iBackup&lt;/a&gt;. &amp;nbsp;If you still don&#39;t have back up do it now.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 1&lt;/b&gt;: Create a Bootcamp partition using the boot camp assistant&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 2&lt;/b&gt;: Unmount / Eject Bootcamp partition if you can see it in your Finder&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiytpdOk-G-SMna-zEMFN4pNO5IePPPn4raeeq-cP9npASqjfgU0NNJUKuu_h7ryev2b8ruUFLEXkVyWFcG75bWO-LtH4JVbD5qrpcVZMcZDKt2EVcuvh0CW-LB1C5_syYQ2lLn4jmz4I1n/s1600/Screen+Shot+2011-11-21+at+7.27.00+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;330&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiytpdOk-G-SMna-zEMFN4pNO5IePPPn4raeeq-cP9npASqjfgU0NNJUKuu_h7ryev2b8ruUFLEXkVyWFcG75bWO-LtH4JVbD5qrpcVZMcZDKt2EVcuvh0CW-LB1C5_syYQ2lLn4jmz4I1n/s400/Screen+Shot+2011-11-21+at+7.27.00+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 3&lt;/b&gt;: Create Virtual disk&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
I created a folder that will contain the virtual disk and the VM itself.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;mkdir -p ~/VirtualBox VMs/B7
cd ~/VirtualBox VMs/B7
sudo chmod 777 /dev/disk0s3
VBoxManage internalcommands createrawvmdk -rawdisk /dev/disk0 -filename bootcamp.vmdk -partitions 3
sudo chmod 777 *.vmdk
&lt;/pre&gt;
&lt;br /&gt;
&lt;div&gt;
The step above assume that your boot camp partition is the 3rd one on the first disk (using &quot;diskutil list&quot; in a terminal):&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9D7HdlXZrxhuWeDNvpBZ8MnkzrFb4cYFDuLwIj-pEB0gcR1Vns5bqNK3eFj3gnKx85qiVOClPHqFqY4spzvnp-2ILRzMUPTIPbl_MrgG8oakNBTb3emCi08w4EcYJ7wCq3YCWKAXhTgga/s1600/Screen+Shot+2011-11-21+at+9.22.51+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;58&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9D7HdlXZrxhuWeDNvpBZ8MnkzrFb4cYFDuLwIj-pEB0gcR1Vns5bqNK3eFj3gnKx85qiVOClPHqFqY4spzvnp-2ILRzMUPTIPbl_MrgG8oakNBTb3emCi08w4EcYJ7wCq3YCWKAXhTgga/s400/Screen+Shot+2011-11-21+at+9.22.51+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4&lt;/b&gt;: Create a VM Using the vmdk you just created:&lt;br /&gt;
Once you have the virtual disk created, you can start VirtualBox and create a new virtual machine, make sure you use the disk you just create as the VM disk.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUqlYdzDndH7CXpdtVj-YG9aEjOp7PFQlzQilPkCHx50u_JPsCwIHv2wvm8EY5ls9tgzRDF17MTYmg9mmJEBxQyU4HU-If1r-fJOq1ZBC3FCgrNWWS3-2qL-1iU-4aP7tY0LmDU-RnOs8Z/s1600/Screen+Shot+2011-11-21+at+9.25.17+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUqlYdzDndH7CXpdtVj-YG9aEjOp7PFQlzQilPkCHx50u_JPsCwIHv2wvm8EY5ls9tgzRDF17MTYmg9mmJEBxQyU4HU-If1r-fJOq1ZBC3FCgrNWWS3-2qL-1iU-4aP7tY0LmDU-RnOs8Z/s400/Screen+Shot+2011-11-21+at+9.25.17+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Step 5&lt;/b&gt;: Format and Install Windows 7&lt;/div&gt;
&lt;div&gt;
Once the above is done, you can start booting up the VM on your install CD/ISO. When you get to the screen of partition selection make sure to select the one named &quot;BOOTCAMP&quot;:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgguK9yeHFGa_njZsP1t5jyz1kVMy6rdnR_n5ch2FVXLu7uJLf0PGr44HGpdEbH-44Td-eTMzYH83xH1iGgclv27JwrY0wmVpYoqXMy8Uw12frHl9X-ohsg6fvU5NIyZRwJOVkJQPdP-hjx/s1600/Screen+Shot+2011-11-21+at+7.31.42+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgguK9yeHFGa_njZsP1t5jyz1kVMy6rdnR_n5ch2FVXLu7uJLf0PGr44HGpdEbH-44Td-eTMzYH83xH1iGgclv27JwrY0wmVpYoqXMy8Uw12frHl9X-ohsg6fvU5NIyZRwJOVkJQPdP-hjx/s640/Screen+Shot+2011-11-21+at+7.31.42+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
﻿&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Then Click on &quot;Drive options&quot; and then &quot;Format&quot;:&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghRYwiAS5AOjZa3W-5qQT7GOJDcG1crGHInZ9zcnpm6d0a0t2KbjdyFMbO2h6yxeCtKEmzNlSvc_Z6RvuXWzWA6ksEy2_ccfbmlKvo0mnqLmuQ2kyn5jHC6Xko0F2OcFJ-6RDuCuwQrv9t/s1600/Screen+Shot+2011-11-21+at+7.32.14+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghRYwiAS5AOjZa3W-5qQT7GOJDcG1crGHInZ9zcnpm6d0a0t2KbjdyFMbO2h6yxeCtKEmzNlSvc_Z6RvuXWzWA6ksEy2_ccfbmlKvo0mnqLmuQ2kyn5jHC6Xko0F2OcFJ-6RDuCuwQrv9t/s400/Screen+Shot+2011-11-21+at+7.32.14+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhesxdiOT0toNi7R-SX31bklQYVmb5MUWdhb1g-8NC-sWO1emFZV3331rPwzZ0aaiC8EDoq15rIOPKQuTuAZmZza-BTDo0f1KgsAW2_EBitnSCw82DY8wvrRAWPM2kiOtUdQ7qUrs9PXl2v/s1600/Screen+Shot+2011-11-21+at+7.33.55+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhesxdiOT0toNi7R-SX31bklQYVmb5MUWdhb1g-8NC-sWO1emFZV3331rPwzZ0aaiC8EDoq15rIOPKQuTuAZmZza-BTDo0f1KgsAW2_EBitnSCw82DY8wvrRAWPM2kiOtUdQ7qUrs9PXl2v/s400/Screen+Shot+2011-11-21+at+7.33.55+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Note that after formatting the disk the name of the partition is changed to basically nothing. Nothing to be alarmed about. You can then proceed to the next step and let windows do its job, until it reaches the first reboot.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
When you reach the first reboot, let the VM shutdown properly, but when it restarts, turn it off for good. It now time to reboot your real machine and continue the setup in &quot;Hardware mode&quot; so to speak. When your Mac reboots, don&#39;t forget to hold the &quot;Option&quot; key to be able to boot on the windows partition.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Thanks to &lt;a href=&quot;http://dashes.com/anil/2009/10/how-to-run-windows-7-under-mac-os-x-106-for-free.html&quot; target=&quot;_blank&quot;&gt;Anil Dash&lt;/a&gt; from which i got the idea of create a virtual disk pointing to a real partition.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
Hope this guide will help.&lt;br /&gt;
&lt;br /&gt;
Don&#39;t forget to click the &quot;+1&quot; button if that was helpful.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
PS: There was an unforseen &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/how-to-fix-windows-7-install-stuck-at.html&quot; target=&quot;_blank&quot;&gt;Part 3&lt;/a&gt; where the Windows Installer got stuck.&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/1664723402657743993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/1664723402657743993'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac_21.html' title='Install Windows 7 with boot camp on mac (Part 2)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiytpdOk-G-SMna-zEMFN4pNO5IePPPn4raeeq-cP9npASqjfgU0NNJUKuu_h7ryev2b8ruUFLEXkVyWFcG75bWO-LtH4JVbD5qrpcVZMcZDKt2EVcuvh0CW-LB1C5_syYQ2lLn4jmz4I1n/s72-c/Screen+Shot+2011-11-21+at+7.27.00+PM.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-5411419565555942711</id><published>2011-11-21T19:24:00.001+08:00</published><updated>2012-04-16T21:28:24.552+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BootCamp"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>Windows 7 with boot camp on macbook late 2008 (Part 1)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
In this serie of articles, i will describe the steps I followed while trying to install a Windows 7 in Boot Camp. I will try to make this guide as detailed as possible in hope it&#39;ll be helpful to other people. But before i dive in a bit of context, that has its importance.
&lt;br /&gt;
&lt;br /&gt;
My computer is a MacBook Pro of late 2008, whose Superdrive is unfortunately dead. Which meant i was not able to simple put in the DVD install of Windows 7 into my Superdrive into my MacBook, which left me with trying to install it from a USB boot disk. Unfortunately, my Mac being from late 2008, it means that usb boot disk was out of the question, which i only discovered after trying to the steps below.
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The guide below will detail how to create a bootable USB on a 2008 MacBook Pro (and by extension on a Mac that doesn&#39;t support boot on USB). If that&#39;s not of interest you can skip to &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac_21.html&quot; target=&quot;_blank&quot;&gt;Part 2&lt;/a&gt; directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also important point I have OSX Lion installed, more importantly Boot Camp 4.0.1.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3Hmt0HIYRhvbUGgWuGeCn3WfhhTFgkge4FK2-djLQS_dKfcz1_92Fx7qME9vl_55JyreXvi67_das10Q2oUC_H221OVUP7v9HlXtSKGSo5fOyPwYz6daiwQsw6xEo3L5otxp4xQTXFU-6/s1600/Screen+Shot+2011-11-21+at+8.03.13+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3Hmt0HIYRhvbUGgWuGeCn3WfhhTFgkge4FK2-djLQS_dKfcz1_92Fx7qME9vl_55JyreXvi67_das10Q2oUC_H221OVUP7v9HlXtSKGSo5fOyPwYz6daiwQsw6xEo3L5otxp4xQTXFU-6/s1600/Screen+Shot+2011-11-21+at+8.03.13+PM.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It has a very nice option that allows you to create a USB boot disk (on top of creating bootcamp partition, and downloading Windows Support files). Having read that i wanted to give it a try. But when i started it, the &quot;Create a Windows 7 install disk&quot; was grayed:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1YczD83BbW6NWI0KFXzYI59Mk94U2bFq0tnAiM-0dLNA7U9SgqmiJ0JNkpo5Zy5_qg6U4dcK1pKc0Lt_p8ruYXcaf09vb2MaPVOq3PTcNr2obOxIk7gB-OB_erQwKUCyuy5Mj418_qFXu/s1600/Screen+Shot+2011-11-21+at+8.14.54+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1YczD83BbW6NWI0KFXzYI59Mk94U2bFq0tnAiM-0dLNA7U9SgqmiJ0JNkpo5Zy5_qg6U4dcK1pKc0Lt_p8ruYXcaf09vb2MaPVOq3PTcNr2obOxIk7gB-OB_erQwKUCyuy5Mj418_qFXu/s400/Screen+Shot+2011-11-21+at+8.14.54+PM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
That is due, as I understand, to the fact that my Mac model is not supposed to be able to boot from USB. In order to solve that I had to tinker with the &quot;Boot Camp Assistant&quot; application.&lt;br /&gt;
&lt;br /&gt;
First Ctrl+Click on&amp;nbsp;&quot;Boot Camp Assistant&quot;, then &quot;Show Package Contents&quot; &amp;gt; Contents, then edit &quot;info.plist:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: xml&quot;&gt;&lt;key&gt;USBBootSupportedModels&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;MBP51&lt;/string&gt; 
    &lt;string&gt;IM130&lt;/string&gt;
    &lt;string&gt;MM50&lt;/string&gt;
    &lt;string&gt;MP60&lt;/string&gt;
    &lt;string&gt;MB80&lt;/string&gt;
    &lt;string&gt;MBP90&lt;/string&gt;
    &lt;string&gt;MBA40&lt;/string&gt;
&lt;/array&gt;
&lt;/pre&gt;
&lt;br /&gt;
To figure out the model use the &quot;System Information&quot;, next to &quot;Model Identifier&quot;:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib5mKD1kASagyaZY2D5UXTtesvf1DVSZSFANCsBBDD3c4UQkbqbUF0GKe4aVCWD4hRMRSVgiCyaxnyIOO5izG8ApH9u3gWge4G_B85GbLNUIklcm9AedVmHZfB306ASubAcvzLwVwAB9oi/s1600/Screen+Shot+2011-11-21+at+8.54.25+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;44&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib5mKD1kASagyaZY2D5UXTtesvf1DVSZSFANCsBBDD3c4UQkbqbUF0GKe4aVCWD4hRMRSVgiCyaxnyIOO5izG8ApH9u3gWge4G_B85GbLNUIklcm9AedVmHZfB306ASubAcvzLwVwAB9oi/s320/Screen+Shot+2011-11-21+at+8.54.25+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
From the name it was pretty easy to figure out the reference is &lt;i&gt;MBP51&lt;/i&gt;. A MacBook would have been &lt;i&gt;MBxx&lt;/i&gt; and a MacBook Air &amp;nbsp;&lt;i&gt;MBAxx.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After saving the file, i was able to create a USB Boot Disk&amp;nbsp;for Windows7&amp;nbsp;using the assistant.&lt;br /&gt;
&lt;br /&gt;
Also this whole procedure didn&#39;t work (and probably won&#39;t work for anyone in the same situation), it might be helpful if you need to create an usb boot disk for another new machine.&lt;br /&gt;
&lt;br /&gt;
Don&#39;t forget to click the &quot;+1&quot; button if that was helpful :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now for the meaty bits,&amp;nbsp;how to really start installing windows7 on  Boot Camp partition,&amp;nbsp;head over to&amp;nbsp;&lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac_21.html&quot; target=&quot;_blank&quot;&gt;Part 2&lt;/a&gt;.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5411419565555942711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5411419565555942711'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/11/install-windows-7-with-bootcamp-on-mac.html' title='Windows 7 with boot camp on macbook late 2008 (Part 1)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3Hmt0HIYRhvbUGgWuGeCn3WfhhTFgkge4FK2-djLQS_dKfcz1_92Fx7qME9vl_55JyreXvi67_das10Q2oUC_H221OVUP7v9HlXtSKGSo5fOyPwYz6daiwQsw6xEo3L5otxp4xQTXFU-6/s72-c/Screen+Shot+2011-11-21+at+8.03.13+PM.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-8914905745470499985</id><published>2011-11-17T12:08:00.001+08:00</published><updated>2012-12-12T15:47:29.044+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>How to install cx_Oracle and oracle client on debian</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this post i&#39;m going to explain how to install and use the python lib named cx_Oracle on a debian box. To make things a little more &lt;i&gt;spicy, &lt;/i&gt;i will start from the assumption that oracle is not installed on the box, and that i don&#39;t want to install a full fledged oracle server on my box.&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So after this procedure i will have a minimal install of oracle libs, that means the bare minimum to use cx_Oracle. More precisely, that means no oracle client, no sqlplus will be on that box.&lt;br /&gt;
&lt;br /&gt;
The first step is to download the oracle instant client and the cx_Oracle library that matches. Out of&amp;nbsp;laziness, i decided to use the pre compiled version of&amp;nbsp;cx_Oracle.&lt;br /&gt;
&lt;br /&gt;
Do download oracle instant client, go on oracle website &lt;a href=&quot;http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html&quot;&gt;here&lt;/a&gt;. Then choose the&amp;nbsp;platform&amp;nbsp;that / library that matches your oracle server. For me it was &lt;i&gt;&quot;instantclient-basiclite-linux32-11.2.0.2.0.zip&quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
Once you have downloaded that file unzip it and install it. I personnaly chose to install it in (i.e move the unzipped folder) into&amp;nbsp;/usr/local/lib.&lt;br /&gt;
&lt;br /&gt;
Once this done, you need to define two variables:&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;export ORACLE_HOME=/usr/local/lib/instantclient_11_1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/instantclient_11_1
&lt;/pre&gt;
&lt;br /&gt;
Once this is done, we can move on to install cx_Oracle. I downloaded the RPM version that matches my python and oracle version, in my case&amp;nbsp;&lt;i&gt;cx_Oracle-5.1.1-11g-py26-1.i386.rpm.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
Being under debian, RPM is not the favored method to install packages. Fortunately there&#39;s an utility that allows to convert RPMs to DEB files called alien. Here&#39;s the steps to install alien and cx_Oracle:&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;# install alien
sudo apt-get install alien

# convert cx_Oracle-5.1.1-11g-py26-1.i386.rpm to cx_Oracle-5.1.1-11g-py26-1.i386.deb and install it
alien -i cx_Oracle-5.1.1-11g-py26-1.i386.rpm

&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Once that done, there&#39;s one last step. This installed cx_Oracle library was installed under &lt;i&gt;/usr/lib/python2.6/site-packages&lt;/i&gt;. Unfortunatly by default, site-packages wasn&#39;t part of the default python search path. There&#39;s several ways to go around that which i won&#39;t describe at length (more details &lt;a href=&quot;http://docs.python.org/install/index.html&quot;&gt;here &lt;/a&gt;under &quot;Modifying Python’s Search Path&quot;). I chose to modify site.py under&amp;nbsp;&lt;i&gt;/usr/lib/python2.6/ &lt;/i&gt;(mostly because it&#39;s the first but probably not the last package that will be installed in site-packages).&lt;br /&gt;
&lt;br /&gt;
In order to do that I simply edited site.py and searched for&amp;nbsp;addsitepackages and edited it as follow:&lt;br /&gt;
&lt;pre style=&quot;background: #000000; color: #d1d1d1;&quot;&gt;&lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;def&lt;/span&gt; addsitepackages&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;known_paths&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #9999a9;&quot;&gt;&quot;&quot;&quot;Add site-packages (and possibly site-python) to sys.path&quot;&quot;&quot;&lt;/span&gt;
    sitedirs &lt;span style=&quot;color: #d2cd86;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d2cd86;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;]&lt;/span&gt;
    seen &lt;span style=&quot;color: #d2cd86;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d2cd86;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;]&lt;/span&gt;

    &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;for&lt;/span&gt; prefix &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;in&lt;/span&gt; PREFIXES&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;not&lt;/span&gt; prefix &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;or&lt;/span&gt; prefix &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;in&lt;/span&gt; seen&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;continue&lt;/span&gt;
        seen&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;

        &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;if&lt;/span&gt; sys&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;platform &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00c4c4;&quot;&gt;&#39;os2emx&#39;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&#39;riscos&#39;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;Lib&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;site-packages&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;elif&lt;/span&gt; os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;sep &lt;span style=&quot;color: #d2cd86;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&#39;/&#39;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;local/lib&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                        &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;python&quot;&lt;/span&gt; &lt;span style=&quot;color: #d2cd86;&quot;&gt;+&lt;/span&gt; sys&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;version&lt;span style=&quot;color: #d2cd86;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                        &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;dist-packages&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;lib&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                        &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;python&quot;&lt;/span&gt; &lt;span style=&quot;color: #d2cd86;&quot;&gt;+&lt;/span&gt; sys&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;version&lt;span style=&quot;color: #d2cd86;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                        &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;dist-packages&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;lib&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;dist-python&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;

            &lt;span style=&quot;color: #9999a9;&quot;&gt;##################&lt;/span&gt;
        &lt;span style=&quot;color: #9999a9;&quot;&gt;# added following line to make site-packages part of default search path&lt;/span&gt;
            &lt;span style=&quot;color: #9999a9;&quot;&gt;#################&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;lib&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                        &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;python&quot;&lt;/span&gt; &lt;span style=&quot;color: #d2cd86;&quot;&gt;+&lt;/span&gt; sys&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;version&lt;span style=&quot;color: #d2cd86;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                        &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;site-packages&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;

        &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;
            sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;lib&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;site-packages&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;

        &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;if&lt;/span&gt; sys&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;platform &lt;span style=&quot;color: #d2cd86;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;darwin&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
            &lt;span style=&quot;color: #9999a9;&quot;&gt;# for framework builds *only* we add the standard Apple&lt;/span&gt;
            &lt;span style=&quot;color: #9999a9;&quot;&gt;# locations. Currently only per-user, but /Library and&lt;/span&gt;
            &lt;span style=&quot;color: #9999a9;&quot;&gt;# /Network/Library could be added too&lt;/span&gt;
            &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&#39;Python.framework&#39;&lt;/span&gt; &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;in&lt;/span&gt; prefix&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
                sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;append&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;
                    os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;expanduser&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;
                        os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;join&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;~&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;Library&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;Python&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt;
                                     sys&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;version&lt;span style=&quot;color: #d2cd86;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #00c4c4;&quot;&gt;&quot;site-packages&quot;&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;

    &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;for&lt;/span&gt; sitedir &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;in&lt;/span&gt; sitedirs&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
        &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;if&lt;/span&gt; os&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;path&lt;span style=&quot;color: #d2cd86;&quot;&gt;.&lt;/span&gt;isdir&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;sitedir&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d2cd86;&quot;&gt;:&lt;/span&gt;
            addsitedir&lt;span style=&quot;color: #d2cd86;&quot;&gt;(&lt;/span&gt;sitedir&lt;span style=&quot;color: #d2cd86;&quot;&gt;,&lt;/span&gt; known_paths&lt;span style=&quot;color: #d2cd86;&quot;&gt;)&lt;/span&gt;

    &lt;span style=&quot;color: #e66170; font-weight: bold;&quot;&gt;return&lt;/span&gt; known_paths
&lt;/pre&gt;
&lt;br /&gt;
After all that, you should be able to type &quot;import cx_Oracle&quot;.
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8914905745470499985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8914905745470499985'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/11/how-to-install-cxoracle-and-oracle.html' title='How to install cx_Oracle and oracle client on debian'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-5502545886137011140</id><published>2011-10-26T14:43:00.002+08:00</published><updated>2011-10-26T14:44:07.258+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Coding"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><title type='text'>Eclipse syntax highlighting: how to configure same occurrence color properly</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Eclipse has some nice syntax highlighting feature, especially with the popular&amp;nbsp;add-on&amp;nbsp;&quot;Eclipse Color Theme&quot; from the Market place. The result is pretty nice, at least for my taste:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMu2H0f55EuqOdCGLq5sAdmFboMDp65gPe0cXctO7pe4NA3bkQSMfpI8R6XJ86QZ6-EU3tIkbQ4o-j_-I0uhY1RUzYndS-IUqMtdm1oB5T_wNmiFqfIosc-fG71NmtdEdmeDDmvLuTbKXj/s1600/eclipse+color+theme.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMu2H0f55EuqOdCGLq5sAdmFboMDp65gPe0cXctO7pe4NA3bkQSMfpI8R6XJ86QZ6-EU3tIkbQ4o-j_-I0uhY1RUzYndS-IUqMtdm1oB5T_wNmiFqfIosc-fG71NmtdEdmeDDmvLuTbKXj/s400/eclipse+color+theme.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;(here the obsidian theme)&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
On very nice feature is the ability to highlight automatically same&amp;nbsp;occurrences&amp;nbsp;of same.&amp;nbsp;Unfortunately&amp;nbsp;as you see here the &quot;follow&quot; keyword is totally bloated and unreadable.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This can be configured, but it&#39;s that there&#39;s a legion of option for syntax highlighting. This one is actually controlled by &quot;annotations&quot;, more specifically &quot;C++ occurences&quot;:&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRJV1q5HWYeh3-cOt7poFOVX4ac_D6i3Z57-c4qVuFbGOsUExGeqAH_tnV7heie9zKfUaUBgg_xvNq8Jb1Xi4t8Vs3SVJnhFV8SdFdaKeuItqO5D0IVgIIuH4ehhuxIF7Bjn85gUFOgp7d/s1600/eclipse+annotation+color.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;496&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRJV1q5HWYeh3-cOt7poFOVX4ac_D6i3Z57-c4qVuFbGOsUExGeqAH_tnV7heie9zKfUaUBgg_xvNq8Jb1Xi4t8Vs3SVJnhFV8SdFdaKeuItqO5D0IVgIIuH4ehhuxIF7Bjn85gUFOgp7d/s640/eclipse+annotation+color.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And its&amp;nbsp;suddenly&amp;nbsp;much more readable.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5502545886137011140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5502545886137011140'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/10/eclipse-syntax-highlighting-how-to.html' title='Eclipse syntax highlighting: how to configure same occurrence color properly'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMu2H0f55EuqOdCGLq5sAdmFboMDp65gPe0cXctO7pe4NA3bkQSMfpI8R6XJ86QZ6-EU3tIkbQ4o-j_-I0uhY1RUzYndS-IUqMtdm1oB5T_wNmiFqfIosc-fG71NmtdEdmeDDmvLuTbKXj/s72-c/eclipse+color+theme.JPG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-7459105287784800919</id><published>2011-10-14T18:11:00.001+08:00</published><updated>2011-10-14T18:11:18.129+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips And Tricks"/><title type='text'>Enabling proxy under Debian</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
In order to enabled a proxy, there&#39;s two main places (at least for my use this did the trick, there&#39;s probably are others). The first one is simple defining the following variables:&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
export http_proxy=&quot;http://your.proxy.com:your_port&quot;&lt;/div&gt;
&lt;div&gt;
export ftp_proxy=&quot;http://your.proxy.com:your_port&quot;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Secondly in order to have apt-get work through proxy, you need to update&amp;nbsp;/etc/apt/apt.conf.d/proxy (or create it):&lt;/div&gt;
&lt;div&gt;
Acquire::http::Proxy &quot;http:///your.proxy.com:your_port&quot;;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/7459105287784800919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/7459105287784800919'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/10/enabling-proxy-under-debian.html' title='Enabling proxy under Debian'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-8304371419428348736</id><published>2011-10-14T18:06:00.003+08:00</published><updated>2011-10-14T18:06:52.682+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>VirtualBox: Creating new VM by duplicating existing one</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The other day i tried to create a new VM by duplicating an existing one. Everything worked perfectly ... except all network interface were disable. And it was impossible to mount up those network interfaces.&lt;br /&gt;
&lt;br /&gt;
If you duplicated a new VM from an existing one, you have to do a couple of things. First MAC addresses should be changed in new VM.&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then once the VM is created, disabled all network interface and boot it up. Once the machine is started, there&#39;s a couple of files to update for the hostname. I&#39;m using a Debian squeeze, so path may change in other distributions:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;/etc/hosts&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;/etc/hostname&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then you need to need to edit&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Lucida Grande&#39;, &#39;Trebuchet MS&#39;, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e1ebf2;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e1ebf2; font-weight: bold;&quot;&gt;/etc/udev/rules.d/.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&amp;nbsp; &lt;/b&gt;What happens is it maps the &quot;new&quot; mac address to a new interface.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: &#39;Lucida Grande&#39;, &#39;Trebuchet MS&#39;, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;You just need to remove the old one and rename the new one (thanks to the solution from this forum:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://forums.virtualbox.org/viewtopic.php?t=7749&quot;&gt;https://forums.virtualbox.org/viewtopic.php?t=7749&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Lucida Grande&#39;, &#39;Trebuchet MS&#39;, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: seagreen; font-family: Monaco, &#39;Andale Mono&#39;, &#39;Courier New&#39;, Courier, mono;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: seagreen; font-family: Monaco, &#39;Andale Mono&#39;, &#39;Courier New&#39;, Courier, mono; font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8304371419428348736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/8304371419428348736'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/10/virtualbox-creating-new-vm-by.html' title='VirtualBox: Creating new VM by duplicating existing one'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-4492615113164001665</id><published>2011-06-09T21:26:00.000+08:00</published><updated>2011-06-09T21:26:08.111+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>Using Eclipse as your R IDE</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;There&#39;s a bunch of possible IDE which are R specific, amongst which to name a few:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;RKWard&lt;/li&gt;
&lt;li&gt;R Studio (my personal favorite)&lt;/li&gt;
&lt;li&gt;Rattle&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;There&#39;s a very long list each with their own pros and cons, which I &amp;nbsp;don&#39;t intend to discuss in this post.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;What i do want to discuss is the usage of Eclipse as a R IDE. Why use it compared to other. Well being a developer during the day, I rather like the idea of using the same tool at night so to speak. Another added bonus on top of syntax completion, object inspection, is the integration with an which ever SCM you like to use. For me that&#39;s the icing on the cake. Time being of the essence I don&#39;t want to look anything and relying on a SCM is a perfect way to do that.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Now enough talk. In order to have that integration working you need a couple of things:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;StatET: that&#39;s the eclipse plugin&amp;nbsp;(see &lt;a href=&quot;http://www.walware.de/?page=/it/statet/&quot;&gt;here&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;rj : that&#39;s the &quot;other side of StatET (see &lt;a href=&quot;http://www.walware.de/?page=/it/statet/&quot;&gt;here&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;rJava: that&#39;s a java binder with R&amp;nbsp;(see &lt;a href=&quot;http://www.rforge.net/rJava/&quot;&gt;here&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Then follow the excellent step by step guide &lt;a href=&quot;http://lukemiller.org/index.php/2010/04/eclipse-and-statet-a-nice-working-environment-for-r/&quot;&gt;here&lt;/a&gt; on how to setup Eclipse itself in order to work with R.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Enjoy&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/4492615113164001665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/4492615113164001665'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/06/using-eclipse-as-your-r-ide.html' title='Using Eclipse as your R IDE'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-1507646088197128639</id><published>2011-05-23T16:17:00.000+08:00</published><updated>2011-05-23T16:17:25.138+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hgsubversion"/><category scheme="http://www.blogger.com/atom/ns#" term="Mercurial"/><category scheme="http://www.blogger.com/atom/ns#" term="Svn"/><title type='text'>Mercurial integration with SVN.</title><content type='html'>I&#39;ve recently been evaluating integration of SVN with some other distributed source control systems, mainly Git and Mercurial. The idea is to have a distributed source control system that would integrate&amp;nbsp;seamlessly&amp;nbsp;with a central SVN repository (very slow and painfull access over internet). That allows a certain number of things, amongst which there is fast access to commit history, cheap branches to experiment...&lt;br /&gt;
&lt;br /&gt;
At some point I had both Mercurial and Git installed, and decided it was time to do a bit of cleanup.&amp;nbsp;I have a bias towards Mercurial because it has a better integration in Windows explorer through TortoiseHG (you can call that lazyness).&lt;br /&gt;
&lt;br /&gt;
After uninstalling everything I started clean, installed the latest TortoiseHG version (which btw has a very nice GUI), as well as hgsubversion as explained here:&amp;nbsp;&lt;a href=&quot;http://mercurial.aragost.com/kick-start/en/hgsubversion/&quot;&gt;Getting started with HGSubversion&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;div&gt;Mercurial was working fine but I was running into the following error each time I tried to clone our repo:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
hg clone svn+ssh://myuser@myrepo.com/someotherpath&lt;br /&gt;
destination directory: someotherpath&lt;br /&gt;
abort: Can&#39;t create tunnel: The system cannot find the file specified.&lt;br /&gt;
&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;
That error message has been driving me nuts for a while, and after trying a lot of things (uninstalling everything, installing Git again, checking library versions ...), I stumbled upon &lt;a href=&quot;http://www.svnforum.org/threads/38997-Windows-SVN-SSH-PuTTY-plink-quot-Can-t-create-tunnel...-qu&quot;&gt;the solution&amp;nbsp;&lt;/a&gt;:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
set SVN_SSH=&quot;C:\\Program Files\\PuTTY\\plink.exe&quot;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
As simple as that... Just define that variable&amp;nbsp;SVN_SSH and it worked flowlessly. After that I justed defined it in my user environment to make it persist.&lt;br /&gt;
&lt;br /&gt;
Hopefully this will help someone else.&lt;/div&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/1507646088197128639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/1507646088197128639'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/05/mercurial-integration-with-svn.html' title='Mercurial integration with SVN.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-7746340803232613369</id><published>2011-05-07T11:24:00.000+08:00</published><updated>2011-05-07T11:24:09.464+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quantmod"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>K-means clustering using R</title><content type='html'>I&#39;m trying to learn R, and I&#39;m a firm believer that there&#39;s not better way to learn than by getting your hands dirty. After reading an excellent &lt;a href=&quot;http://intelligenttradingtech.blogspot.com/2010/06/quantitative-candlestick-pattern.html&quot;&gt;post on Intelligent Trading blog&lt;/a&gt;, it got me thinking how you would do a clustering analysis with R, using K-means.&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In the rest of this post I will try to detail the different steps that I followed, in hope that it can be&amp;nbsp;useful&amp;nbsp;to others. In this post I will be using a couple of R packages, namely quantmod, fpc and a few others. The most crucial is quantmod. You can install it with:&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script src=&quot;http://pastebin.com/embed_js.php?i=MdQvHWax&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;They are used for:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;quantmod: this is your bread and butter to ease time series analysis&lt;/li&gt;
&lt;li&gt;graphics, scatterplot3d, gplots RColorBrewer are used for plotting&lt;/li&gt;
&lt;li&gt;fpc: this packages is package dedicated to clustering&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;First this article supposes that you already have your data handy in a xts object used by quantmot. If it&#39;s not the case have a look at &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/04/how-to-load-csv-data-with-quantmod-in-r.html&quot;&gt;this article&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In the details below, &quot;x&quot; is the name of the object that contains my timeserie. Now let dig into it.&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is create matrix with the different criteria you want to use for the clustering. In my case I&#39;m going to use three normalized ratios, Close / Open, High / Open, &amp;nbsp;Low / Open , and then stuff them into a matrix.&amp;nbsp;Then you want to process the actual cluster and display it:&lt;/div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=RhqGp1JT&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;The result looks like:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRoarYvHJTMUHGXy-VLByfeVN2BvNpccWF970qCytWfwfYTVekXjh4vC7O1klYLQ5cHn6kIXE1clgKq0kyH9s0YJziDQPviwHN-fSAy9-xfydDLdpOHznUsKy0vZFvABAzkfhjo69lbhAy/s1600/clusterPlot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRoarYvHJTMUHGXy-VLByfeVN2BvNpccWF970qCytWfwfYTVekXjh4vC7O1klYLQ5cHn6kIXE1clgKq0kyH9s0YJziDQPviwHN-fSAy9-xfydDLdpOHznUsKy0vZFvABAzkfhjo69lbhAy/s400/clusterPlot.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;This works pretty well, except you have to specify a number of cluster you&#39;re looking for. Another may to do this is through the pamk function from the fpc package, for for which you don&#39;t specify the actual number of cluster, it will be calculated (you provide a range of value though):&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=dzjUcsXa&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;br /&gt;
Note the difference with kmeans method, the cluster information is packed into a pam object. That why you access the cluster details through zpamk$pamobject.&lt;br /&gt;
&lt;br /&gt;
Enjoy.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/7746340803232613369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/7746340803232613369'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/05/k-means-clustering-using-r.html' title='K-means clustering using R'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRoarYvHJTMUHGXy-VLByfeVN2BvNpccWF970qCytWfwfYTVekXjh4vC7O1klYLQ5cHn6kIXE1clgKq0kyH9s0YJziDQPviwHN-fSAy9-xfydDLdpOHznUsKy0vZFvABAzkfhjo69lbhAy/s72-c/clusterPlot.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-2715426745604032295</id><published>2011-05-06T22:38:00.002+08:00</published><updated>2011-05-06T22:39:13.683+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bash"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips And Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="Zenphoto"/><title type='text'>Thumbnails for Videos</title><content type='html'>I recently installed a web gallery to host photos and videos named Zenphoto. It works perfectly to my taste except for a small detail. Video galleries load a flash player named flowplayer, which does the job nicely,&amp;nbsp;but until you click on the actual video to make the flash player load, you can&#39;t see a thumbnail of the video.&lt;br /&gt;
&lt;div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;The solution to have thumbnails for videos in Zenphotos, the same way you have for photos, is to place a jpg with the same name as the video. For instance if you have a video named &lt;i&gt;a.mp4&lt;/i&gt;, create a jpeg named &lt;i&gt;a.jpg&lt;/i&gt; in the same folder as the video. This photo will be used as thumbnail for you video.&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;It&#39;s fine to do a few manually ... but call me lazy I don&#39;t fancy the extra manual step each time I need to add a new video. So a create a little script to generate the thumbnails.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Before digging in the details, it assumes a few things. First this only works under linux, so you must not be afraid of command line. Secondly it relies on ffmpeg to extract a frame automatically.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;If you don&#39;t have ffmpeg and you&#39;re using an Ubuntu / Debian type:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=sBBrH2gX&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Then you into the folder under which the videos are and type:&lt;/div&gt;&lt;div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=LWcwKE5m&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;And paste the following content into the file:&lt;/div&gt;&lt;div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=wgytyQJG&quot;&gt;
&lt;/script&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
Run the script and you&#39;re done.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/2715426745604032295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/2715426745604032295'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/05/thumbnails-for-videos.html' title='Thumbnails for Videos'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-5102567931441204547</id><published>2011-04-21T22:59:00.002+08:00</published><updated>2011-04-21T23:41:57.376+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quantmod"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>How to load csv data with quantmod in R</title><content type='html'>In this article I&#39;m going to describe how to load data in an xts object, which is the&amp;nbsp;preferred&amp;nbsp;object to handle time series quantmod from a CSV file. This article is really for beginner (like myself), hopefully those can be helpful to others.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Let&#39;s imagine you have some csv data that look like:&lt;/div&gt;&lt;div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=kxDKE3d0&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;div&gt;First thing you need to make sure is that you column headers have names that contain &amp;nbsp;Open, High, Low and Close. This will make you life much easier. Secondly, your csv file should only contain dates, and numerical data, otherwise it&#39;s kind of a hassle and you have to go and manually convert data afterwards. So &amp;nbsp;what your data should really look like is:&lt;/div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=Db1UuWVR&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Personnally I &quot;massaged&quot; the data in R, but you could very well do that in Excel, Perl, Python, or whatever tool you fancy (or simply correct the data at the source ;) ) but for the sake of example this is how I did it:&lt;/div&gt;&lt;script src=&quot;http://pastebin.com/embed_js.php?i=KqQZQnyQ&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have the correct data, it&#39;s pretty simple to load :&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;http://pastebin.com/embed_js.php?i=4mdCqeai&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
You&#39;re now the proud owner of an xts object that you can start abusing in all the ways you&#39;d like ;)&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;http://pastebin.com/embed_js.php?i=GFFkpVfq&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this helps</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5102567931441204547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/5102567931441204547'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/how-to-load-csv-data-with-quantmod-in-r.html' title='How to load csv data with quantmod in R'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-4173233577993481345</id><published>2011-04-18T23:44:00.000+08:00</published><updated>2011-04-18T23:44:56.171+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>How to extract a DEB file</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;DEB files are &lt;em&gt;ar archives&lt;/em&gt;, which contain three files:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;debian-binary&lt;/li&gt;
&lt;li&gt;control.tar.gz&lt;/li&gt;
&lt;li&gt;data.tar.gz&lt;/li&gt;
&lt;/ul&gt;The actual data is contained into data.tar.gz. You can extract it with the following command:&lt;br /&gt;
&lt;/div&gt;&lt;pre class=&quot;brush: bash&quot;&gt;ar p yourfile.deb data.tar.gz | tar xz
&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/4173233577993481345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/4173233577993481345'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/how-to-extract-deb-file.html' title='How to extract a DEB file'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-1088461754275268848</id><published>2011-04-17T10:02:00.003+08:00</published><updated>2011-04-18T23:59:44.465+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Kernel"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux Mint"/><title type='text'>Compiling a linux kernel on a Debian &quot;like&quot; distribution</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;I recently had to re-compile a kernel, and there&#39;s a few preliminaries. You need to install a bunch of packages :&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge
sudo apt-get install kernel-package&lt;/pre&gt;&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;After that you can follow the excellent guide here:&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;a href=&quot;https://help.ubuntu.com/community/Kernel/Compile#Alternate%20Build%20Method:%20The%20Old-Fashioned%20Debian%20Way&quot;&gt;Compilling a Kernel the Old Debian Fashionned Way&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;One point which I had missed though is where are the packages once you&#39;ve finished compiling (although it&#39;s written in the guide). So if like they recommend in the you&#39;ve extracted the kernel source under ~/src/linux-source-2.6.35 for instance, then the deb packages will be in ~/src.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;Enjoy.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/1088461754275268848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/1088461754275268848'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/compiling-linux-kernel-on-debian-like.html' title='Compiling a linux kernel on a Debian &quot;like&quot; distribution'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-3139745564923963565</id><published>2011-04-10T22:44:00.002+08:00</published><updated>2011-04-10T22:44:29.212+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>Edit Formula: Alternative to F2 for Excel Mac</title><content type='html'>&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;One of the most used keyboard shortcut is F2, which allows to edit the formula in a cell without using the mouse. Unfortunately that shortcut is different between Office for Mac and Office Windows.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;This shortcut was F2 in a PC, but in Excel for Mac it turns into Ctrl + U.&amp;nbsp; Unfortunately not the most effective shortcut, as it&#39;s rather difficult to press Ctrl + U with one hand on most keyboards.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Windows Shortcut:&lt;/span&gt;&amp;nbsp;F2&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Mac Shortcut:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;Ctrl + U&lt;/span&gt;&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3139745564923963565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3139745564923963565'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/edit-formula-alternative-to-f2-for.html' title='Edit Formula: Alternative to F2 for Excel Mac'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-539126081087953107</id><published>2011-04-10T22:43:00.002+08:00</published><updated>2011-04-10T22:43:40.343+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>Excel Mac: Cell Reference Lock  - F4 Alternative</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;One of the first major problem that I faced when I first began using Excel on a Mac, was the appropriate shortcut replacement for F4, which adds $ signs to cell references to lock cell/range references from moving if dragged to another cell. After a great deal of frustration, and after trawling a number of excel forums I eventually found the solution which is shown below.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;Windows Shortcut&lt;/i&gt;:&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;F4&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;Mac Shortcut :&lt;/b&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Cmd + T&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/539126081087953107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/539126081087953107'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/excel-mac-cell-reference-lock-f4.html' title='Excel Mac: Cell Reference Lock  - F4 Alternative'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-3379769845769710233</id><published>2011-04-10T22:40:00.000+08:00</published><updated>2011-04-10T22:40:53.623+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPAN"/><category scheme="http://www.blogger.com/atom/ns#" term="Perl"/><title type='text'>Install from Perl modules from CPAN without confirmation</title><content type='html'>If need to install modules from CPAN, especially if you want to install a whole bunch in one go without having to confirm every ten seconds try running your install as follow:&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;title&gt;&lt;/title&gt;   &lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 18.0px; font: 14.0px Consolas; background-color: #eeeeee}
span.s1 {color: #80000b}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;PERL_MM_USE_DEFAULT=&lt;span class=&quot;s1&quot;&gt;1&lt;/span&gt; perl -MCPAN -e &lt;span class=&quot;s1&quot;&gt;&#39;install My::Module&#39;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Additionally&amp;nbsp;if you want to make sure that the install script will pull all the required dependencies (should be by default, but heh ...):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;title&gt;&lt;/title&gt;   &lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 18.0px; font: 14.0px Consolas; background-color: #eeeeee}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;  &lt;title&gt;&lt;/title&gt;   &lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 18.0px; font: 14.0px Consolas; background-color: #eeeeee}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;cpan&lt;/div&gt;&lt;div class=&quot;p1&quot;&gt;cpan&amp;gt; o conf prerequisites_policy follow&lt;/div&gt;&lt;div class=&quot;p1&quot;&gt;cpan&amp;gt; o conf commit&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;That&#39;s it.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3379769845769710233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/3379769845769710233'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/install-from-perl-modules-from-cpan.html' title='Install from Perl modules from CPAN without confirmation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4194045693156146911.post-457791521593931672</id><published>2011-04-05T10:13:00.001+08:00</published><updated>2011-04-05T10:33:17.077+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debian"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux Mint"/><title type='text'>Find closest and fastest repository for your Debian</title><content type='html'>I &lt;a href=&quot;http://xiuxixiuxi.blogspot.com/2011/04/update-debian-squeeze-to-mint-aka.html&quot;&gt;recently installed&lt;/a&gt; a new distrib with linux mint based on Debian. I&#39;ve done that scores of times, but one thing i never remember is how to find the best repo (and the fastest of course) based on your location.&lt;br /&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;There&#39;s a very neet package that will do the work for your:&lt;/div&gt;&lt;pre class=&quot;brush: bash&quot;&gt;sudo apt-get install netselect-apt
sudo netselect-apt
&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
And Voila, you&#39;re done.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/457791521593931672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4194045693156146911/posts/default/457791521593931672'/><link rel='alternate' type='text/html' href='http://xiuxixiuxi.blogspot.com/2011/04/find-closest-and-fastest-repository-for.html' title='Find closest and fastest repository for your Debian'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11861570098974719573</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>