1
0
mirror of https://github.com/balkian/balkian.github.com.git synced 2024-12-26 02:08:13 +00:00

Generate Pelican site

This commit is contained in:
J. Fernando Sánchez 2016-09-28 19:27:26 +01:00
parent 7ccf8c97ee
commit 6cf7727b87
35 changed files with 462 additions and 233 deletions

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -123,6 +119,7 @@
<!--Body content--> <!--Body content-->
<div class="postnav"> <div class="postnav">
<span class="previouspost"><i class="fa fa-chevron-left"></i> <a href="org-mode-tricks.html">Org-mode tricks</a></span> <span class="previouspost"><i class="fa fa-chevron-left"></i> <a href="org-mode-tricks.html">Org-mode tricks</a></span>
<span class='nextpost'><a href="/progress-bars-in-python.html">Progress bars in python</a> <i class="fa fa-chevron-right"></i></span>
</div> </div>
<div class="posthead"> <div class="posthead">
<h2 class="title">Arch Linux Fixes</h2> <h2 class="title">Arch Linux Fixes</h2>
@ -136,7 +133,7 @@
<h2>Black screen and LightDM doesn't unlock</h2> <h2>Black screen and LightDM doesn't unlock</h2>
<p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p> <p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[LightDM]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[LightDM]</span>
<span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span> <span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -89,6 +89,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -106,12 +108,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -122,6 +118,8 @@
<h1>Archives for balkian.com</h1> <h1>Archives for balkian.com</h1>
<dl> <dl>
<dt>Wed 28 September 2016</dt>
<dd><a href="http://balkian.com/progress-bars-in-python.html">Progress bars in python</a></dd>
<dt>Wed 03 February 2016</dt> <dt>Wed 03 February 2016</dt>
<dd><a href="http://balkian.com/arch-linux-fixes.html">Arch Linux Fixes</a></dd> <dd><a href="http://balkian.com/arch-linux-fixes.html">Arch Linux Fixes</a></dd>
<dt>Thu 10 December 2015</dt> <dt>Thu 10 December 2015</dt>

View File

@ -89,6 +89,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -106,12 +108,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -126,6 +122,27 @@
</div> </div>
<!-- This loops through the paginated posts --> <!-- This loops through the paginated posts -->
<div class="posthead">
<h2><a href="/progress-bars-in-python.html" class="title">Progress bars in python</a></h2>
<span class="date">2016-09-28</span>
<a class="tag" href="/tag/python.html"><span class="label">python</span></a>
</div>
<div class="excerpt">
<p><a class="reference external" href="https://github.com/noamraph/tqdm">tqdm</a> is a nice way to add progress bars in the command line or in a jupyter notebook.</p>
<img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" />
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">tqdm</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)):</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</td></tr></table>
</div>
<div class="readmore"><a href="/progress-bars-in-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
<div class="posthead"> <div class="posthead">
<h2><a href="/arch-linux-fixes.html" class="title">Arch Linux Fixes</a></h2> <h2><a href="/arch-linux-fixes.html" class="title">Arch Linux Fixes</a></h2>
<span class="date">2016-02-03</span> <span class="date">2016-02-03</span>
@ -137,7 +154,7 @@
<h2>Black screen and LightDM doesn't unlock</h2> <h2>Black screen and LightDM doesn't unlock</h2>
<p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p> <p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[LightDM]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[LightDM]</span>
<span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span> <span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
@ -155,7 +172,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
@ -209,7 +226,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
@ -251,7 +268,7 @@ gathered from media in several languages. Then we aggregated ...</p>
<div class="excerpt"> <div class="excerpt">
<p>A simple trick. If you want to remove all the '.swp' files from a git <p>A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:</p> repository, just use:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span>
</pre></div> </pre></div>
</td></tr></table> </td></tr></table>
</div> </div>

View File

@ -89,6 +89,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -106,12 +108,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -121,7 +117,7 @@
<!--Body content--> <!--Body content-->
<h1>Authors on balkian.com</h1> <h1>Authors on balkian.com</h1>
<ul> <li><a href="http://balkian.com/author/j-fernando-sanchez.html">J. Fernando Sánchez</a> (9)</li> <ul> <li><a href="http://balkian.com/author/j-fernando-sanchez.html">J. Fernando Sánchez</a> (10)</li>
</ul> </ul>
</div> </div>
<div class="clear"></div> <div class="clear"></div>

View File

@ -89,6 +89,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -106,12 +108,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>

View File

@ -123,7 +123,7 @@
<h2>Black screen and LightDM doesn't unlock</h2> <h2>Black screen and LightDM doesn't unlock</h2>
<p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p> <p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[LightDM]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[LightDM]</span>
<span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span> <span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
@ -141,7 +141,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -90,6 +90,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/sharing-dotfiles.html">Sharing dotfiles</a></dt> <dt><a href="/sharing-dotfiles.html">Sharing dotfiles</a></dt>
<dd class="tag"><a class="label" href="/tag/github.html">github</a></dd> <dd class="tag"><a class="label" href="/tag/github.html">github</a></dd>
<dd class="tag"><a class="label" href="/tag/git.html">git</a></dd> <dd class="tag"><a class="label" href="/tag/git.html">git</a></dd>
@ -109,10 +111,6 @@
<dd class="tag"><a class="label" href="/tag/github.html">github</a></dd> <dd class="tag"><a class="label" href="/tag/github.html">github</a></dd>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd> <dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/pypi.html">pypi</a></dd> <dd class="tag"><a class="label" href="/tag/pypi.html">pypi</a></dd>
<dt><a href="/updating-eurolovemap.html">Updating EuroLoveMap</a></dt>
<dd class="tag"><a class="label" href="/tag/javascript.html">javascript</a></dd>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/heroku.html">heroku</a></dd>
</dl> </dl>
</div> </div>
@ -127,6 +125,27 @@
</div> </div>
<!-- This loops through the paginated posts --> <!-- This loops through the paginated posts -->
<div class="posthead">
<h2><a href="/progress-bars-in-python.html" class="title">Progress bars in python</a></h2>
<span class="date">2016-09-28</span>
<a class="tag" href="/tag/python.html"><span class="label">python</span></a>
</div>
<div class="excerpt">
<p><a class="reference external" href="https://github.com/noamraph/tqdm">tqdm</a> is a nice way to add progress bars in the command line or in a jupyter notebook.</p>
<img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" />
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">tqdm</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)):</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</td></tr></table>
</div>
<div class="readmore"><a href="/progress-bars-in-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
<div class="posthead"> <div class="posthead">
<h2><a href="/sharing-dotfiles.html" class="title">Sharing dotfiles</a></h2> <h2><a href="/sharing-dotfiles.html" class="title">Sharing dotfiles</a></h2>
<span class="date">2015-04-10</span> <span class="date">2015-04-10</span>
@ -175,7 +194,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
@ -217,7 +236,7 @@ gathered from media in several languages. Then we aggregated ...</p>
<div class="excerpt"> <div class="excerpt">
<p>A simple trick. If you want to remove all the '.swp' files from a git <p>A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:</p> repository, just use:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span>
</pre></div> </pre></div>
</td></tr></table> </td></tr></table>
</div> </div>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -163,7 +159,7 @@ on Github</a>. You can
clone and deploy it easily like this:</p> clone and deploy it easily like this:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2 2
3</pre></div></td><td class="code"><div class="highlight"><pre>git clone 3</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git clone
https://github.com/balkian/balkian.github.com <span class="nb">cd</span> balkian.github.com https://github.com/balkian/balkian.github.com <span class="nb">cd</span> balkian.github.com
jekyll serve -w jekyll serve -w
</pre></div> </pre></div>

View File

