Getting started with Rails ActionCable (1/2)

As the lead developer at HeerlijkZoeken.nl I wanted to try the new Rails ActionCable technology for a new feature: shopping lists. The idea is that you can walk in a store or on a market, mark an ingredient as checked when you add it to your (physical) basket and continue shopping. ActionCable can make the experience nicer because it, based on WebSockets, allows for real time notifying other viewers and editors of the same shopping list. No more shouting around in the supermarket: I’ve got the milk! Sure, nothing essential, but I needed an excuse ;)

(Note that we recently migrated from Rails 4, so not everything was in place in our app, just ignore the bits Rails already made for you; everything has been tested with Rails 5.0.0.1)

Getting the basics right

To start: You need a web server that can open multiple threads, so if you’re still using Webrick in development (which can’t rece…

Continue reading...

How to do it: Using screen

An article, posted more than 10 years ago filed in tutorial, linux, server, introduction, ssh, unix, guide, debian, command line & how i do it.

A technical note to myself: One way of doing multiple things simultanenously on a server can be by setting up multiple connections via SSH, that's how I used to do things before. An alternative is to use a single connection and use the command screen on the remote server. Another good reason to use screen is if you have a long running process that you don't want to break just because your SSH connection flips on and off with your computer going in and out of stand-by.

This is for absolute beginners. If you don't know about screen, this is for you. If you are already familiar with screen, I probably won't be able to educate you :o

So what is Screen?

GNU Screen is a kind of window managment system for the terminal (you're ought to say terminal multiplexer) and has several advantages over using multiple SSH connections. Most importantly: the processes keep running when SSH d…

Continue reading...

Label printing using OpenOffice.org

An article, posted more than 14 years ago filed in openoffice.org, labels, printing, problem & tutorial.

OpenOffice.org pretty much offers you everything you need in an office suite. And much more. Recently I needed to print many addresses. Not personal addresses, but a database of addresses. It was my first time using the database application Base (offered as an alternative to Access), and a first time printing labels. It was not easy, but these steps should help at least me (if there will be a next time) to get me started immediately, instead of spending hours frustrating myself with some of the awkward design decisions made by the OpenOffice.org folks.Prerequisites:a filled OpenOffice.org database (.odb) of data you want to be printed on the labels.sheets with labels (i used no name labels, its doable to adjust the label configuration for any specific type of label)OpenOffice.org 3.1 (3.1 may not be neccessary, but that's the one I used)So what are the required steps?Launch OpenOffice.org WriterMake sure OpenOffice.org Writer knows about this database, by reg…

Continue reading...

WTP tutorial: Tomcat en eclipse i.s.m. Maven

An article, posted more than 15 years ago filed in tutorial, java, jsf, development, software, eclipse, tomcat, notforhomepage, maven & wtp.

 Tijd voor eens een ander artikel dan de eerdere veelal conceptuele artikelen. Dit keer een meer technische tutorial met betrekking tot het inrichten van de werkomgeving. Bij The Bean Machine wordt primair ontwikkeld in Java (en 'dus' de websites geserveerd op een Tomcat server). Verder we werken hier allen met Eclipse en gebruiken we voor het samenrapen van de afhankelijkheden, het uitvoeren van automatische testen, e.d., Maven. Als je deze tools kent, ben je misschien gewend geraakt aan de hoeveelheid command line operaties vereist om dit goed te laten werken. Mocht je daar dan nog niet verknocht aan zijn dan is deze tutorial mogelijk wat voor jou.

Eerst het nut van wat van de zaken die wij in onze werkomgeving gebruiken:

Maven neemt veel werk uit handen bij het maken van iets deploybaars. Tomcat is gewoon dé webserver voor Java gebasseerde webapplicaties Eclipse is de editor of choice van onze überbean, en zwijgzaam volgen wij hem hier in ;)

Dus wat kan WTP (Web Too…

Continue reading...

Introductie tot Cascading Stylesheets

An article, posted more than 22 years ago filed in web, design, html, css, px, lettertypes, basis, cursus, introductie & tutorial.

Inleiding

Een stylesheet is eigenlijk een filter die over een pagina gelegd wordt die de pagina opmaakt. Stylesheets zijn in grote mate te vergelijken met Stijlen uit WordPerfect en Opmaakprofielen uit Word. Het mooie aan stylesheets is dat ze, met uitzondering van de zogenaamde inline stylesheets, de opmaak en inhoud van elkaar scheiden. Een stylesheet verteld hoe de inhoud gepresenteerd moet worden en kan in deze presentatie een perfecte continuiteit bieden. Een ander voordeel is dat stylesheets nog het meest crossbrowser compatible zijn. Ten slotte is het met stylesheets mogelijk om verschillende blokken op elkaar te stapelen en te positioneren.

Soorten stylesheets

Er zijn drie verschillende soorten stylesheets te onderscheiden, nl.:

external stylesheets internal stylesheets inline stylesheets

External stylesheets

External stylesheets zijn stylesheets die niet in het document zelf zijn verwerkt, in een apart text bestand, meest…

Continue reading...

murb blog