Don't miss a post! Subscribe to my mailing list.
ClojureScript with Middleman via Shadow-CLJS
Ruby's Middleman is my preferred tool when I need to generate a static website. In this post I'm going to show you how to set up a Middleman project that uses ClojureScript instead of the default JavaScript or CoffeeScript that ships with Middleman...
boot-selmer
Introduction
I’ve been playing around with Clojure and ClojureScript for awhile. So far I’ve always used Leiningen for managing dependencies and build tasks. I recently decided to give Boot a try. I needed to create a Boot task for compiling Selmer
xclip for Ubuntu
Awhile back I wrote about pbcopy
for OS X. These days I find myself using Ubuntu quite often and missed having pbcopy
. Turns out there is a package called xclip that does the same thing on Ubuntu! Give it a try!
Rails Data Migration Results
When writing data migrations, it can be useful to know the number of records that were updated / created. If you run your migration in a Rails console, ActiveRecord will print out the database response object like this for PostgreSQL:
2.1.5 :008 >
OS X pbcopy
OS X has a nifty utility program named pbcopy
that I just learned about which can be used to copy things to the system clipboard.
For example:
cat foo.txt | pbcopy
or pbcopy < foo.txt
will copy the contents of foo.txt
onto the system clipboard.
Iceberg Classes and Inheritance
Better developers than I have written about iceberg classes and why they are a code smell. I’d like to talk about a specific kind of iceberg class I’ve recently come across. This type involves inheritance. Here’s an example of what I mean.
class Job
Database Tests with Rollbacks in Clojure
I recently purchased a beta version of Eric Normand’s Intro to clojure.test screencast. In it, he demonstrates how to use the use-fixtures
function to set up and tear down state for tests. The function can be used for :each
test run, or :once
. For...
Hoboken: A Sinatra Project Generator
I'm a huge fan of the Ruby web library, Sinatra. I think its biggest strength is that it allows me to structure my applications to fit the problem at hand, instead of trying to shoehorn my problem to fit a pre-determined structure.
A couple of years...
Setting Up Middleman with Jasmine
Currently, my favorite tool for generating static websites is Middleman. I recently wrote my version of the TodoMVC app using Middleman and KnockoutJS. I wanted to use Jasmine for my unit tests and had a little trouble setting it up. Here are the steps...
GitScore Parts 2 & 3
Here are parts 2 & 3 to the GitScore project. They are a follow-up to an earlier post. I originally intended the screencast to be two parts, but I had to split up part two so that I would be under the allowed YouTube length. I've also put the example...