sncli – Simplenote Command Line Interface

Notes can be a great way to store information for later reference. That’s why I’m always on the look for the “perfect” note-taking app. I use Google Keep for grocery lists and saving random links I want to read but don’t have top priority, because it’s available in most platforms. Yet, for storing notes in a (somewhat) knowledge base format, I hadn’t found a solution.

I’ve tried some apps and services, but they always fell short. One of those services was Simplenote; not because it didn’t have what I needed, but because I hadn’t found a command-line application to interact with the service when I don’t have a graphical session running. Until today.

While randomly browsing the web, I stumbled upon sncli, a command-line interface for Simplenote. The tool is written in Python3, and you only need the interpreter and Pip to install it. The configuration is simple, but the keybinds are awkward. To be honest, they seem to be configurable in the configuration file, located at ‘$HOME/.snclirc’, but I haven’t done that yet.

One of the cool things about this app is it allows you to use your preferred text editor. In my case, that’s micro. I find the keybinds in this text editor simple to use (mostly because they are the same as most text editors with a GUI).

Another nice feature is the ability to flag notes as markdown content. This allows a faster visual identification of them in the notes list. There are other flags, for example to identify which notes haven’t been synced.

Other notable features include regex and Google-like search, versioning, piping (inside sncli) notes content to external command and creating notes on the command-line with a simple pipe (echo “Testing” | sncli -t Test create -).

By the way, this was written in sncli.

geekices, software livre

A few thoughts about IceWM and a theme I made for it

Today I decided to install IceWM in my Arch partition (I’m dual booting with Debian Testing). I haven’t touched this window manager in at least five years, but I had some nice memories of it, so I decided to use it again.

A few hours have passed since I’ve installed it, and I remember why I liked it. It’s very lightweight, using less than 5MB of RAM, and the (text-based) configuration is simple. The documentation is not bad either.

The default theme, however, is not to my liking. It was the one thing that I felt I had to change. So I went to to find a theme and stumbled with erizo. While not exactly what I was looking for, although it looks really nice, it gave me a really good base to start tweaking.

And this is the main reason I’m writing this: to share the theme. I’ve darken a few elements, changed the typeface (I’m using Clear Sans, from Intel, but you can use any other you like) and made a few more small tweaks. The image in this post is a screenshot from the theme I’m sharing.

The theme’s license, like the original, is the GPLv3 (please refer to the COPYING file in the download archive).

Download it


Firefox Quantum rocks!

Firefox got a major speed overhaul in version 55, the current stable version at the time of writing. I’ve used it for a few weeks and the differences are impressive.

In the same environment, it used less RAM (even with 20+ tabs), felt more responsive and started faster. Pretty impressive changes, if you ask me. And some needed ones, because the browser seemed to have a similar appetite for memory as Google Chrome and felt slow using it.

Can this get even better? Yes it can!

Meet Firefox 57. This is the version currently in beta and is part of the Quantum Project, which intends to improve the browser’s performance. Oh boy, and improve it did. The software is faster in almost every way: shorter render times, faster startup and less used RAM. Also, there are a few (more than welcome) changes to the interface, most notably the ability change between one single address and search bar or two separate bars (the current default behavior).

If you haven’t tried it already, go ahead, make your day. You can thank me later. 🙂

By the way, please be advised that some extensions do not work with this version. Luckily, uBlock Origin works.


So long, Void. Hello (again) Debian

I’d been using Void Linux for a few months and I was generally happy with this distribution. The performance is good, it uses a rolling-release model, has a D.I.Y. component to it and helped me learn a bit more about Linux internals. Yet, Debian kept whispering my name in the wind.

Debian was the first Linux distribution I really tested and ended up installing. Or was it Ubuntu? My memory is not what it used to be. But let’s be fair, it doesn’t matter which one was the first: Debian always struck me as a solid operating system, even the Testing branch. And the fact that the repositories are loaded with software helps a bit.

Software availability is an area where Void somewhat lacks. You can always build something from source, a reasonable thing to do if it’s just a software or two. When this number increases, it can be a P.I.T.A. – keeping track of new versions and new dependencies can quickly become a nightmare.

So, although I’m a bit sad because I had a good experience, I removed Void and installed Debian – a.k.a. The Universal Operating System – Testing.


I fucking hate ads and what I did about it

