Folding lines in Sublime

In one of my projects I am adding a good amount of logging to my code, with the result of getting a lot of distracting lines that end up hiding what is really going on.

I was searching for a plugin that can fold lines containing a text fragment in my editors, and found Filter Lines for Sublime.

After installing the plugin, I went to Edit | Code Folding | Fold with Regex  and entered ^((?!logger.).)*$  as my expression.

As a result, I went from

Sublime not folded

to

Sublime logger filtered

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Time tracking with Toggl

My friend Magoo is using toggl for time tracking and decided to give it a go. I usually apply pomodoros when I am programming, but although they are ok to keep me focused in the task at hand, I don’t like the fact that after they are gone I don’t have any way to keep track of what I was doing (because the reality is that I usually get interrupted and have to jump to some other project at least for some minutes)

My first impression wasn’t the best, it looked like an early version of a promising tool but still rough in every sense, but after adding some workspaces, clients and projects it started to look more usable.

When I realised that they have an Android client, a desktop version, and a Chrome integration that can be used inside Trello my respect grew a lot more.

I don’t think it will be the last tool I try for the task (there are things that I am still missing), but it is a lot better than any other option I have tried.

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

A tool to generate .gitignore files

For some time I have been using gitignore.io to create the .gitignore file used in my projects.

The content in many cases seems to be overkill (because it includes common libraries used by the language or tools selected), but it is better than the option of accidentally adding files to git that later need to be removed.

 

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Performance problems in Vagrant when using host files into guest

I am working in an application that has to access a good number of resource files (good both in numbers and file sizes). As usual I am working in a Vagrant instance, and everything was going fine for the initial work.

But eventually the number of files passed from just testing to production, and while developing in my host the file access operation was ok (in the order of seconds to load everything), when the same code was running in Vagrant it took more than ten minutes to be ready.

At first I thought it was a memory problem, and increasing it to 6GB helped a bit (nine minutes instead of ten), it still didn’t cut.

I tried creating an instance in AWS, and surprising enough the performance was similar to running in my Mac.

I decided to copy all the files to the Vagrant instance, and then the problem was sorted, performance is on par with the host and AWS. That was it. Looking at the documentation, I noticed a shared directory option that is rsync, but I haven’t tried it, because I wrote a set of scripts that take care of preparing those resources to be deployed (both in Amazon and Vagrant) and dropping them on destination (which is a nice addition to my attempts to automate as much as I can both in development and deployment).

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Changing the remote repository in git

I needed to move a project from Bitbucket to Github.

I was expecting a little dance to be made there, but it was pretty straightforward:

In a terminal, at the directory where I have my project, just did a

 

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

USB tethering with the Mac

I am in the train to Cork today, and being two and a half hours trip I am using the time to work a bit in my Fabric scripts.

Something I usually do is to get updates and packages form the Internet, and while the wifi connection in the train is good for browsing, getting updates is slowing it to a crawl.

I realised that the USB tethering connection with my phone was not recognised by the Mac, and have to download a driver for it, which worked very well after a reset.

The code is in github, together with a compiled package too.

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Ubuntu version

As a reminder to myself, to check the version of Ubuntu in the terminal the command is

and you get something like

 

 

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather