Articles on this Page
- 12/30/09--00:36: _markdown to textile...
- 01/27/10--00:00: _rails security revi...
- 09/07/10--03:14: _rails 3 vs. rails 2...
- 04/04/11--18:59: _repl rspec mocks
- 05/08/11--14:41: _what exactly does r...
- 09/11/11--09:37: _rails 3.0 and rake ...
- 01/07/12--21:40: _ffmpeg on osx lion
- 01/22/12--08:40: _cucumber and custom...
- 03/30/12--04:46: _fixing brew install...
- 03/30/12--13:39: _d3.js experiments i...
- 03/31/13--18:41: _getting started wit...
- 06/07/13--00:05: _ffmpeg for ogg and ...
- 07/04/13--11:07: _getting started wit...
- 07/08/13--14:18: _easy drupal install...
- 07/13/13--17:52: _tesseract html page...
- 07/14/13--13:41: _building unix packa...
- 07/15/13--03:39: _building tesseract ...
- 07/27/13--03:38: _getting started wit...
- 07/27/13--06:59: _empowering content ...
- 10/13/13--12:25: _rails 4 with mongod...
- 12/30/09--00:36: markdown to textile with vim regex
- 01/27/10--00:00: rails security review checklist
- 09/07/10--03:14: rails 3 vs. rails 2 validation errors
- 04/04/11--18:59: repl rspec mocks
- 05/08/11--14:41: what exactly does rake spec do?
- 09/11/11--09:37: rails 3.0 and rake 0.9.2
- 01/07/12--21:40: ffmpeg on osx lion
- 01/22/12--08:40: cucumber and custom rspec matchers with rails 3.1
- 03/30/12--04:46: fixing brew install opencv on osx
- 03/30/12--13:39: d3.js experiments in the console
- 03/31/13--18:41: getting started with minecraft modding
- 06/07/13--00:05: ffmpeg for ogg and webm
- 07/04/13--11:07: getting started with drupal 7 and openshift
- 07/08/13--14:18: easy drupal install on mac osx lion
- 07/13/13--17:52: tesseract html page with text overlay
- 07/14/13--13:41: building unix package with autotools
- 07/15/13--03:39: building tesseract from source
- 07/27/13--03:38: getting started with drupal
- 07/27/13--06:59: empowering content creators with drupal
- 10/13/13--12:25: rails 4 with mongodb on osx
So, I needed to change markdown to textile and google didn’t yield any handy scripts, so I sharpened my vim fu with Rubular, my favorite regular expression tester and came up with a few substitutions that took care of everything but lists and code blocks.
In vi, type ESC to go into command mode, then :%s/one/two/g [...]
I’m reviewing the security of a web app built with Ruby on Rails, so I put together a checklist for a security audit. This isn’t a bank or high security situation, but there were a number of engineers and quite a bit of open source code, so I thought a few checks were in [...]
Not sure if this is a bug or a feature. I’d guess it is here for a reason, and maybe I’m late for noticing, but Rails 3 errors now provides an array for each attribute, whereas in Rails 2.3 it was just a string. Here’s the output from two almost identical applications…
Loading development environment [...]
REPL (Read-Eval-Print-Loop) is a great way to learn. With Ruby, the experience is enabled with irb. Sometimes, to do this we need to peek into the innards of things, which I find to be an extremely effective way to explain mocks and stubs. It’s a regular part of my Ruby curriculum, even [...]
$ rake spec
You have 1 pending migrations:
The rake spec command reminds us that we need to run our migration before running
our tests. In fact, it does a whole lot more than that. There are a whole bunch of best practices rolled in that one
command. To see exactly what is going on, [...]
I really want to upgrade a Rails 3.0 project to Rails 3.1, but I’ve done a few spikes and it lacks test coverage, so I decided to pull in cucumber and write some features before moving forward.
I added cucumber-rails to my gemfile, and ran “bundle” and got this error:
/Users/sarah/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:289:in `load': uninitialized constant Psych::Syck (NameError)
What I [...]
I found that I needed to convert an m4a audio file (which is what QuickTime saves when I record audio) to a wav file, so I decided to use my favorite “can opener.” The versatile open source ffmpeg tool has always seemed to be able to convert anything to anything in audio-video formats.
I decided to [...]
I’m working my way through an epic Rails 3.1 upgrade and some of my cucumber features were failing because I was using a custom RSpec matcher and the method wasn’t found.
My custom matcher looks something like this:
This is more about fixing my brew install, than about opencv. As with many install issues the root cause was actually pretty simple, but finding it was challenging. Along the way, I fixed a number of issues which took a bit of digging to find, so I’m leaving a little trail on the [...]
UPDATE: Dashing D3.js is an amazing series of tutorials with great conceptual grounding
d3 tutorials provide a great [...]
I started learning about creating a Minecraft mod today, using this excellent tutorial (thanks @0×17h and @adudney).
Background: Minecraft is a very popular world-building game. They announced last November that they will release an API, but they have a friendly attitude toward users who have reverse-engineered how to create “mods” (extensions to the game and [...]
I wanted to experiment with Ogg and WebM and the <video> tag, and I thought the easiest way would be with my favorite command-line transcoder, ffmpeg. It’s fabulous support for just about every audio and video file format makes it fabulous for hacking.
Sadly “brew install ffmpeg” doesn’t support the new file formats and codecs, [...]
When learning a new web technology, I believe it is important to have hands-on experience from development to deployment. I chose Open Shift, one of the recommended cloud deployment options for Drupal 7. It’s free for 3 small instances, which seems perfect for experimentation.
I used the very simple web UI to create a [...]
Lion comes with Apache and PHP installed. We just need to enable PHP, install MySql and create a database, then download drupal.
My new laptop which came with Lion has PHP 5.3.15, using the test page we’ll build below you can verify you’ve got a good version of PHP to go with the Drupal [...]
I’m learning a bit about OCR, and wanted to get some hands on experience using the open source Tesseract to get a feel for how it works. I’m a long way from any reasonable visual or interaction design, but the result of today’s exploration is an html page where the original image is overlaid with [...]
ever wonder what all those random files are at the root of some package source that you are playing with? and how exactly does the mystical configure command actually do?
Alexandre Duret-Lutz has created a fabulous Autotools Overview & Tutorial — well worth flipping through the first 19 slides (38 pages of the PDF since [...]
Thanks to the prior work of Matt Christy at eMOP, I got started building Tesseract from source (on Mac OSX 10.8.4).
Here’s my slightly modified workflow:
svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr
recently a makefile changed, and I need to regenerate them, starting at the source code root:
autoreconf --force --install
Making a “build” directory, makes [...]
Emeline Glynn and Anthony Glynn gave a helpful talk called “How to teach anyone Drupal in 7 months.” The timeline was based on their experience where Anthony, an experience Drupal developer, taught Emeline remotely over a period of 7 months, to the point that she is now working professionally as a Drupal developer. Slides [...]
Bryan Braun (@bryanebraun) gave a refreshingly opinionated talk Empowering Content Creators with Drupal. Coming directly from the Ruby and Rails communities where a core value is to articulate best practices, it is great to see this kind of guidance from a member of the Drupal community. (slides here)
Bryan referred to a blog post by Dilbert [...]
This post covers getting started with Rails 4 and Mongodb, using the Mongoid gem. As part of getting up to speed, I enjoyed reading Rails + Mongo take on the object-relational mismatch by Emily Stolfo from MongoDB.
For starters, here’s a how to create a super simple toy app. I assume Ruby [...]