@ -1,15 +1,27 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>balkian.com</title><link href="http://balkian.com/" rel="alternate"></link><link href="http://balkian.com/feeds/all.atom.xml" rel="self"></link><id>http://balkian.com/</id><updated>2016-02-03T20:00:00+01:00</updated><entry><title>Arch Linux Fixes</title><link href="http://balkian.com/arch-linux-fixes.html" rel="alternate"></link><updated>2016-02-03T20:00:00+01:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2016-02-03:arch-linux-fixes.html</id><summary type="html">&lt;div class="section" id="black-screen-and-lightdm-doesn-t-unlock"&gt; <feed xmlns="http://www.w3.org/2005/Atom"><title>balkian.com</title><link href="http://balkian.com/" rel="alternate"></link><link href="http://balkian.com/feeds/all.atom.xml" rel="self"></link><id>http://balkian.com/</id><updated>2016-09-28T18:47:00+02:00</updated><entry><title>Progress bars in python</title><link href="http://balkian.com/progress-bars-in-python.html" rel="alternate"></link><updated>2016-09-28T18:47:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2016-09-28:progress-bars-in-python.html</id><summary type="html">&lt;p&gt;&lt;a class="reference external" href="https://github.com/noamraph/tqdm"&gt;tqdm&lt;/a&gt; is a nice way to add progress bars in the command line or in a jupyter notebook.&lt;/p&gt;
&lt;img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" /&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2
3
4
5&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;tqdm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tqdm&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tqdm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><category term="python"></category></entry><entry><title>Arch Linux Fixes</title><link href="http://balkian.com/arch-linux-fixes.html" rel="alternate"></link><updated>2016-02-03T20:00:00+01:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2016-02-03:arch-linux-fixes.html</id><summary type="html">&lt;div class="section" id="black-screen-and-lightdm-doesn-t-unlock"&gt;
&lt;h2&gt;Black screen and LightDM doesn't unlock&lt;/h2&gt; &lt;h2&gt;Black screen and LightDM doesn't unlock&lt;/h2&gt;
&lt;p&gt;Add this to your &lt;cite&gt;/etc/lightdm/lightdm.conf&lt;/cite&gt; file:&lt;/p&gt; &lt;p&gt;Add this to your &lt;cite&gt;/etc/lightdm/lightdm.conf&lt;/cite&gt; file:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;[LightDM]&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[LightDM]&lt;/span&gt;
&lt;span class="na"&gt;logind-check-graphical&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt; &lt;span class="na"&gt;logind-check-graphical&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
</summary><category term="arch"></category><category term="linux"></category></entry><entry><title>Org-mode tricks</title><link href="http://balkian.com/org-mode-tricks.html" rel="alternate"></link><updated>2015-12-10T11:34:00+01:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-12-10:org-mode-tricks.html</id><summary type="html">&lt;div class="section" id="show-plain-text-version"&gt; </summary><category term="arch"></category><category term="linux"></category></entry><entry><title>Org-mode tricks</title><link href="http://balkian.com/org-mode-tricks.html" rel="alternate"></link><updated>2015-12-10T11:34:00+01:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-12-10:org-mode-tricks.html</id><summary type="html">&lt;div class="section" id="show-plain-text-version"&gt;
&lt;h2&gt;Show plain text version&lt;/h2&gt; &lt;h2&gt;Show plain text version&lt;/h2&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;font-lock-mode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;font-lock-mode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
</summary><category term="emacs"></category><category term="productivity"></category><category term="editor"></category><category term="org"></category></entry><entry><title>Sharing dotfiles</title><link href="http://balkian.com/sharing-dotfiles.html" rel="alternate"></link><updated>2015-04-10T17:47:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-04-10:sharing-dotfiles.html</id><summary type="html">&lt;p&gt;Today's post is half a quick note, half public shaming. In other words, it is a reminder to be very careful with OAuth tokens and passwords.&lt;/p&gt; </summary><category term="emacs"></category><category term="productivity"></category><category term="editor"></category><category term="org"></category></entry><entry><title>Sharing dotfiles</title><link href="http://balkian.com/sharing-dotfiles.html" rel="alternate"></link><updated>2015-04-10T17:47:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-04-10:sharing-dotfiles.html</id><summary type="html">&lt;p&gt;Today's post is half a quick note, half public shaming. In other words, it is a reminder to be very careful with OAuth tokens and passwords.&lt;/p&gt;
@ -19,13 +31,13 @@ This is cool and convenient, unless you &lt;a class="reference external" href="h
&lt;p&gt;So, how can you still share your gitconfig without sharing your password/token with the rest of the world? &lt;p&gt;So, how can you still share your gitconfig without sharing your password/token with the rest of the world?
Since Git 1.7.0, you can &lt;a class="reference external" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig"&gt;include other files in your gitconfig&lt;/a&gt;.&lt;/p&gt; Since Git 1.7.0, you can &lt;a class="reference external" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig"&gt;include other files in your gitconfig&lt;/a&gt;.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;[include] 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[include]
path = ~/.gitconfig_secret path = ~/.gitconfig_secret
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And now, in your .gitconfig_secret file, you just have to add this:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And now, in your .gitconfig_secret file, you just have to add this:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;[github] 3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[github]
user = balkian user = balkian
token = &amp;quot;&amp;lt; Your secret token &amp;gt;&amp;quot; token = &amp;quot;&amp;lt; Your secret token &amp;gt;&amp;quot;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
@ -41,10 +53,10 @@ Debian/Ubuntu.&lt;/p&gt;
&lt;div class="section" id="setting-up-apache"&gt; &lt;div class="section" id="setting-up-apache"&gt;
&lt;h2&gt;Setting up Apache&lt;/h2&gt; &lt;h2&gt;Setting up Apache&lt;/h2&gt;
&lt;p&gt;First we need to install Apache:&lt;/p&gt; &lt;p&gt;First we need to install Apache:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo apt-get install apache2 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo apt-get install apache2
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Change the head of &amp;quot;/etc/apache2/sites-enabled/000-default&amp;quot; to:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Change the head of &amp;quot;/etc/apache2/sites-enabled/000-default&amp;quot; to:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span class="s"&gt;*:880&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span class="s"&gt;*:880&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Then, create a file /etc/apache2/sites-available/webdav:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Then, create a file /etc/apache2/sites-available/webdav:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1
@ -59,7 +71,7 @@ Debian/Ubuntu.&lt;/p&gt;
10 10
11 11
12 12
13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;Alias&lt;/span&gt; &lt;span class="sx"&gt;/dav&lt;/span&gt; &lt;span class="sx"&gt;/home/webdav/dav&lt;/span&gt; 13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;Alias&lt;/span&gt; &lt;span class="sx"&gt;/dav&lt;/span&gt; &lt;span class="sx"&gt;/home/webdav/dav&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;Dav&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="nb"&gt;Dav&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt;
&lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny &lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny
@ -83,7 +95,7 @@ other application using webdav.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3 3
4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo adduser webdav 4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo adduser webdav
sudo htpasswd -c /home/webdav/.htpasswd webdav sudo htpasswd -c /home/webdav/.htpasswd webdav
sudo htpasswd /home/webdav/.htpasswd zotero sudo htpasswd /home/webdav/.htpasswd zotero
sudo mkdir -p /home/webdav/dav/zotero sudo mkdir -p /home/webdav/dav/zotero
@ -92,7 +104,7 @@ sudo mkdir -p /home/webdav/dav/zotero
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3 3
4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo a2enmod webdav 4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo a2enmod webdav
sudo a2enmod dav_fs sudo a2enmod dav_fs
sudo a2ensite webdav sudo a2ensite webdav
sudo service apache2 restart sudo service apache2 restart
@ -110,7 +122,7 @@ cleaner URIs. In your desired site/location, add this:&lt;/p&gt;
4 4
5 5
6 6
7&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 7&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kn"&gt;client_max_body_size&lt;/span&gt; &lt;span class="s"&gt;20M&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kn"&gt;client_max_body_size&lt;/span&gt; &lt;span class="s"&gt;20M&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Real-IP&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Real-IP&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Forwarded-For&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Forwarded-For&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
@ -119,7 +131,7 @@ cleaner URIs. In your desired site/location, add this:&lt;/p&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Now just reload nginx:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Now just reload nginx:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo service nginx force-reload &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo service nginx force-reload
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div class="section" id="extras"&gt; &lt;div class="section" id="extras"&gt;
@ -139,7 +151,7 @@ a WSGI application with the name &lt;em&gt;application&lt;/em&gt;. Hence, wsgi:a
2 2
3 3
4 4
5&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 5&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;ProxyPass&lt;/span&gt; http://127.0.0.1:8888/myapp/ &lt;span class="nb"&gt;ProxyPass&lt;/span&gt; http://127.0.0.1:8888/myapp/
&lt;span class="nb"&gt;ProxyPassReverse&lt;/span&gt; http://127.0.0.1:8888/myapp/ &lt;span class="nb"&gt;ProxyPassReverse&lt;/span&gt; http://127.0.0.1:8888/myapp/
&lt;span class="nb"&gt;RequestHeader&lt;/span&gt; set SCRIPT_NAME &lt;span class="s2"&gt;&amp;quot;/myapp/&amp;quot;&lt;/span&gt; &lt;span class="nb"&gt;RequestHeader&lt;/span&gt; set SCRIPT_NAME &lt;span class="s2"&gt;&amp;quot;/myapp/&amp;quot;&lt;/span&gt;
@ -148,7 +160,7 @@ a WSGI application with the name &lt;em&gt;application&lt;/em&gt;. Hence, wsgi:a
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: &lt;em&gt;SCRIPT_NAME&lt;/em&gt; and the end of &lt;em&gt;ProxyPass&lt;/em&gt; URL &lt;strong&gt;MUST BE &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: &lt;em&gt;SCRIPT_NAME&lt;/em&gt; and the end of &lt;em&gt;ProxyPass&lt;/em&gt; URL &lt;strong&gt;MUST BE
THE SAME&lt;/strong&gt;. Otherwise, Gunicorn will fail miserably.&lt;/p&gt; THE SAME&lt;/strong&gt;. Otherwise, Gunicorn will fail miserably.&lt;/p&gt;
&lt;p&gt;Try it with:&lt;/p&gt; &lt;p&gt;Try it with:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;venv/bin/gunicorn -w &lt;span class="m"&gt;4&lt;/span&gt; -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;venv/bin/gunicorn -w &lt;span class="m"&gt;4&lt;/span&gt; -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div class="section" id="uwsgi"&gt; &lt;div class="section" id="uwsgi"&gt;
@ -158,13 +170,13 @@ options for uwsgi (in a .ini file).&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3 3
4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;SetHandler&lt;/span&gt; uwsgi_handler &lt;span class="nb"&gt;SetHandler&lt;/span&gt; uwsgi_handler
&lt;span class="nb"&gt;uWSGISocker&lt;/span&gt; &lt;span class="m"&gt;127.0.0.1&lt;/span&gt;:8888 &lt;span class="nb"&gt;uWSGISocker&lt;/span&gt; &lt;span class="m"&gt;127.0.0.1&lt;/span&gt;:8888
&lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Try it with:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Try it with:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;uwsgi --socket 127.0.0.1:8888 -w wsgi:application &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;uwsgi --socket 127.0.0.1:8888 -w wsgi:application
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="section" id="extra-supervisor"&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="section" id="extra-supervisor"&gt;
&lt;h3&gt;Extra: Supervisor&lt;/h3&gt; &lt;h3&gt;Extra: Supervisor&lt;/h3&gt;
@ -188,7 +200,7 @@ supervisor config file and let it handle the server for you.&lt;/p&gt;
16 16
17 17
18 18
19&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;[unix_http_server]&lt;/span&gt; 19&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[unix_http_server]&lt;/span&gt;
&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/tmp/myapp.sock ; path to your socket file&lt;/span&gt; &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/tmp/myapp.sock ; path to your socket file&lt;/span&gt;
&lt;span class="k"&gt;[supervisord]&lt;/span&gt; &lt;span class="k"&gt;[supervisord]&lt;/span&gt;
@ -238,7 +250,7 @@ memorability over describing the functionality.&lt;/p&gt;
10 10
11 11
12 12
13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="err"&gt;[distutils]&lt;/span&gt; &lt;span class="c1"&gt;# this tells distutils what package indexes you can push to&lt;/span&gt; 13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;[distutils]&lt;/span&gt; &lt;span class="c1"&gt;# this tells distutils what package indexes you can push to&lt;/span&gt;
&lt;span class="na"&gt;index-servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&lt;/span&gt; &lt;span class="na"&gt;index-servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&lt;/span&gt;
&lt;span class="s"&gt; pypi # the live PyPI&lt;/span&gt; &lt;span class="s"&gt; pypi # the live PyPI&lt;/span&gt;
&lt;span class="s"&gt; pypitest # test PyPI&lt;/span&gt; &lt;span class="s"&gt; pypitest # test PyPI&lt;/span&gt;
@ -276,7 +288,7 @@ root-dir/ # Any name you want
&lt;div class="section" id="setup-cfg"&gt; &lt;div class="section" id="setup-cfg"&gt;
&lt;h3&gt;setup.cfg&lt;/h3&gt; &lt;h3&gt;setup.cfg&lt;/h3&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;[metadata]&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[metadata]&lt;/span&gt;
&lt;span class="na"&gt;description-file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;README.md&lt;/span&gt; &lt;span class="na"&gt;description-file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;README.md&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;The markdown README is the &lt;em&gt;de facto&lt;/em&gt; standard in Github, but you can &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;The markdown README is the &lt;em&gt;de facto&lt;/em&gt; standard in Github, but you can
@ -295,7 +307,7 @@ also use rST (reStructuredText), the standard in the python community.&lt;/p&gt;
9 9
10 10
11 11
12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;distutils.core&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt; 12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;distutils.core&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;
&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;packages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;# this must be the same as the name above&lt;/span&gt; &lt;span class="n"&gt;packages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;# this must be the same as the name above&lt;/span&gt;
@ -313,7 +325,7 @@ host our package anywhere, but Github is a convenient option. To create
the tarball and the zip packages, you only need to tag a tag in your the tarball and the zip packages, you only need to tag a tag in your
repository and push it to github:&lt;/p&gt; repository and push it to github:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;git tag &lt;span class="o"&gt;{&lt;/span&gt;version&lt;span class="o"&gt;}&lt;/span&gt; -m &lt;span class="s2"&gt;&amp;quot;{ Description of this tag/version}&amp;quot;&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git tag &lt;span class="o"&gt;{&lt;/span&gt;version&lt;span class="o"&gt;}&lt;/span&gt; -m &lt;span class="s2"&gt;&amp;quot;{ Description of this tag/version}&amp;quot;&lt;/span&gt;
git push --tags origin master git push --tags origin master
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
@ -351,7 +363,7 @@ new technologies and improve it:&lt;/p&gt;
&lt;p&gt;The result can be &lt;a class="reference external" href="http://eurolovemap.herokuapp.com/"&gt;seen here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The result can be &lt;a class="reference external" href="http://eurolovemap.herokuapp.com/"&gt;seen here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="section" id="publishing-a-python-3-app-on-heroku"&gt; &lt;div class="section" id="publishing-a-python-3-app-on-heroku"&gt;
&lt;h2&gt;Publishing a Python 3 app on Heroku&lt;/h2&gt; &lt;h2&gt;Publishing a Python 3 app on Heroku&lt;/h2&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;mkvirtualenv -p /usr/bin/python3.3 eurolovemap &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkvirtualenv -p /usr/bin/python3.3 eurolovemap
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Since Heroku uses python 2.7 by default, we have to tell it which &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Since Heroku uses python 2.7 by default, we have to tell it which
version we want, although it supports python 3.4 as well. I couldn't get version we want, although it supports python 3.4 as well. I couldn't get
@ -360,7 +372,7 @@ python 3.4 working using the
so I used python 3.3 instead, which works fine but is not officially so I used python 3.3 instead, which works fine but is not officially
supported. Just create a file named &lt;em&gt;runtime.txt&lt;/em&gt; in your project root, supported. Just create a file named &lt;em&gt;runtime.txt&lt;/em&gt; in your project root,
with the python version you want to use:&lt;/p&gt; with the python version you want to use:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;python-3.3.1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python-3.3.1
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Don't forget to freeze your dependencies so Heroku can install them: &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Don't forget to freeze your dependencies so Heroku can install them:
&lt;tt class="docutils literal"&gt;bash pip freze &amp;gt; requirements.txt&lt;/tt&gt;&lt;/p&gt; &lt;tt class="docutils literal"&gt;bash pip freze &amp;gt; requirements.txt&lt;/tt&gt;&lt;/p&gt;
@ -377,7 +389,7 @@ cipher&lt;/a&gt;. Please, don't
use it for any serious application if you are concerned about being use it for any serious application if you are concerned about being
spammed.&lt;/p&gt; spammed.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;blur_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;blur_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And this is the client side:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And this is the client side:&lt;/p&gt;
@ -392,7 +404,7 @@ spammed.&lt;/p&gt;
9 9
10 10
11 11
12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt; 12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="nx"&gt;elems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;profile-email&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;profile-email&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;blur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;blur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
@ -436,7 +448,7 @@ the &lt;a class="reference external" href="http://slipsum.com/"&gt;Samuel L. Jac
&lt;/div&gt; &lt;/div&gt;
</summary><category term="javascript"></category><category term="python"></category><category term="heroku"></category></entry><entry><title>Remove git files with globbing</title><link href="http://balkian.com/remove-git-files-with-globbing.html" rel="alternate"></link><updated>2013-08-22T23:14:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:remove-git-files-with-globbing.html</id><summary type="html">&lt;p&gt;A simple trick. If you want to remove all the '.swp' files from a git </summary><category term="javascript"></category><category term="python"></category><category term="heroku"></category></entry><entry><title>Remove git files with globbing</title><link href="http://balkian.com/remove-git-files-with-globbing.html" rel="alternate"></link><updated>2013-08-22T23:14:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:remove-git-files-with-globbing.html</id><summary type="html">&lt;p&gt;A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:&lt;/p&gt; repository, just use:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;git rm --cached &lt;span class="s1"&gt;&amp;#39;\*\*.swp&amp;#39;&lt;/span&gt; &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git rm --cached &lt;span class="s1"&gt;&amp;#39;\*\*.swp&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><category term="git"></category></entry><entry><title>Creating my web</title><link href="http://balkian.com/creating-my-web.html" rel="alternate"></link><updated>2013-08-22T14:14:22+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:creating-my-web.html</id><summary type="html">&lt;p&gt;Finally, I've decided to set up a decent personal page. I have settled &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><category term="git"></category></entry><entry><title>Creating my web</title><link href="http://balkian.com/creating-my-web.html" rel="alternate"></link><updated>2013-08-22T14:14:22+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:creating-my-web.html</id><summary type="html">&lt;p&gt;Finally, I've decided to set up a decent personal page. I have settled
for github-pages because I like the idea of keeping my site in a for github-pages because I like the idea of keeping my site in a
@ -466,7 +478,7 @@ on Github&lt;/a&gt;. You can
clone and deploy it easily like this:&lt;/p&gt; clone and deploy it easily like this:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;git clone 3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git clone
https://github.com/balkian/balkian.github.com &lt;span class="nb"&gt;cd&lt;/span&gt; balkian.github.com https://github.com/balkian/balkian.github.com &lt;span class="nb"&gt;cd&lt;/span&gt; balkian.github.com
jekyll serve -w jekyll serve -w
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;

