Balkian's site / Recent content on Balkian's site Hugo -- gohugo.io en-us This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Fri, 29 Oct 2021 00:00:01 +0000 Logitech MX Keys for Mac on Linux /post/2021-10-29-logitech-mx-keys-mac/ Fri, 29 Oct 2021 00:00:01 +0000 /post/2021-10-29-logitech-mx-keys-mac/ I recently got Logitech MX Keys for Mac keyboard at work. The German version, to be more precise. This version was three times cheaper than the Windows equivalent with either US or ES layout. Since I touch type anyway, I thought it was a bargain. As soon as I plugged it in, I realized there were some glaring issues with the keyboard. Linux on the Microsoft Surface Go /post/2019-05-01-surface-go/ Sat, 01 Jun 2019 00:00:01 +0000 /post/2019-05-01-surface-go/ <p>Believe it or not, Surface tablets have pretty good linux support, except for the webcams in newer models. These are some useful notes to get Ubuntu installed in your surface go, as of Summer 2019.</p> Controlling Zigbee devices with MQTT /post/2019-01-06-zigbee2mqtt/ Sun, 06 Jan 2019 10:00:00 +0000 /post/2019-01-06-zigbee2mqtt/ This is a short tutorial on connecting a zigbee device (an Aqara cube) to an MQTT server, so you can control your zigbee devices from the network. If you&rsquo;re anything like me, you&rsquo;re probably a sucker for IoT devices. For a long time, I&rsquo;ve been using WiFi-enabled lights, and Amazon dash buttons to control them. Progress bars in python /post/2016-09-28-tqdm/ Wed, 28 Sep 2016 18:47:00 +0000 /post/2016-09-28-tqdm/ tqdm is a nice way to add progress bars in the command line or in a jupyter notebook. 1 2 3 4 5 from tqdm import tqdm import time for i in tqdm(range(100)): time.sleep(1) Sharing dotfiles /post/2015-04-10-github-dotfiles/ Fri, 10 Apr 2015 17:47:00 +0000 /post/2015-04-10-github-dotfiles/ Today&rsquo;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. As part of moving to emacs, I starting using the incredibly useful gh.el. When you first use it, the extension saves either your password or an OAuth token in your . Zotero /post/2014-12-09-zotero/ Tue, 09 Dec 2014 12:12:12 +0000 /post/2014-12-09-zotero/ Zotero is an Open Source tool that lets you organise your bibliography, syncing it with the cloud. Unlike other alternatives such as Mendeley, Zotero can upload the attachments and data to a private cloud via WebDav. If you use nginx as your web server, know that even though it provides partial support for webdav, Zotero needs more than that. Proxies with Apache and python /post/2014-10-09-proxies/ Thu, 09 Oct 2014 10:00:00 +0000 /post/2014-10-09-proxies/ <p>This is a quick note on proxying a local python application (e.g. flask) to a subdirectory in Apache. This assumes that the file wsgi.py contains a WSGI application with the name <em>application</em>. Hence, wsgi:application.</p> <h2 id="gunicorn">Gunicorn</h2> <div class="highlight"><div style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"> <table style="border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;"><tr><td style="vertical-align:top;padding:0;margin:0;border:0;"> <pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4 </span><span style="margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5 </span></code></pre></td> <td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"> <pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-apache" data-lang="apache"><span style="color:#f92672">&lt;Location</span> <span style="color:#e6db74">/myapp/</span><span style="color:#f92672">&gt;</span> ProxyPass http://127.0.0.1:8888/myapp/ ProxyPassReverse http://127.0.0.1:8888/myapp/ RequestHeader set SCRIPT_NAME <span style="color:#e6db74">&#34;/myapp/&#34;</span> <span style="color:#f92672">&lt;/Location&gt;</span> </code></pre></td></tr></table> </div> </div> Publishing on PyPi /post/2014-09-23-publishing-to-pypi/ Sat, 27 Sep 2014 10:00:00 +0000 /post/2014-09-23-publishing-to-pypi/ Developing a python module and publishing it on Github is cool, but most of the times you want others to download and use it easily. That is the role of PyPi, the python package repository. In this post I show you how to publish your package in less than 10 minutes. Updating EuroLoveMap /post/2014-03-27-updating-eurolovemap/ Thu, 27 Mar 2014 14:00:00 +0000 /post/2014-03-27-updating-eurolovemap/ As part of the OpeNER hackathon we decided to build a prototype that would allow us to compare how different countries feel about several topics. We used the OpeNER pipeline to get the sentiment from a set of newspaper articles we gathered from media in several languages. Then we aggregated those articles by category and country (using the source of the article or the language it was written in), obtaining the &ldquo;overall feeling&rdquo; of each country about each topic. Remove git files with globbing /post/2013-08-22-remove-git-files-with-globbing/ Thu, 22 Aug 2013 23:14:00 +0000 /post/2013-08-22-remove-git-files-with-globbing/ A simple trick. If you want to remove all the &lsquo;.swp&rsquo; files from a git repository, just use: 1 git rm --cached &#39;**.swp&#39; Creating my web /post/2013-08-17-creating-my-web/ Thu, 22 Aug 2013 14:14:22 +0000 /post/2013-08-17-creating-my-web/ I&rsquo;ve finally 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 repository and having someone else host and deploy it for me. The site will be really simple, mostly static files. Thanks to Github, Jekyll will automatically generate static pages for my posts every time I commit anything new to this repository. Emacs /cheatsheet/emacs/ Mon, 01 Jan 0001 00:00:00 +0000 /cheatsheet/emacs/ <h1 id="show-plain-text-version">Show plain text version</h1> Index of projects /project/ Mon, 01 Jan 0001 00:00:00 +0000 /project/ Ongoing Projects Senpy: a framework for semantic sentiment and emotion analysis services. Soil: an agent-based simulator for social networks based on nx-sim and networkx. Onyx: an ontology for emotion analysis that includes concepts from W3C&rsquo;s provenance. Past Projects Marl: I updated this ontology, originally created by Adam Westerski, to make it compatible with the W3C&rsquo;s provenance ontology. Linux /cheatsheet/linux/ Mon, 01 Jan 0001 00:00:00 +0000 /cheatsheet/linux/ Black screen and LightDM doesn&rsquo;t unlock Add this to your /etc/lightdm/lightdm.conf file: 1 2 [LightDM] logind-check-graphical=true Edit previous commands fc is a shell builtin to list and edit previous commands in an editor. In addition to editing a single line (which you can also do with C-x C-e), it also allows you to edit and run several lines at the same time. Python /cheatsheet/python/ Mon, 01 Jan 0001 00:00:00 +0000 /cheatsheet/python/ Interesting libraries TQDM From tqdm&rsquo;s github repository: tqdm means &ldquo;progress&rdquo; in Arabic (taqadum, تقدّم) and an abbreviation for &ldquo;I love you so much&rdquo; in Spanish (te quiero demasiado). Raspberry Pi /cheatsheet/rpi/ Mon, 01 Jan 0001 00:00:00 +0000 /cheatsheet/rpi/ HDMI flickering Avoid HDMI flickering/intermittent blanking on RPI with a 1400x1050 VGA monitor. 1 2 3 4 5 6 hdmi_drive=2 hdmi_group=2 hdmi_mode=42 disable_overscan=1 config_hdmi_boost=7 Search Results /search/ Mon, 01 Jan 0001 00:00:00 +0000 /search/ This file exists solely to respond to /search URL with the related search layout template. No content shown here is rendered, all content is based in the template layouts/page/search.html Setting a very low sitemap priority will tell search engines this is not important content. This implementation uses Fusejs, jquery and mark. To-do /page/todo/ Mon, 01 Jan 0001 00:00:00 +0000 /page/todo/ PhD Write my first workshop paper as main author Write my first journal paper Write my first book chapter Chair a W3C Community Group Collaborate on a W3C recommendation Become a doctor! Technical Write a NodeJS App. Maia [See ISSUES] Write my first Django Application Develop a distributed LibP2P golang application Github repo with +100 stars Build a custom LineageOS image Languages English Chinese Greek German Esperanto Personal Run a 10k Blog regularly for a year