Monter un emplacement distant dans Gnome 3

Besoin de copier des fichiers vers un serveur distant? Pas envie de passer par Filezilla? Il existe un moyen de monter un emplacement distant pour y accéder directement dans l’interface graphique: sshfs.

Sans plus attendre, voilà la commande:

sshfs user@IPServeur:/Répertoire/Distant ~/Emplacement/Local

Cette commande a donc pour effet de rendre disponible le contenu du répertoire nommé ici Distant et situer à l’emplacement /Répertoire/Distant sur le serveur. Le contenu du répertoire sera donc accessible dans le répertoire local spécifié, ici ~/Emplacement/Local. Il me semble qu’il est bon de se connecter avec un utilisateur ayant un minimum de droit sur le dossier que l’on souhaite monter; à vérifier cependant.

Pour démonter le répertoire:

fusermount -u ~/Emplacement/Local

Cette solution fonctionne pour moi sous Arch Linux avec l’interface Gnome 3. Je pense que cela doit être tout aussi valable avec d’autres environnements de bureau.

12 lines proxy with Node.js and Request

Easy and simple http proxy using Node.js and request.

var request = require('request')
  , http = require('http')
  , port = 8888
  , host = 'localhost'
  , proxy = http.createServer(function (req, res) {
    var x = request(req.url)
    req.pipe(x)
    x.pipe(res)
  })
proxy.listen(port, host, function () {
  console.log('Proxy running on port ' + port);
})

Code available on Github: node-simple-proxy.

It would be great to support https. And of course, you can do it without request.

Introducing FrameRain

I have been working on different projects since the beginning of the year. Today, I want to introduce FrameRain: a way to manage favourite videos from Youtube. The idea came out, after thinking that it would be great to have a place to store videos you prefer without the need of an account. Today, I’m happy to « open source » this project, as decided at the beginning. It is licensed under MIT.

I’ve built FrameRain using Node.js and Express for the server. Data persistence uses MongoDB. These are the only requirements to run FrameRain. Configuration can be found in the file config.json, but there are only a few things in it for now. FrameRain stores the miniature of each video, so that it does not rely on Youtube to display it.

It is possible to add some video to a playlist to watch them one after another. FrameRain uses youtube embedded player to prevent the need to go on youtube.com. Unfortunately, it doesn’t prevent youtube from tracking you. Moreover, I’m not satisfied with the way I implemented the player. It is working, but it will be hard to add another platform like vimeo or dailymotion using this implementation.

I should also consider password encryption. Among other things, an initial idea was to be able to manage playlist of videos, like for example, a music playlist, trailer playlist, funny playlist, … I’m planning to add it later.

This was a really fun project. I learned a lot about how to use Mongo and Mongoose. I will now work back on my other project which aimed at playing flac files in the browser. So, if you have any comments about FrameRain, don’t hesitate to contact me.

Casper-Shadow-Front – A dark theme for Ghost

I was testing Ghost last week. I found it really interesting, but I’m not a big fan of white interfaces… too bright for me. That’s why I decided to fork the original theme named Casper to create a darker theme.

I’m happy to introduce Casper-Shadow-Front: a Dark Theme for Ghost Blogging Platform. You can find it on my Github account.

Ghost-Casper-Shadow-Front

I’m also considering extending this dark look to the control panel. Stay tuned!

Trying to install: Ghost

Ghost has been made public today in the afternoon. I was waiting for it so I tried to install it from the source code a few hours later. I followed the step listed in the file CONTRIBUTING.md. First, I had to install Ruby on my system, put it in the PATH and install two gems.

Installing Ruby:

PATH=$PATH:/home/user/.gem/ruby/2.0/bin
export PATH
source ~/.bash_profile

Installing the gems:

gem install sass
gem install bourbon

Then, I followed the instructions given by Ghost developers. I hadn’t any problems with the installation process, since it’s well documented.

Time for testing. I created a new user and a new article. I really like the markdown editor used to write posts. The interface looks great too. In my opinion, Ghost is very promising, many things are still missing, but everything should be there in version 1.0. So it’s highly possible that I will quit WordPress for Ghost.