View File

@ -3,13 +3,13 @@
&lt;h2&gt;Black screen and LightDM doesn't unlock&lt;/h2&gt; &lt;h2&gt;Black screen and LightDM doesn't unlock&lt;/h2&gt;
&lt;p&gt;Add this to your &lt;cite&gt;/etc/lightdm/lightdm.conf&lt;/cite&gt; file:&lt;/p&gt; &lt;p&gt;Add this to your &lt;cite&gt;/etc/lightdm/lightdm.conf&lt;/cite&gt; file:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;[LightDM]&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[LightDM]&lt;/span&gt;
&lt;span class="na"&gt;logind-check-graphical&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt; &lt;span class="na"&gt;logind-check-graphical&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
</summary><category term="arch"></category><category term="linux"></category></entry><entry><title>Org-mode tricks</title><link href="http://balkian.com/org-mode-tricks.html" rel="alternate"></link><updated>2015-12-10T11:34:00+01:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-12-10:org-mode-tricks.html</id><summary type="html">&lt;div class="section" id="show-plain-text-version"&gt; </summary><category term="arch"></category><category term="linux"></category></entry><entry><title>Org-mode tricks</title><link href="http://balkian.com/org-mode-tricks.html" rel="alternate"></link><updated>2015-12-10T11:34:00+01:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-12-10:org-mode-tricks.html</id><summary type="html">&lt;div class="section" id="show-plain-text-version"&gt;
&lt;h2&gt;Show plain text version&lt;/h2&gt; &lt;h2&gt;Show plain text version&lt;/h2&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;font-lock-mode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;font-lock-mode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
</summary><category term="emacs"></category><category term="productivity"></category><category term="editor"></category><category term="org"></category></entry></feed> </summary><category term="emacs"></category><category term="productivity"></category><category term="editor"></category><category term="org"></category></entry></feed>

View File