I fucking hate ads. I really do (fucking) hate them. They make the browsing experience far worst than it would be without them, they track the user everywhere (not just ads – winks at Facebook) and they make the mobile platforms much more annoying.

To hide them, I usually have an adblocker installed in the browser and a dedicated one in the phone (provided I have root). Now, I have one more tool: adhosts.

This is not my original work. The original author is levin. I just improved what he wrote and published the changes to a repository on Github, so anyone can use it and/or improve it.

The tool is a simple bash script that downloads some files, merges them and appends the result to your /etc/hosts file. You’ll need bash, curl and an internet connection. And make no mistakes, this will not block all of the ads. An adblocker in the browser is still recommended. This tool is a complement to your existing adblocking arsenal. Download it.

The license is LGPLv3, as the original tool.


How to get good font rendering in Void Linux

This guide assumes you are using Void Linux (you can probably replicate it in other distributions; just check the paths), have Freetype installed and using some sort of Window Manager or Desktop Environment. If you don’t, sudo xi them. After that, fire up a terminal and create a symbolic link, from the following files in /usr/share/fontconfig/conf.avail/, to /etc/fonts/conf.d:

  • 10-hinting-slight.conf
  • 10-scale-bitmap-fonts.conf
  • 10-sub-pixel-rgb.conf
  • 11-lcdfilter-default.conf
  • 20-unhint-small-vera.conf
  • 21-cantarell-hinting.conf
  • 30-metric-aliases.conf
  • 30-urw-aliases.conf
  • 31-cantarell.conf
  • 40-nonlatin.conf
  • 42-luxi-mono.conf
  • 45-latin.conf
  • 49-sansserif.conf
  • 50-user.conf
  • 51-local.conf
  • 57-dejavu-sans-mono.conf
  • 57-dejavu-sans.conf
  • 57-dejavu-serif.conf
  • 60-latin.conf
  • 65-fonts-persian.conf
  • 65-nonlatin.conf
  • 69-unifont.conf
  • 70-no-bitmaps.conf
  • 80-delicious.conf
  • 90-synthetic.conf

In ~/.config/fontconfig/conf.d/, I’ve symlinked these files (again, from /usr/share/fontconfig/conf.avail/):

  • 10-hinting-slight.conf
  • 10-sub-pixel-rgb.conf
  • 50-user.conf (using it to default Helvetica, Arial and Verdana to Clear Sans)
  • 60-latin.conf
  • 70-no-bitmaps.conf

My .Xresources file:

Xft.autohint: 1
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.rgba: rgb
Xft.lcdfilter: lcddefault

Also, I’ve created the /etc/profile.d/ file with this content:

# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
# version. The available settings are:
# truetype:interpreter-version=35 # Classic mode (default in 2.6)
# truetype:interpreter-version=38 # Infinality mode
# truetype:interpreter-version=40 # Minimal mode (default in 2.7)
# There are more properties that can be set, separated by whitespace. Please
# refer to the FreeType documentation for details.

# Uncomment and configure below
export FREETYPE_PROPERTIES="truetype:interpreter-version=38"

Open the screenshot in fullscreen

Cheers! 🙂


A Stylish extension theme to “fix” the new round Twitter

Twitter introduced a new design to the web and mobile interfaces, making them more round. The changes were received with the expected polarization: some love it, some hate it. Just like sushi, it seems that there are few people in a middle ground stance.

I admit I like the new design, but not everything with it. For starters, I find that the typeface doesn’t fit well with the changes, as some other elements that kept the square look. So, to fix it and to decrease the roundness of some elements, I created a stylish theme for the social network.

Stylish is a browser extension for Firefox, Chrome and some other browsers (any browser based on the previous two will probably allow you to install it), that allows you to create and/or install themes to change some or all of the look of any website.

To install my theme, you just need to access it on website and click on the install button.


Moeditor, o melhor editor Markdown do mundo

Há pouco tempo, talvez 3 meses, achei que tinha de encontrar uma maneira de unificar a forma de escrita de notas rápidas, apontamentos e posts. Essa solução teria que me permitir definir algum tipo de estrutura, ser simples, portátil e, acima de tudo, future proof.

Não precisei de pesquisar muito para redescobrir Markdown.

