Articles 21 to 30

Managing GitHub Gist with GistBox

By Jimmy Bonney | June 8, 2013

I’ve started to use GitHub Gist to store some of the code snippets that I share on this blog. The application website works well and does its job but it is quite minimalist and does not provide any advanced functions. It is not possible for instance to organize the snippets, nor search them.

Fortunately, a web application (and a Google Chrome application) have been developed to do just that. The service is called GistBox and the web application is available at www.gistboxapp.com while the chrome application can be installed from the webstore. It connects to GitHub to store all the gists and provide a nice interface allowing to:

  • search among existing gists,
  • provide labels to organize gists based on language or application they are related to for instance
  • copy function to copy the content of a gist to the clipboard

Read more...


Export Tumblr Posts to nanoc

By Jimmy Bonney | June 8, 2013

I used to have a blog on Tumblr. I migrated there the content of an old web site back in 2009. It allowed me to keep the content available without having to maintain a server. But time has passed, visits on the Tumblr blog have been almost inexistent, and as I built this new personal site, I decided that it was time to perform some clean up and consolidation. I therefore spent a couple of hours to migrate the posts that were just lying down on Tumblr to this web site. And well, since Yahoo bought Tumblr not long ago, it will also allow me to ensure that I keep ownership on the content I wrote.

This blog is built with nanoc and all posts are written in markdown. Fortunately, some tools already exist to export Tumblr posts to markdown articles. First thing to do is install npm and pandoc:

sudo apt-get install npm
sudo apt-get install pandoc

Read more...


Replacing Google Reader - 4 Alternatives

By Jimmy Bonney | May 31, 2013

Google announced earlier this year that they would shut down Google Reader as part of their spring cleanup on July 1st, 2013. Google Reader is a feed reader that had been adopted by a few millions users but the usage of the application has been declining for a while and instead of maintaining a costly application, they preferred to retire it. This came as a shock to many people but based on what I’ve been reading so far, a few applications raised to the challenge and users seems to have found their way around it… often for the best.

So, with one month left to migrate your data from Google, it is time to find out a viable alternative to Google Reader. In this article, I’ll present 4 alternative feed readers.

Read more...


New Design

By Jimmy Bonney | May 26, 2013

I have just deployed a new version of the website. Gumby framework has been replaced by InK and the overall design has been somewhat simplified – less boxes, less borders, less colors… Design is responsive making it more accessible from mobile devices.

A few other things have been updated at the same time:

  • The front page provides only a summary of the latest article
  • Links to LinkedIn, G+, … have been moved to the footer
  • About page has been reviewed
  • Article layout

Read more...


Parsley.js and Twitter Bootstrap

By Jimmy Bonney | May 9, 2013

Parsley.js is a (quite) new library allowing to perform Javascript form validation – but without writing any Javascript. Validation is performed through instructions embedded in the DOM, in some data attributes to be more precise.

It comes up with a pretty extensive documentation and allows for easy customization. In this article, we’ll highlight how to use it in combination with Twitter Bootstrap - so that we do not need to write any custom CSS (or let’s say a limited amount depending on what you want to achieve).

Read more...


Link Object and Subject with ACL9 without Database View

By Jimmy Bonney | May 5, 2013

Authentication and authorization are two important aspects of any web application. Users should be able to log into the application (this is where the authentication part kicks in) and then view / update / create resources based on their access rights (this is for the authorization).

There are plenty of gems allowing to implement (more or less) quickly those two concepts in a Rails application. A lot of developments have happened in this field in the last few years and to get an overview of the different tools available, the easiest is probably to look at The Ruby Toolbox in the authentication and authorization sections.

Some time ago, most of the authorization gems allowed to define global roles in an application. This means that a user could be assigned an admin role (for instance) that was valid on all components of the application. This type of behavior works well for a forum for instance – where users either have a role to manage the different posts or not – but this isn’t so convenient in an application where more granularity is needed. In a project base application, users could be assigned a manager role on some projects but a viewer role on others and therefore have local roles (or scoped roles). ACL9 was one of the first gem (as far as I know) to offer such behavior and allow to define granular roles on some resources. The remaining of this post focuses on ACL9 and more precisely on how to link / access resources based on the user role.

Read more...


Launch HTTrack manually in Ubuntu 12.04

By Jimmy Bonney | April 6, 2013

I am using HTTrack from time to time in order to fetch some website that I want to be able to browse while being offline. While it was working properly at the beginning, I got some issues recently. Whether I launch the application from the WebHTTrack Website Copier shortcut in the application menu or from the command line with webhttrack, it seems that the server starts but exits right away. Based on a few readings here and there, it seems that I was not alone having this issue. So if launching webhttrack from the command line only gives you the following answer:

/usr/bin/webhttrack(21010): launching /usr/bin/x-www-browser
/usr/bin/webhttrack(21010): spawning regular browser..
Created new window in existing browser session.
/usr/bin/webhttrack(21010): browser exited
/usr/bin/webhttrack: line 167: 21029 Killed                  ${BINPATH}/htsserver "${DISTPATH}/" path "${HOME}/websites" lang "${LANGN}" $@

keep reading.

Read more...


Configure VirtualBox Shared Folder as Apache Virtual Host

By Jimmy Bonney | February 27, 2013

As mentioned in the previous article, I am using a virtual machine in order to test locally a small website built with nanoc containing a couple of dynamic PHP pages. We left out with a functional VM running a LAMP stack that was setup with a shared folder between the host and the guest containing the website to test.

In this article, we’ll configure Apache on the VM in order to use this shared folder as the source for a website that can be accessed directly from the host.

Read more...


Minimal LAMP Stack for Website Development

By Jimmy Bonney | February 17, 2013

Recently, I needed to have a LAMP (Linux, Apache, MySQL, PHP) environment in order to test out a few things for a website that was developed using nanoc but included a few dynamic PHP pages. While nanoc is mainly for static website, it is however flexible enough to include dynamic pages if one feels like it. The problem in this case relies in testing those dynamic components.

Even though I am using Linux on a daily basis, I didn’t deem appropriate to install a full LAMP stack just for the purpose of testing out a couple of pages. I therefore looked into some solutions providing a virtual LAMP stack that could then run inside a virtual machine - allowing me to do the development on the host system and test it on the guest one.

Read more...


Install SCP on a Synology NAS (DSM 4.1)

By Jimmy Bonney | January 20, 2013

If you tried to copy file securely (i.e. through the scp command) from or to a Synology NAS drive, you might have been welcomed by the following error message:

sh: scp: not found

Well, at least, I did. The message didn’t provide me with much indication about where the issue was coming from, but since scp was installed locally on my computer, this meant that it probably came from the remote host, the Synology drive.

By default, SCP is indeed not installed on Synology NAS drives. Fortunately, we can solve this quite rapidly but since there are a few manipulations to do, I’ll sum them up below.

First off, I assume that ipkg is installed (this is the case if you followed the article Install GMVault on a Synology Nas). If this is not the case, you can quickly do it by following the instructions on the Synology forum.

Read more...