@ -1,18 +1,30 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>balkian.com</title><link href="http://balkian.com/" rel="alternate"></link><link href="http://balkian.com/feeds/misc.atom.xml" rel="self"></link><id>http://balkian.com/</id><updated>2015-04-10T17:47:00+02:00</updated><entry><title>Sharing dotfiles</title><link href="http://balkian.com/sharing-dotfiles.html" rel="alternate"></link><updated>2015-04-10T17:47:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-04-10:sharing-dotfiles.html</id><summary type="html">&lt;p&gt;Today's post is half a quick note, half public shaming. In other words, it is a reminder to be very careful with OAuth tokens and passwords.&lt;/p&gt; <feed xmlns="http://www.w3.org/2005/Atom"><title>balkian.com</title><link href="http://balkian.com/" rel="alternate"></link><link href="http://balkian.com/feeds/misc.atom.xml" rel="self"></link><id>http://balkian.com/</id><updated>2016-09-28T18:47:00+02:00</updated><entry><title>Progress bars in python</title><link href="http://balkian.com/progress-bars-in-python.html" rel="alternate"></link><updated>2016-09-28T18:47:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2016-09-28:progress-bars-in-python.html</id><summary type="html">&lt;p&gt;&lt;a class="reference external" href="https://github.com/noamraph/tqdm"&gt;tqdm&lt;/a&gt; is a nice way to add progress bars in the command line or in a jupyter notebook.&lt;/p&gt;
&lt;img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" /&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2
3
4
5&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;tqdm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tqdm&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tqdm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><category term="python"></category></entry><entry><title>Sharing dotfiles</title><link href="http://balkian.com/sharing-dotfiles.html" rel="alternate"></link><updated>2015-04-10T17:47:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2015-04-10:sharing-dotfiles.html</id><summary type="html">&lt;p&gt;Today's post is half a quick note, half public shaming. In other words, it is a reminder to be very careful with OAuth tokens and passwords.&lt;/p&gt;
&lt;p&gt;As part of moving to emacs, I starting using the incredibly useful &lt;a class="reference external" href="https://github.com/defunkt/gist.el"&gt;gh.el&lt;/a&gt;. &lt;p&gt;As part of moving to emacs, I starting using the incredibly useful &lt;a class="reference external" href="https://github.com/defunkt/gist.el"&gt;gh.el&lt;/a&gt;.
When you first use it, the extension saves either your password or an OAuth token in your .gitconfig file. When you first use it, the extension saves either your password or an OAuth token in your .gitconfig file.
This is cool and convenient, unless you &lt;a class="reference external" href="https://github.com/balkian/dotfiles"&gt;happen to be publishing your .gitconfig file in a public repo&lt;/a&gt;.&lt;/p&gt; This is cool and convenient, unless you &lt;a class="reference external" href="https://github.com/balkian/dotfiles"&gt;happen to be publishing your .gitconfig file in a public repo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, how can you still share your gitconfig without sharing your password/token with the rest of the world? &lt;p&gt;So, how can you still share your gitconfig without sharing your password/token with the rest of the world?
Since Git 1.7.0, you can &lt;a class="reference external" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig"&gt;include other files in your gitconfig&lt;/a&gt;.&lt;/p&gt; Since Git 1.7.0, you can &lt;a class="reference external" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig"&gt;include other files in your gitconfig&lt;/a&gt;.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;[include] 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[include]
path = ~/.gitconfig_secret path = ~/.gitconfig_secret
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And now, in your .gitconfig_secret file, you just have to add this:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And now, in your .gitconfig_secret file, you just have to add this:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;[github] 3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[github]
user = balkian user = balkian
token = &amp;quot;&amp;lt; Your secret token &amp;gt;&amp;quot; token = &amp;quot;&amp;lt; Your secret token &amp;gt;&amp;quot;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
@ -28,10 +40,10 @@ Debian/Ubuntu.&lt;/p&gt;
&lt;div class="section" id="setting-up-apache"&gt; &lt;div class="section" id="setting-up-apache"&gt;
&lt;h2&gt;Setting up Apache&lt;/h2&gt; &lt;h2&gt;Setting up Apache&lt;/h2&gt;
&lt;p&gt;First we need to install Apache:&lt;/p&gt; &lt;p&gt;First we need to install Apache:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo apt-get install apache2 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo apt-get install apache2
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Change the head of &amp;quot;/etc/apache2/sites-enabled/000-default&amp;quot; to:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Change the head of &amp;quot;/etc/apache2/sites-enabled/000-default&amp;quot; to:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span class="s"&gt;*:880&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt; &lt;span class="s"&gt;*:880&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Then, create a file /etc/apache2/sites-available/webdav:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Then, create a file /etc/apache2/sites-available/webdav:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1
@ -46,7 +58,7 @@ Debian/Ubuntu.&lt;/p&gt;
10 10
11 11
12 12
13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;Alias&lt;/span&gt; &lt;span class="sx"&gt;/dav&lt;/span&gt; &lt;span class="sx"&gt;/home/webdav/dav&lt;/span&gt; 13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;Alias&lt;/span&gt; &lt;span class="sx"&gt;/dav&lt;/span&gt; &lt;span class="sx"&gt;/home/webdav/dav&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;Dav&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="nb"&gt;Dav&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt;
&lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny &lt;span class="nb"&gt;Order&lt;/span&gt; Allow,Deny
@ -70,7 +82,7 @@ other application using webdav.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3 3
4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo adduser webdav 4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo adduser webdav
sudo htpasswd -c /home/webdav/.htpasswd webdav sudo htpasswd -c /home/webdav/.htpasswd webdav
sudo htpasswd /home/webdav/.htpasswd zotero sudo htpasswd /home/webdav/.htpasswd zotero
sudo mkdir -p /home/webdav/dav/zotero sudo mkdir -p /home/webdav/dav/zotero
@ -79,7 +91,7 @@ sudo mkdir -p /home/webdav/dav/zotero
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3 3
4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo a2enmod webdav 4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo a2enmod webdav
sudo a2enmod dav_fs sudo a2enmod dav_fs
sudo a2ensite webdav sudo a2ensite webdav
sudo service apache2 restart sudo service apache2 restart
@ -97,7 +109,7 @@ cleaner URIs. In your desired site/location, add this:&lt;/p&gt;
4 4
5 5
6 6
7&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 7&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="s"&gt;/dav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kn"&gt;client_max_body_size&lt;/span&gt; &lt;span class="s"&gt;20M&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kn"&gt;client_max_body_size&lt;/span&gt; &lt;span class="s"&gt;20M&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Real-IP&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Real-IP&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Forwarded-For&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kn"&gt;proxy_set_header&lt;/span&gt; &lt;span class="s"&gt;X-Forwarded-For&lt;/span&gt; &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
@ -106,7 +118,7 @@ cleaner URIs. In your desired site/location, add this:&lt;/p&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Now just reload nginx:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Now just reload nginx:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;sudo service nginx force-reload &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo service nginx force-reload
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div class="section" id="extras"&gt; &lt;div class="section" id="extras"&gt;
@ -126,7 +138,7 @@ a WSGI application with the name &lt;em&gt;application&lt;/em&gt;. Hence, wsgi:a
2 2
3 3
4 4
5&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 5&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;ProxyPass&lt;/span&gt; http://127.0.0.1:8888/myapp/ &lt;span class="nb"&gt;ProxyPass&lt;/span&gt; http://127.0.0.1:8888/myapp/
&lt;span class="nb"&gt;ProxyPassReverse&lt;/span&gt; http://127.0.0.1:8888/myapp/ &lt;span class="nb"&gt;ProxyPassReverse&lt;/span&gt; http://127.0.0.1:8888/myapp/
&lt;span class="nb"&gt;RequestHeader&lt;/span&gt; set SCRIPT_NAME &lt;span class="s2"&gt;&amp;quot;/myapp/&amp;quot;&lt;/span&gt; &lt;span class="nb"&gt;RequestHeader&lt;/span&gt; set SCRIPT_NAME &lt;span class="s2"&gt;&amp;quot;/myapp/&amp;quot;&lt;/span&gt;
@ -135,7 +147,7 @@ a WSGI application with the name &lt;em&gt;application&lt;/em&gt;. Hence, wsgi:a
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: &lt;em&gt;SCRIPT_NAME&lt;/em&gt; and the end of &lt;em&gt;ProxyPass&lt;/em&gt; URL &lt;strong&gt;MUST BE &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: &lt;em&gt;SCRIPT_NAME&lt;/em&gt; and the end of &lt;em&gt;ProxyPass&lt;/em&gt; URL &lt;strong&gt;MUST BE
THE SAME&lt;/strong&gt;. Otherwise, Gunicorn will fail miserably.&lt;/p&gt; THE SAME&lt;/strong&gt;. Otherwise, Gunicorn will fail miserably.&lt;/p&gt;
&lt;p&gt;Try it with:&lt;/p&gt; &lt;p&gt;Try it with:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;venv/bin/gunicorn -w &lt;span class="m"&gt;4&lt;/span&gt; -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;venv/bin/gunicorn -w &lt;span class="m"&gt;4&lt;/span&gt; -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
&lt;div class="section" id="uwsgi"&gt; &lt;div class="section" id="uwsgi"&gt;
@ -145,13 +157,13 @@ options for uwsgi (in a .ini file).&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3 3
4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; 4&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt; &lt;span class="s"&gt;/myapp/&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;SetHandler&lt;/span&gt; uwsgi_handler &lt;span class="nb"&gt;SetHandler&lt;/span&gt; uwsgi_handler
&lt;span class="nb"&gt;uWSGISocker&lt;/span&gt; &lt;span class="m"&gt;127.0.0.1&lt;/span&gt;:8888 &lt;span class="nb"&gt;uWSGISocker&lt;/span&gt; &lt;span class="m"&gt;127.0.0.1&lt;/span&gt;:8888
&lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Try it with:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Try it with:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;uwsgi --socket 127.0.0.1:8888 -w wsgi:application &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;uwsgi --socket 127.0.0.1:8888 -w wsgi:application
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="section" id="extra-supervisor"&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="section" id="extra-supervisor"&gt;
&lt;h3&gt;Extra: Supervisor&lt;/h3&gt; &lt;h3&gt;Extra: Supervisor&lt;/h3&gt;
@ -175,7 +187,7 @@ supervisor config file and let it handle the server for you.&lt;/p&gt;
16 16
17 17
18 18
19&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;[unix_http_server]&lt;/span&gt; 19&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[unix_http_server]&lt;/span&gt;
&lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/tmp/myapp.sock ; path to your socket file&lt;/span&gt; &lt;span class="na"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/tmp/myapp.sock ; path to your socket file&lt;/span&gt;
&lt;span class="k"&gt;[supervisord]&lt;/span&gt; &lt;span class="k"&gt;[supervisord]&lt;/span&gt;
@ -225,7 +237,7 @@ memorability over describing the functionality.&lt;/p&gt;
10 10
11 11
12 12
13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="err"&gt;[distutils]&lt;/span&gt; &lt;span class="c1"&gt;# this tells distutils what package indexes you can push to&lt;/span&gt; 13&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;[distutils]&lt;/span&gt; &lt;span class="c1"&gt;# this tells distutils what package indexes you can push to&lt;/span&gt;
&lt;span class="na"&gt;index-servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&lt;/span&gt; &lt;span class="na"&gt;index-servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&lt;/span&gt;
&lt;span class="s"&gt; pypi # the live PyPI&lt;/span&gt; &lt;span class="s"&gt; pypi # the live PyPI&lt;/span&gt;
&lt;span class="s"&gt; pypitest # test PyPI&lt;/span&gt; &lt;span class="s"&gt; pypitest # test PyPI&lt;/span&gt;
@ -263,7 +275,7 @@ root-dir/ # Any name you want
&lt;div class="section" id="setup-cfg"&gt; &lt;div class="section" id="setup-cfg"&gt;
&lt;h3&gt;setup.cfg&lt;/h3&gt; &lt;h3&gt;setup.cfg&lt;/h3&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;[metadata]&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[metadata]&lt;/span&gt;
&lt;span class="na"&gt;description-file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;README.md&lt;/span&gt; &lt;span class="na"&gt;description-file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;README.md&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;The markdown README is the &lt;em&gt;de facto&lt;/em&gt; standard in Github, but you can &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;The markdown README is the &lt;em&gt;de facto&lt;/em&gt; standard in Github, but you can
@ -282,7 +294,7 @@ also use rST (reStructuredText), the standard in the python community.&lt;/p&gt;
9 9
10 10
11 11
12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;distutils.core&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt; 12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;distutils.core&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;
&lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;packages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;# this must be the same as the name above&lt;/span&gt; &lt;span class="n"&gt;packages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mypackage&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;# this must be the same as the name above&lt;/span&gt;
@ -300,7 +312,7 @@ host our package anywhere, but Github is a convenient option. To create
the tarball and the zip packages, you only need to tag a tag in your the tarball and the zip packages, you only need to tag a tag in your
repository and push it to github:&lt;/p&gt; repository and push it to github:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;git tag &lt;span class="o"&gt;{&lt;/span&gt;version&lt;span class="o"&gt;}&lt;/span&gt; -m &lt;span class="s2"&gt;&amp;quot;{ Description of this tag/version}&amp;quot;&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git tag &lt;span class="o"&gt;{&lt;/span&gt;version&lt;span class="o"&gt;}&lt;/span&gt; -m &lt;span class="s2"&gt;&amp;quot;{ Description of this tag/version}&amp;quot;&lt;/span&gt;
git push --tags origin master git push --tags origin master
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;
@ -338,7 +350,7 @@ new technologies and improve it:&lt;/p&gt;
&lt;p&gt;The result can be &lt;a class="reference external" href="http://eurolovemap.herokuapp.com/"&gt;seen here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The result can be &lt;a class="reference external" href="http://eurolovemap.herokuapp.com/"&gt;seen here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="section" id="publishing-a-python-3-app-on-heroku"&gt; &lt;div class="section" id="publishing-a-python-3-app-on-heroku"&gt;
&lt;h2&gt;Publishing a Python 3 app on Heroku&lt;/h2&gt; &lt;h2&gt;Publishing a Python 3 app on Heroku&lt;/h2&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;mkvirtualenv -p /usr/bin/python3.3 eurolovemap &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkvirtualenv -p /usr/bin/python3.3 eurolovemap
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Since Heroku uses python 2.7 by default, we have to tell it which &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Since Heroku uses python 2.7 by default, we have to tell it which
version we want, although it supports python 3.4 as well. I couldn't get version we want, although it supports python 3.4 as well. I couldn't get
@ -347,7 +359,7 @@ python 3.4 working using the
so I used python 3.3 instead, which works fine but is not officially so I used python 3.3 instead, which works fine but is not officially
supported. Just create a file named &lt;em&gt;runtime.txt&lt;/em&gt; in your project root, supported. Just create a file named &lt;em&gt;runtime.txt&lt;/em&gt; in your project root,
with the python version you want to use:&lt;/p&gt; with the python version you want to use:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;python-3.3.1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;python-3.3.1
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Don't forget to freeze your dependencies so Heroku can install them: &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;Don't forget to freeze your dependencies so Heroku can install them:
&lt;tt class="docutils literal"&gt;bash pip freze &amp;gt; requirements.txt&lt;/tt&gt;&lt;/p&gt; &lt;tt class="docutils literal"&gt;bash pip freze &amp;gt; requirements.txt&lt;/tt&gt;&lt;/p&gt;
@ -364,7 +376,7 @@ cipher&lt;/a&gt;. Please, don't
use it for any serious application if you are concerned about being use it for any serious application if you are concerned about being
spammed.&lt;/p&gt; spammed.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;blur_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; 2&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;blur_email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nb"&gt;chr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And this is the client side:&lt;/p&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;And this is the client side:&lt;/p&gt;
@ -379,7 +391,7 @@ spammed.&lt;/p&gt;
9 9
10 10
11 11
12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt; 12&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="nx"&gt;elems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;profile-email&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;profile-email&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;blur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;blur&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;elems&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;innerHTML&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
@ -423,7 +435,7 @@ the &lt;a class="reference external" href="http://slipsum.com/"&gt;Samuel L. Jac
&lt;/div&gt; &lt;/div&gt;
</summary><category term="javascript"></category><category term="python"></category><category term="heroku"></category></entry><entry><title>Remove git files with globbing</title><link href="http://balkian.com/remove-git-files-with-globbing.html" rel="alternate"></link><updated>2013-08-22T23:14:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:remove-git-files-with-globbing.html</id><summary type="html">&lt;p&gt;A simple trick. If you want to remove all the '.swp' files from a git </summary><category term="javascript"></category><category term="python"></category><category term="heroku"></category></entry><entry><title>Remove git files with globbing</title><link href="http://balkian.com/remove-git-files-with-globbing.html" rel="alternate"></link><updated>2013-08-22T23:14:00+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:remove-git-files-with-globbing.html</id><summary type="html">&lt;p&gt;A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:&lt;/p&gt; repository, just use:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;git rm --cached &lt;span class="s1"&gt;&amp;#39;\*\*.swp&amp;#39;&lt;/span&gt; &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git rm --cached &lt;span class="s1"&gt;&amp;#39;\*\*.swp&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><category term="git"></category></entry><entry><title>Creating my web</title><link href="http://balkian.com/creating-my-web.html" rel="alternate"></link><updated>2013-08-22T14:14:22+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:creating-my-web.html</id><summary type="html">&lt;p&gt;Finally, I've decided to set up a decent personal page. I have settled &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary><category term="git"></category></entry><entry><title>Creating my web</title><link href="http://balkian.com/creating-my-web.html" rel="alternate"></link><updated>2013-08-22T14:14:22+02:00</updated><author><name>J. Fernando Sánchez</name></author><id>tag:balkian.com,2013-08-22:creating-my-web.html</id><summary type="html">&lt;p&gt;Finally, I've decided to set up a decent personal page. I have settled
for github-pages because I like the idea of keeping my site in a for github-pages because I like the idea of keeping my site in a
@ -453,7 +465,7 @@ on Github&lt;/a&gt;. You can
clone and deploy it easily like this:&lt;/p&gt; clone and deploy it easily like this:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1 &lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;1
2 2
3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;git clone 3&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git clone
https://github.com/balkian/balkian.github.com &lt;span class="nb"&gt;cd&lt;/span&gt; balkian.github.com https://github.com/balkian/balkian.github.com &lt;span class="nb"&gt;cd&lt;/span&gt; balkian.github.com
jekyll serve -w jekyll serve -w
&lt;/pre&gt;&lt;/div&gt; &lt;/pre&gt;&lt;/div&gt;

