This blog post is my latest attempt at putting together a JavaScript build pipeline to create an application using ES6 and a unit testing framework. The idea is to create a single page application which will then consume an API. So, I want the output from my build pipeline to be a single JS file, … Continue reading Building a Javascript project with Broccoli
Redux Demo. App. part 2
In part 1 we created a build system that lets us write an application using React.js components. Now let’s extend that. Add a test framework The first thing I want is to be able to write tests for the application, so I’m going to need a test library and a way of running the tests. I’m going … Continue reading Redux Demo. App. part 2
Redux Demo. App. – part 1
There is an excellent series of videos here which introduces React + Redux by building a basic Todo application. I enjoyed these, but I wanted a way to apply the concepts to something more like a real world application. In the videos, all the source code is written in a single jsbin, with the important libraries included from … Continue reading Redux Demo. App. – part 1
Vim: Insert debug statements according to filetype
I’ve got a little keybinding in my .vimrc file which inserts a debug statement into a file, and then saves it; map <Leader>db Odebugger; 1<CR><ESC>:w<CR> So, if I’m editing foo.rb with my cursor on line 2; 1 def hello 2 puts "Hello, world!" 3 end Then if I hit ,db the file will look like this; 1 def hello 2 debugger; … Continue reading Vim: Insert debug statements according to filetype
Logfile spelunking with vim, bash & sed
Today I got an alert from my monitoring system about a possible rootkit on one of my servers (false alarm, thanks for asking). The first thing to do was to look for more details in the rootkit checker logfile. Unfortunately, it’s not very informative; ... [06:55:03] Scanning for string /usr/src/.puta [ OK ] [06:55:03] Scanning … Continue reading Logfile spelunking with vim, bash & sed
Using native DB functions with Ecto
I’m rewriting an app. in Elixir which uses a pretty hairy bit of SQL at its core, to select data from a MySQL database. When I’ve had to write similar code in Rails, I’ve found the in-built query language to be quite frustrating, and I’ve usually dropped down to raw SQL to get the job done. But, this is my … Continue reading Using native DB functions with Ecto