#121 - may 31th 2015


Examples of UI/UX, graphic performance, web design and flashy things.
Your time 4 design
Neat and simple horizontal page scrolling, and cool design.


Web applications, resources and tools, available for making our life easier or funnier.
libgrader rb
Find quality gems for your next project.
Rails meets React rb
(book) still under progress, but already accessible.
PackageCloud ops
Public and private package repositories with powerful tooling, security and automation.
CloudSlang ops
Automate your DevOps use cases using ready-made workflows.
Linux performance ops
Very neat gathering of tools for deep Linux observability.
Devbattles web
IT community for professionals.


A selection of gems or applications updated during past week.
Spina rb
A CMS built upon the Rails framework.
Waterfall rb
A tool to chain ruby services and blocks.
acts_as_localized rb
Localization accessor mechanism for AR models.
Polymer 1.0 js
Announced at Google IO, here is the first major release of this web component framework.
Leasot js
Parse and output TODOs and FIXMEs from comments in your files.
Passenger 5.0.8 ops
New Debian packages, Red Hat packages, bug fixes.
Gitlab 7.11 ops
Two-factor Authentication, look and feel upgrade, and more.


From the blogosphere or news feeds ...
Remote Control Your Mac With Node.js and Arduino may 25 js
Not really remote, more like an external keypad.
Implementing 'the lovely' Singleton Pattern may 26 rb
The good part of singleton.
Boldly refactoring complex code may 26 rb
By using github's scientist gem.
Recursion in Ruby may 26 rb
Exemple of adding a head_tail method to array to ease up recursion.
Rails Quick Tips: Easy ActiveRecord Optimizations may 27 rb
Use select, any?, empty?, and pluck to boost the query performance.
How to delegate methods in Ruby may 27 rb
5 ways of forwarding your work to some other object in Ruby.
Orchestrate Containers for Development with Docker Compose may 27 tool
It was known as Fig, now it's docker-compose.
Build Custom User Analytics with Parse may 28 rb
Parse is an IaaS from Facebook with a large free tier.
Ruby’s Exception vs StandardError: What’s the difference? may 29 rb
Why you should never rescue Exception in ruby.
CoffeeScript classes with React - pros and cons may 31 js
You can use CoffeeScript classes to create React components (since 0.12).


Screencasts and conferences videos, or other video feeds ...
RubyTapas Freebie: Sequel (5m) may 26 rb
The good part of sequel gem.
Docker Swarm (23m) may 27 ops
11th of the Docket Tutorial collectiopn.
Links curated by mose (publisher), xenor, tysliu (editors) .


The random rant of the week by mose.

linux trick: too many logs

Recently I found my self again in that situation on a linux server. The partition where logs are stored went 100%. In such case, It's clever top purge old useless logfiles. Typical move for me would be to run logrotate manually with

 logrotate -f /etc/logrotate.conf 

But I had a case where that was not enough. A developer forgot to remove a debugging output and the logs were just gathering way too much information, more than what I could free with some janitoring.

To avoid losing logs, we can move the logfile where there is space and replace the file with a symbolic link. That's good enough for until the partition gets resized of the logs get cleaned. But when it's done on a live logfile, the running process that writes into it still has the same file descriptor. The process has to be relaunched so the new fd can be taken in account, on the new partition, as instructed by the symbolic link.

So a colleague pointed out that could be done without restart by using gdb. It's a pretty neat trick (if you have gdb installed on your production server, which may not always be the case, and for good reasons). Anyways I had it at hand, and here is the sequence:

 touch /path/to/new/logfile
          gdb -p pid
          (gdb) call dup(1)
          $1 = 3
          (gdb) call close(1)
          $2 = 0
          (gdb) call open("/path/to/new/logfile", 2)
          $3 = 1
          (gdb) call close($1)
          $4 = 0

This gave me the taste of digging up a little bit more on how gdb can interact with live processes.

Green Ruby News was a feed of fresh links of the week about ruby, javascript, webdev, devops, collected by mose, xenor and tysliu every sunday.