View File

@ -89,6 +89,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -106,12 +108,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -126,6 +122,27 @@
</div> </div>
<!-- This loops through the paginated posts --> <!-- This loops through the paginated posts -->
<div class="posthead">
<h2><a href="/progress-bars-in-python.html" class="title">Progress bars in python</a></h2>
<span class="date">2016-09-28</span>
<a class="tag" href="/tag/python.html"><span class="label">python</span></a>
</div>
<div class="excerpt">
<p><a class="reference external" href="https://github.com/noamraph/tqdm">tqdm</a> is a nice way to add progress bars in the command line or in a jupyter notebook.</p>
<img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" />
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">tqdm</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)):</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</td></tr></table>
</div>
<div class="readmore"><a href="/progress-bars-in-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
<div class="posthead"> <div class="posthead">
<h2><a href="/arch-linux-fixes.html" class="title">Arch Linux Fixes</a></h2> <h2><a href="/arch-linux-fixes.html" class="title">Arch Linux Fixes</a></h2>
<span class="date">2016-02-03</span> <span class="date">2016-02-03</span>
@ -137,7 +154,7 @@
<h2>Black screen and LightDM doesn't unlock</h2> <h2>Black screen and LightDM doesn't unlock</h2>
<p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p> <p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[LightDM]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[LightDM]</span>
<span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span> <span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
@ -155,7 +172,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
@ -209,7 +226,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
@ -251,7 +268,7 @@ gathered from media in several languages. Then we aggregated ...</p>
<div class="excerpt"> <div class="excerpt">
<p>A simple trick. If you want to remove all the '.swp' files from a git <p>A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:</p> repository, just use:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span>
</pre></div> </pre></div>
</td></tr></table> </td></tr></table>
</div> </div>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -137,7 +133,7 @@
<div class="post"> <div class="post">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>

View File

@ -90,6 +90,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -107,12 +109,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>

View File