Para quem não conhece, Markdown é uma linguagem markup criada por John Gruber e Aaron Swartz. O texto é escrito normalmente, como seria se estivessem a usar o bloco de notas ou um editor semelhante, e recorre a um sistema de caracteres super simples para a formatação, pensado na conversão para HTML.

Depois de optar por Markdown, faltava o editor. Mais uma vez teria que ser algo simples, porque a intenção é escrever e não fazer manutenção ou ter que usar o rato/trackpad. Foi assim que descobri o Moeditor, o melhor editor markdown do mundo! 🙂

O Moeditor está disponível para Linux, OS X e Windows. Mais, é software livre [ou opensource, se preferirem]; a licença é a GPLv3. Win Win (salvo seja!).

A aplicação tem as seguintes características:

  • utiliza a versão do GitHub para Markdown;
  • permite personalizar o tamanho e tipo de letra, e a altura da linha;
  • inclui pré-visualização em tempo real, simultânea e alternada;
  • disponível em vários idiomas;
  • vem com temas para destaque de código de algumas linguagens de programação;
  • e suporta expressões matemáticas para TeX.

O Moeditor está disponível no Github. Podem descarregar uma das várias versões disponíveis na página releases, ou clonar o repositório e ir acompanhando as alterações à medida que vão sendo feitas. Se optarem pela segunda, não se esqueçam de instalar as dependências.

dicas, geekices

Como ativar o multi-processamento de janelas no Firefox

Electrolysis é uma nova funcionalidade do Firefox que torna um separador num processo independente dos restantes separadores abertos no browser. Isto é semelhante ao que o Chrome faz.

Apesar de já existir suporte para ela desde a versão 48 do Firefox, não vem ativa por padrão na maioria das instalações. É possível, no entanto, fazer essa ativação manualmente.

Antes de passarem à fase da ativação, convém que confirmem se precisam realmente de o fazer. Para isso, basta abrir um separador, escrever about:support na barra de endereço e carregar na tecla Enter.

Nessa página, a antepenúltima linha da primeira tabela vai ter o seguinte conteúdo: Multi-processamento de janelas. Se o valor que estiver à frente for 1/1, então está ativa; se for diferente, podem seguir para o próximo passo.

Para ativar o multi-processamento de janelas, façam o seguinte:

  • abram um novo separador e, na barra, de endereço, escrevam about:config e primam a tecla Enter;
  • aceitem o aviso;
  • na caixa de pesquisa localizada no topo dessa página, escrevam browser.tabs.remote.autostart e alterem esse valor para true (basta um duplo clique em cima do valor para o alterar);
  • na mesma caixa de pesquisa, escrevam agora extensions.e10sBlockedByAddons e alterem o valor para false;
  • reiniciem o Firefox.

Com isto, o Firefox vai passar a ser mais rápido a abrir e a carregar os sites. Alerto para o facto de poder haver extensões que deixem de funcionar corretamente. Aconteceu-me isso com a extensão para o Hootsuite, mas foi a única; as outras têm funcionado como seria de esperar.


MintBox Mini ganha novo modelo, o dobro do armazenamento e da RAM

A CompuLab desenvolveu uma nova versão do MintBox Mini, o mini-computador que resulta da colaboração com o projeto Linux Mint e que vem com essa distribuição pré-instalada. O novo modelo tem o dobro da RAM e do armazenamento do anterior.

À venda por 395 dólares, este equipamento, com dimensões de 108mm x 83mm x 24mm, apresenta atributos mais que capazes para as tarefas computacionais do dia-a-dia do utilizador doméstico e até para um servidor caseiro.

As especificações são as seguintes:

  • Processador: AMD A10 Micro-6700T (4x quad-core com uma frequência até 1.2GHz – ou 2.2GHz em boost), que inclui a gráfica AMD Radeon HD 8210 graphics (Radeon R6)
  • 8GB RAM DDR3L a 1333MHz
  • mSATA 3.0 para o armazenamento
  • 2 portas HDMI com suporte para áudio
  • WiFi 802.11ac
  • 2 portas USB 3.0; 4 portas USB 2.0

Para além de suportar GNU/Linux, o MintBox Mini pode ainda correr Windows (o que não recomendo, uma vez que já vem com um sistema operativo decente pré-instalado e não vale a pena mudar de cavalo para burro).

Mais informações no site da CompuLab.