@ -0,0 +1,186 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>balkian.com - Progress bars in python
</title>
<meta name="viewport" content="width=device-width">
<!-- syntax highlighting CSS -->
<link rel="stylesheet" href="/theme/css/solarized.css">
<!--<link href="/css/bootstrap.css" rel="stylesheet">-->
<link rel="stylesheet" href="/theme/font-awesome/css/font-awesome.min.css">
<!--<link rel="stylesheet" href="/css/bootstrap-responsive.min.css">-->
<!-- Custom CSS -->
<link rel="stylesheet" media="only screen" href="/theme/css/main.css">
<link rel="stylesheet" media="only screen and (min-width: 0px) and (max-width: 599px)" href="/theme/css/main-xs.css">
<link rel="stylesheet" media="only screen and (min-width: 600px) and (max-width: 1199px)" href="/theme/css/main-medium.css">
<link rel="stylesheet" media="only screen and (min-width: 1200px)" href="/theme/css/main-desktop.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300|Comfortaa' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="container" class="container">
<header id="header">
<div id="navbar" class="navbar navbar-inverse navbar-static-bottom">
<div class="container">
<div class="navbar-header">
<ul class="nav navbar-nav">
<li >
<a href="/"><i class="fa fa-home fa-large"></i></a>
</li>
<li >
<a href="/category/cheats.html">Cheats</a>
</li>
<li class="active"
>
<a href="/category/misc.html">Misc</a>
</li>
<li >
<a href="/tags.html">Tags</a>
</li>
<li >
<a href="/pages/projects.html">Projects</a>
</li>
<li>
<a href="//jfernando.es" target="_blank">CV</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<div id="contentwrapper">
<div id="sidebar" >
<div id="badge" class="flip-container" ontouchstart="this.classList.toggle('hover');">
<div class="flipper sticky">
<div class="front">
<!-- front content -->
<img id="avatar" width=100% src="/theme/img/me.png">
</div>
<div class="back">
<!-- back content -->
<img id="picture" width=100% src="/theme/img/me-bat.png">
</div>
</div>
</div>
<div id="about" style="clear:both;">
<!-- <h1 class="title">Interests</h1> -->
<div class="icons">
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa-stack-2x" ></i><i class="fa fa-stack-1x fa-linux"></i></span><span class="explanation">Linux lover</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-android"></i></span><span class="explanation">Android dev</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-github-alt"></i> </span><span class="explanation">GitHub user</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-stack-exchange"></i> </span><span class="explanation">StackExchange fan</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-music"></i> </span><span class="explanation">Music lover</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-film"></i> </span><span class="explanation">Movie fan</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-comments"></i> </span><span class="explanation">Always on IM</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-laptop"></i> </span><span class="explanation">Always on a PC</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-pencil"></i> </span><span class="explanation">Occassional writter</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-moon-o"></i> </span><span class="explanation">Night owl</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-terminal"></i></span> <span class="explanation">CLI user</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-flag"></i></span> <span class="explanation">Linguist wannabe</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-code"></i> </span> <span class="explanation">Love to code</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-book"></i></span> <span class="explanation">Keen reader</span></span>
<span class="coolicon"><span class="fa fa-stack"> <i class="fa fa-square-o fa fa-stack-2x" ></i><i class="fa fa-quote-right"></i></span> <span class="explanation">Quotes on demand</span></span>
</div>
</div>
<div class="entries">
<h2 class="title">Latest entries</h2>
<dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
<dt><a href="/org-mode-tricks.html">Org-mode tricks</a></dt>
<dd class="tag"><a class="label" href="/tag/emacs.html">emacs</a></dd>
<dd class="tag"><a class="label" href="/tag/productivity.html">productivity</a></dd>
<dd class="tag"><a class="label" href="/tag/editor.html">editor</a></dd>
<dd class="tag"><a class="label" href="/tag/org.html">org</a></dd>
<dt><a href="/sharing-dotfiles.html">Sharing dotfiles</a></dt>
<dd class="tag"><a class="label" href="/tag/github.html">github</a></dd>
<dd class="tag"><a class="label" href="/tag/git.html">git</a></dd>
<dd class="tag"><a class="label" href="/tag/dotfiles.html">dotfiles</a></dd>
<dt><a href="/zotero.html">Zotero</a></dt>
<dd class="tag"><a class="label" href="/tag/zotero.html">zotero</a></dd>
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
</dl>
</div>
<!--Sidebar content-->
</div>
<div id="content">
<!--Body content-->
<div class="postnav">
<span class="previouspost"><i class="fa fa-chevron-left"></i> <a href="arch-linux-fixes.html">Arch Linux Fixes</a></span>
</div>
<div class="posthead">
<h2 class="title">Progress bars in python</h2>
<span class="meta date">2016-09-28</span>
<span class="tag"><a href="/tag/python.html" class="label label-default">python</a></span>
</div>
<div class="post">
<p><a class="reference external" href="https://github.com/noamraph/tqdm">tqdm</a> is a nice way to add progress bars in the command line or in a jupyter notebook.</p>
<img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" />
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">tqdm</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)):</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</td></tr></table>
</div>
</div>
<div class="clear"></div>
</div>
<footer role="contentinfo">
<div class="contact">
<p>
J. Fernando Sánchez Rada | balkian
</p>
</div>
<ul id="social">
<li><a href="http://github.com/balkian"><i class="fa fa-github"></i></a></li>
<li><a href="http://bitbucket.com/balkian"><i class="fa fa-bitbucket"></i></a></li>
<li><a href="http://twitter.com/balkian"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://plus.google.com/u/0/111897020957944410316"><i class="fa fa-google-plus"></i></a></li>
<li><a href="http://linkedin.com/in/jfsanchezrada"><i class="fa fa-linkedin"></i></a></li>
<li><a href="http://facebook.com/balkian"><i class="fa fa-facebook"></i></a></li>
</ul>
<p>
<i class="fa fa-creative-commons"></i> Creative Commons A-SA-NC
</p>
</footer>
</div>
<script src="/theme/js/jquery-2.0.2.min.js"></script>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.sinpapel.es/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//piwik.sinpapel.es/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<!--<script src="/js/bootstrap.min.js"></script>-->
</body>
</html>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -145,7 +141,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0.1:8888/myapp/ <span class="nb">ProxyPass</span> http://127.0.0.1:8888/myapp/
<span class="nb">ProxyPassReverse</span> http://127.0.0.1:8888/myapp/ <span class="nb">ProxyPassReverse</span> http://127.0.0.1:8888/myapp/
<span class="nb">RequestHeader</span> set SCRIPT_NAME <span class="s2">&quot;/myapp/&quot;</span> <span class="nb">RequestHeader</span> set SCRIPT_NAME <span class="s2">&quot;/myapp/&quot;</span>
@ -154,7 +150,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
</td></tr></table><p><strong>Important</strong>: <em>SCRIPT_NAME</em> and the end of <em>ProxyPass</em> URL <strong>MUST BE </td></tr></table><p><strong>Important</strong>: <em>SCRIPT_NAME</em> and the end of <em>ProxyPass</em> URL <strong>MUST BE
THE SAME</strong>. Otherwise, Gunicorn will fail miserably.</p> THE SAME</strong>. Otherwise, Gunicorn will fail miserably.</p>
<p>Try it with:</p> <p>Try it with:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>venv/bin/gunicorn -w <span class="m">4</span> -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>venv/bin/gunicorn -w <span class="m">4</span> -b 127.0.0.1:8888 --log-file - --access-logfile - wsgi:application
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
<div class="section" id="uwsgi"> <div class="section" id="uwsgi">
@ -164,13 +160,13 @@ options for uwsgi (in a .ini file).</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2 2
3 3
4</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 4</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">SetHandler</span> uwsgi_handler <span class="nb">SetHandler</span> uwsgi_handler
<span class="nb">uWSGISocker</span> <span class="m">127.0.0.1</span>:8888 <span class="nb">uWSGISocker</span> <span class="m">127.0.0.1</span>:8888
<span class="nt">&lt;/Location&gt;</span> <span class="nt">&lt;/Location&gt;</span>
</pre></div> </pre></div>
</td></tr></table><p>Try it with:</p> </td></tr></table><p>Try it with:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>uwsgi --socket 127.0.0.1:8888 -w wsgi:application <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>uwsgi --socket 127.0.0.1:8888 -w wsgi:application
</pre></div> </pre></div>
</td></tr></table><div class="section" id="extra-supervisor"> </td></tr></table><div class="section" id="extra-supervisor">
<h3>Extra: Supervisor</h3> <h3>Extra: Supervisor</h3>
@ -194,7 +190,7 @@ supervisor config file and let it handle the server for you.</p>
16 16
17 17
18 18
19</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[unix_http_server]</span> 19</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[unix_http_server]</span>
<span class="na">file</span><span class="o">=</span><span class="s">/tmp/myapp.sock ; path to your socket file</span> <span class="na">file</span><span class="o">=</span><span class="s">/tmp/myapp.sock ; path to your socket file</span>
<span class="k">[supervisord]</span> <span class="k">[supervisord]</span>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -162,7 +158,7 @@ memorability over describing the functionality.</p>
10 10
11 11
12 12
13</pre></div></td><td class="code"><div class="highlight"><pre><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span> 13</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="err">[distutils]</span> <span class="c1"># this tells distutils what package indexes you can push to</span>
<span class="na">index-servers</span> <span class="o">=</span><span class="s"></span> <span class="na">index-servers</span> <span class="o">=</span><span class="s"></span>
<span class="s"> pypi # the live PyPI</span> <span class="s"> pypi # the live PyPI</span>
<span class="s"> pypitest # test PyPI</span> <span class="s"> pypitest # test PyPI</span>
@ -200,7 +196,7 @@ root-dir/ # Any name you want
<div class="section" id="setup-cfg"> <div class="section" id="setup-cfg">
<h3>setup.cfg</h3> <h3>setup.cfg</h3>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[metadata]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[metadata]</span>
<span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span> <span class="na">description-file</span> <span class="o">=</span> <span class="s">README.md</span>
</pre></div> </pre></div>
</td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can </td></tr></table><p>The markdown README is the <em>de facto</em> standard in Github, but you can
@ -219,7 +215,7 @@ also use rST (reStructuredText), the standard in the python community.</p>
9 9
10 10
11 11
12</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span> 12</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span>
<span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;mypackage&#39;</span><span class="p">,</span> <span class="n">setup</span><span class="p">(</span><span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;mypackage&#39;</span><span class="p">,</span>
<span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;mypackage&#39;</span><span class="p">],</span> <span class="c1"># this must be the same as the name above</span> <span class="n">packages</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;mypackage&#39;</span><span class="p">],</span> <span class="c1"># this must be the same as the name above</span>
@ -237,7 +233,7 @@ host our package anywhere, but Github is a convenient option. To create
the tarball and the zip packages, you only need to tag a tag in your the tarball and the zip packages, you only need to tag a tag in your
repository and push it to github:</p> repository and push it to github:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">&quot;{ Description of this tag/version}&quot;</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git tag <span class="o">{</span>version<span class="o">}</span> -m <span class="s2">&quot;{ Description of this tag/version}&quot;</span>
git push --tags origin master git push --tags origin master
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -134,7 +130,7 @@
<div class="post"> <div class="post">
<p>A simple trick. If you want to remove all the '.swp' files from a git <p>A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:</p> repository, just use:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span>
</pre></div> </pre></div>
</td></tr></table> </td></tr></table>
</div> </div>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -141,13 +137,13 @@ This is cool and convenient, unless you <a class="reference external" href="http
<p>So, how can you still share your gitconfig without sharing your password/token with the rest of the world? <p>So, how can you still share your gitconfig without sharing your password/token with the rest of the world?
Since Git 1.7.0, you can <a class="reference external" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig">include other files in your gitconfig</a>.</p> Since Git 1.7.0, you can <a class="reference external" href="http://stackoverflow.com/questions/1557183/is-it-possible-to-include-a-file-in-your-gitconfig">include other files in your gitconfig</a>.</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre>[include] 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span>[include]
path = ~/.gitconfig_secret path = ~/.gitconfig_secret
</pre></div> </pre></div>
</td></tr></table><p>And now, in your .gitconfig_secret file, you just have to add this:</p> </td></tr></table><p>And now, in your .gitconfig_secret file, you just have to add this:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2 2
3</pre></div></td><td class="code"><div class="highlight"><pre>[github] 3</pre></div></td><td class="code"><div class="highlight"><pre><span></span>[github]
user = balkian user = balkian
token = &quot;&lt; Your secret token &gt;&quot; token = &quot;&lt; Your secret token &gt;&quot;
</pre></div> </pre></div>

View File

@ -150,7 +150,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>

View File

@ -118,7 +118,7 @@
<h2>Black screen and LightDM doesn't unlock</h2> <h2>Black screen and LightDM doesn't unlock</h2>
<p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p> <p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[LightDM]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[LightDM]</span>
<span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span> <span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -120,7 +120,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -120,7 +120,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -137,7 +137,7 @@ When you first use it, the extension saves either ...</p>
<div class="excerpt"> <div class="excerpt">
<p>A simple trick. If you want to remove all the '.swp' files from a git <p>A simple trick. If you want to remove all the '.swp' files from a git
repository, just use:</p> repository, just use:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>git rm --cached <span class="s1">&#39;\*\*.swp&#39;</span>
</pre></div> </pre></div>
</td></tr></table> </td></tr></table>
</div> </div>

View File

@ -129,7 +129,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>

View File

@ -118,7 +118,7 @@
<h2>Black screen and LightDM doesn't unlock</h2> <h2>Black screen and LightDM doesn't unlock</h2>
<p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p> <p>Add this to your <cite>/etc/lightdm/lightdm.conf</cite> file:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">[LightDM]</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">[LightDM]</span>
<span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span> <span class="na">logind-check-graphical</span><span class="o">=</span><span class="s">true</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -120,7 +120,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -120,7 +120,7 @@
<div class="excerpt"> <div class="excerpt">
<div class="section" id="show-plain-text-version"> <div class="section" id="show-plain-text-version">
<h2>Show plain text version</h2> <h2>Show plain text version</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">(</span><span class="nv">font-lock-mode</span><span class="p">)</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>

View File

@ -129,7 +129,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>

View File

@ -89,6 +89,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt> <dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd> <dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
@ -118,6 +120,27 @@
<h1>Entries tagged: python</h1> <h1>Entries tagged: python</h1>
<!-- This loops through the paginated posts --> <!-- This loops through the paginated posts -->
<div class="posthead">
<h2><a href="/progress-bars-in-python.html" class="title">Progress bars in python</a></h2>
<span class="date">2016-09-28</span>
<a class="tag" href="/tag/python.html"><span class="label">python</span></a>
</div>
<div class="excerpt">
<p><a class="reference external" href="https://github.com/noamraph/tqdm">tqdm</a> is a nice way to add progress bars in the command line or in a jupyter notebook.</p>
<img alt="" src="https://camo.githubusercontent.com/48838faaa8d00ea297f18e5bf55d3c6bb4e0ba6b/68747470733a2f2f692e696d6775722e636f6d2f686539417735432e676966" />
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">tqdm</span> <span class="kn">import</span> <span class="n">tqdm</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">tqdm</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)):</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</pre></div>
</td></tr></table>
</div>
<div class="readmore"><a href="/progress-bars-in-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>
<div class="posthead"> <div class="posthead">
<h2><a href="/proxies-with-apache-and-python.html" class="title">Proxies with Apache and python</a></h2> <h2><a href="/proxies-with-apache-and-python.html" class="title">Proxies with Apache and python</a></h2>
<span class="date">2014-10-09</span> <span class="date">2014-10-09</span>
@ -137,7 +160,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>

View File

@ -129,7 +129,7 @@ a WSGI application with the name <em>application</em>. Hence, wsgi:application.<
2 2
3 3
4 4
5</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span> 5</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/myapp/</span><span class="nt">&gt;</span>
<span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div> <span class="nb">ProxyPass</span> http://127.0.0 ...</pre></div></td></tr></table></div>
</div> </div>
<div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div> <div class="readmore"><a href="/proxies-with-apache-and-python.html"><i class="fa fa-external-link"></i> Read more...</a></div>

View File

@ -90,6 +90,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -107,12 +109,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -121,28 +117,28 @@
<div id="content"> <div id="content">
<!--Body content--> <!--Body content-->
<h2>Post tags</h2> <h2>Post tags</h2>
<a class="tag" href="/tag/git.html"><span style="font-size: 200.0%;" class="label label-default">git (3)</span></a> <a class="tag" href="/tag/python.html"><span style="font-size: 200.0%;" class="label label-default">python (4)</span></a>
<a class="tag" href="/tag/github.html"><span style="font-size: 200.0%;" class="label label-default">github (3)</span></a> <a class="tag" href="/tag/github.html"><span style="font-size: 150.0%;" class="label label-default">github (3)</span></a>
<a class="tag" href="/tag/python.html"><span style="font-size: 200.0%;" class="label label-default">python (3)</span></a> <a class="tag" href="/tag/git.html"><span style="font-size: 150.0%;" class="label label-default">git (3)</span></a>
<a class="tag" href="/tag/apache.html"><span style="font-size: 133.33333333333334%;" class="label label-default">apache (2)</span></a> <a class="tag" href="/tag/javascript.html"><span style="font-size: 100.0%;" class="label label-default">javascript (2)</span></a>
<a class="tag" href="/tag/javascript.html"><span style="font-size: 133.33333333333334%;" class="label label-default">javascript (2)</span></a> <a class="tag" href="/tag/apache.html"><span style="font-size: 100.0%;" class="label label-default">apache (2)</span></a>
<a class="tag" href="/tag/arch.html"><span style="font-size: 66.66666666666667%;" class="label label-default">arch (1)</span></a> <a class="tag" href="/tag/pypi.html"><span style="font-size: 50.0%;" class="label label-default">pypi (1)</span></a>
<a class="tag" href="/tag/gunicorn.html"><span style="font-size: 66.66666666666667%;" class="label label-default">gunicorn (1)</span></a> <a class="tag" href="/tag/proxy.html"><span style="font-size: 50.0%;" class="label label-default">proxy (1)</span></a>
<a class="tag" href="/tag/zotero.html"><span style="font-size: 66.66666666666667%;" class="label label-default">zotero (1)</span></a> <a class="tag" href="/tag/uwsgi.html"><span style="font-size: 50.0%;" class="label label-default">uwsgi (1)</span></a>
<a class="tag" href="/tag/uwsgi.html"><span style="font-size: 66.66666666666667%;" class="label label-default">uwsgi (1)</span></a> <a class="tag" href="/tag/arch.html"><span style="font-size: 50.0%;" class="label label-default">arch (1)</span></a>
<a class="tag" href="/tag/pypi.html"><span style="font-size: 66.66666666666667%;" class="label label-default">pypi (1)</span></a> <a class="tag" href="/tag/heroku.html"><span style="font-size: 50.0%;" class="label label-default">heroku (1)</span></a>
<a class="tag" href="/tag/org.html"><span style="font-size: 66.66666666666667%;" class="label label-default">org (1)</span></a> <a class="tag" href="/tag/editor.html"><span style="font-size: 50.0%;" class="label label-default">editor (1)</span></a>
<a class="tag" href="/tag/ruby.html"><span style="font-size: 66.66666666666667%;" class="label label-default">ruby (1)</span></a> <a class="tag" href="/tag/org.html"><span style="font-size: 50.0%;" class="label label-default">org (1)</span></a>
<a class="tag" href="/tag/dotfiles.html"><span style="font-size: 66.66666666666667%;" class="label label-default">dotfiles (1)</span></a> <a class="tag" href="/tag/webdav.html"><span style="font-size: 50.0%;" class="label label-default">webdav (1)</span></a>
<a class="tag" href="/tag/editor.html"><span style="font-size: 66.66666666666667%;" class="label label-default">editor (1)</span></a> <a class="tag" href="/tag/starters.html"><span style="font-size: 50.0%;" class="label label-default">starters (1)</span></a>
<a class="tag" href="/tag/linux.html"><span style="font-size: 66.66666666666667%;" class="label label-default">linux (1)</span></a> <a class="tag" href="/tag/dotfiles.html"><span style="font-size: 50.0%;" class="label label-default">dotfiles (1)</span></a>
<a class="tag" href="/tag/webdav.html"><span style="font-size: 66.66666666666667%;" class="label label-default">webdav (1)</span></a> <a class="tag" href="/tag/gunicorn.html"><span style="font-size: 50.0%;" class="label label-default">gunicorn (1)</span></a>
<a class="tag" href="/tag/emacs.html"><span style="font-size: 66.66666666666667%;" class="label label-default">emacs (1)</span></a> <a class="tag" href="/tag/zotero.html"><span style="font-size: 50.0%;" class="label label-default">zotero (1)</span></a>
<a class="tag" href="/tag/productivity.html"><span style="font-size: 66.66666666666667%;" class="label label-default">productivity (1)</span></a> <a class="tag" href="/tag/nginx.html"><span style="font-size: 50.0%;" class="label label-default">nginx (1)</span></a>
<a class="tag" href="/tag/starters.html"><span style="font-size: 66.66666666666667%;" class="label label-default">starters (1)</span></a> <a class="tag" href="/tag/ruby.html"><span style="font-size: 50.0%;" class="label label-default">ruby (1)</span></a>
<a class="tag" href="/tag/proxy.html"><span style="font-size: 66.66666666666667%;" class="label label-default">proxy (1)</span></a> <a class="tag" href="/tag/productivity.html"><span style="font-size: 50.0%;" class="label label-default">productivity (1)</span></a>
<a class="tag" href="/tag/nginx.html"><span style="font-size: 66.66666666666667%;" class="label label-default">nginx (1)</span></a> <a class="tag" href="/tag/linux.html"><span style="font-size: 50.0%;" class="label label-default">linux (1)</span></a>
<a class="tag" href="/tag/heroku.html"><span style="font-size: 66.66666666666667%;" class="label label-default">heroku (1)</span></a> <a class="tag" href="/tag/emacs.html"><span style="font-size: 50.0%;" class="label label-default">emacs (1)</span></a>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -158,7 +154,7 @@ new technologies and improve it:</p>
<p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p> <p>The result can be <a class="reference external" href="http://eurolovemap.herokuapp.com/">seen here</a>.</p>
<div class="section" id="publishing-a-python-3-app-on-heroku"> <div class="section" id="publishing-a-python-3-app-on-heroku">
<h2>Publishing a Python 3 app on Heroku</h2> <h2>Publishing a Python 3 app on Heroku</h2>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>mkvirtualenv -p /usr/bin/python3.3 eurolovemap <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>mkvirtualenv -p /usr/bin/python3.3 eurolovemap
</pre></div> </pre></div>
</td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which </td></tr></table><p>Since Heroku uses python 2.7 by default, we have to tell it which
version we want, although it supports python 3.4 as well. I couldn't get version we want, although it supports python 3.4 as well. I couldn't get
@ -167,7 +163,7 @@ python 3.4 working using the
so I used python 3.3 instead, which works fine but is not officially so I used python 3.3 instead, which works fine but is not officially
supported. Just create a file named <em>runtime.txt</em> in your project root, supported. Just create a file named <em>runtime.txt</em> in your project root,
with the python version you want to use:</p> with the python version you want to use:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>python-3.3.1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>python-3.3.1
</pre></div> </pre></div>
</td></tr></table><p>Don't forget to freeze your dependencies so Heroku can install them: </td></tr></table><p>Don't forget to freeze your dependencies so Heroku can install them:
<tt class="docutils literal">bash pip freze &gt; requirements.txt</tt></p> <tt class="docutils literal">bash pip freze &gt; requirements.txt</tt></p>
@ -184,7 +180,7 @@ cipher</a>. Please, don't
use it for any serious application if you are concerned about being use it for any serious application if you are concerned about being
spammed.</p> spammed.</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">def</span> <span class="nf">blur_email</span><span class="p">(</span><span class="n">email</span><span class="p">):</span> 2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">blur_email</span><span class="p">(</span><span class="n">email</span><span class="p">):</span>
<span class="k">return</span> <span class="s2">&quot;&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">chr</span><span class="p">(</span><span class="nb">ord</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">+</span><span class="mi">5</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">email</span><span class="p">])</span> <span class="k">return</span> <span class="s2">&quot;&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="nb">chr</span><span class="p">(</span><span class="nb">ord</span><span class="p">(</span><span class="n">i</span><span class="p">)</span><span class="o">+</span><span class="mi">5</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">email</span><span class="p">])</span>
</pre></div> </pre></div>
</td></tr></table><p>And this is the client side:</p> </td></tr></table><p>And this is the client side:</p>
@ -199,7 +195,7 @@ spammed.</p>
9 9
10 10
11 11
12</pre></div></td><td class="code"><div class="highlight"><pre><span class="nb">window</span><span class="p">.</span><span class="nx">onload</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(){</span> 12</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nb">window</span><span class="p">.</span><span class="nx">onload</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(){</span>
<span class="nx">elems</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByClassName</span><span class="p">(</span><span class="s1">&#39;profile-email&#39;</span><span class="p">);</span> <span class="nx">elems</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByClassName</span><span class="p">(</span><span class="s1">&#39;profile-email&#39;</span><span class="p">);</span>
<span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">e</span> <span class="k">in</span> <span class="nx">elems</span><span class="p">){</span> <span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">e</span> <span class="k">in</span> <span class="nx">elems</span><span class="p">){</span>
<span class="kd">var</span> <span class="nx">blur</span> <span class="o">=</span> <span class="nx">elems</span><span class="p">[</span><span class="nx">e</span><span class="p">].</span><span class="nx">innerHTML</span><span class="p">;</span> <span class="kd">var</span> <span class="nx">blur</span> <span class="o">=</span> <span class="nx">elems</span><span class="p">[</span><span class="nx">e</span><span class="p">].</span><span class="nx">innerHTML</span><span class="p">;</span>

View File

@ -91,6 +91,8 @@
<div class="entries"> <div class="entries">
<h2 class="title">Latest entries</h2> <h2 class="title">Latest entries</h2>
<dl> <dl>
<dt><a href="/progress-bars-in-python.html">Progress bars in python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt> <dt><a href="/arch-linux-fixes.html">Arch Linux Fixes</a></dt>
<dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd> <dd class="tag"><a class="label" href="/tag/arch.html">arch</a></dd>
<dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd> <dd class="tag"><a class="label" href="/tag/linux.html">linux</a></dd>
@ -108,12 +110,6 @@
<dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd> <dd class="tag"><a class="label" href="/tag/webdav.html">webdav</a></dd>
<dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd> <dd class="tag"><a class="label" href="/tag/nginx.html">nginx</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd> <dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dt><a href="/proxies-with-apache-and-python.html">Proxies with Apache and python</a></dt>
<dd class="tag"><a class="label" href="/tag/python.html">python</a></dd>
<dd class="tag"><a class="label" href="/tag/apache.html">apache</a></dd>
<dd class="tag"><a class="label" href="/tag/proxy.html">proxy</a></dd>
<dd class="tag"><a class="label" href="/tag/gunicorn.html">gunicorn</a></dd>
<dd class="tag"><a class="label" href="/tag/uwsgi.html">uwsgi</a></dd>
</dl> </dl>
</div> </div>
@ -147,10 +143,10 @@ Debian/Ubuntu.</p>
<div class="section" id="setting-up-apache"> <div class="section" id="setting-up-apache">
<h2>Setting up Apache</h2> <h2>Setting up Apache</h2>
<p>First we need to install Apache:</p> <p>First we need to install Apache:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>sudo apt-get install apache2 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>sudo apt-get install apache2
</pre></div> </pre></div>
</td></tr></table><p>Change the head of &quot;/etc/apache2/sites-enabled/000-default&quot; to:</p> </td></tr></table><p>Change the head of &quot;/etc/apache2/sites-enabled/000-default&quot; to:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="nt">&lt;VirtualHost</span> <span class="s">*:880</span><span class="nt">&gt;</span> <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nt">&lt;VirtualHost</span> <span class="s">*:880</span><span class="nt">&gt;</span>
</pre></div> </pre></div>
</td></tr></table><p>Then, create a file /etc/apache2/sites-available/webdav:</p> </td></tr></table><p>Then, create a file /etc/apache2/sites-available/webdav:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
@ -165,7 +161,7 @@ Debian/Ubuntu.</p>
10 10
11 11
12 12
13</pre></div></td><td class="code"><div class="highlight"><pre><span class="nb">Alias</span> <span class="sx">/dav</span> <span class="sx">/home/webdav/dav</span> 13</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="nb">Alias</span> <span class="sx">/dav</span> <span class="sx">/home/webdav/dav</span>
<span class="nt">&lt;Location</span> <span class="s">/dav</span><span class="nt">&gt;</span> <span class="nt">&lt;Location</span> <span class="s">/dav</span><span class="nt">&gt;</span>
<span class="nb">Dav</span> <span class="k">on</span> <span class="nb">Dav</span> <span class="k">on</span>
<span class="nb">Order</span> Allow,Deny <span class="nb">Order</span> Allow,Deny
@ -189,7 +185,7 @@ other application using webdav.</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2 2
3 3
4</pre></div></td><td class="code"><div class="highlight"><pre>sudo adduser webdav 4</pre></div></td><td class="code"><div class="highlight"><pre><span></span>sudo adduser webdav
sudo htpasswd -c /home/webdav/.htpasswd webdav sudo htpasswd -c /home/webdav/.htpasswd webdav
sudo htpasswd /home/webdav/.htpasswd zotero sudo htpasswd /home/webdav/.htpasswd zotero
sudo mkdir -p /home/webdav/dav/zotero sudo mkdir -p /home/webdav/dav/zotero
@ -198,7 +194,7 @@ sudo mkdir -p /home/webdav/dav/zotero
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2 2
3 3
4</pre></div></td><td class="code"><div class="highlight"><pre>sudo a2enmod webdav 4</pre></div></td><td class="code"><div class="highlight"><pre><span></span>sudo a2enmod webdav
sudo a2enmod dav_fs sudo a2enmod dav_fs
sudo a2ensite webdav sudo a2ensite webdav
sudo service apache2 restart sudo service apache2 restart
@ -216,7 +212,7 @@ cleaner URIs. In your desired site/location, add this:</p>
4 4
5 5
6 6
7</pre></div></td><td class="code"><div class="highlight"><pre><span class="k">location</span> <span class="s">/dav</span> <span class="p">{</span> 7</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="s">/dav</span> <span class="p">{</span>
<span class="kn">client_max_body_size</span> <span class="s">20M</span><span class="p">;</span> <span class="kn">client_max_body_size</span> <span class="s">20M</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span> <span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$remote_addr</span><span class="p">;</span> <span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$remote_addr</span><span class="p">;</span>
@ -225,7 +221,7 @@ cleaner URIs. In your desired site/location, add this:</p>
<span class="p">}</span> <span class="p">}</span>
</pre></div> </pre></div>
</td></tr></table><p>Now just reload nginx:</p> </td></tr></table><p>Now just reload nginx:</p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>sudo service nginx force-reload <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span></span>sudo service nginx force-reload
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
<div class="section" id="extras"> <div class="section" id="extras">