Posts
-
Remote controlled Home Automation using Sinatra, Ruby and the LightwaveRF Wifi box
Build a Sinatra web server to control LightwaveRF devices over HTTP. Deploy on a Raspberry Pi for always-on home automation control.
RaspberryPi ruby Sinatra -
Home automation with Ruby using the LightwaveRF Wifi Link box
Control LightwaveRF lights and devices using Ruby. A gem for communicating with the Wifi Link box via UDP to turn on, off, and dim devices.
RaspberryPi ruby -
Converting a github issue into a pull request
Use the GitHub API with curl to convert an existing issue into a pull request, preserving the discussion history.
Rails ruby Snippet Posts -
Installing Rails 3.2 on ArchLinux Raspberry Pi
Step-by-step guide to installing Ruby on Rails 3.2 on a Raspberry Pi running ArchLinux using pacman and Capistrano for deployment.
Rails RaspberryPi -
Logging into a Rasberry Pi using Public/Private Keys
Set up SSH key-based authentication on your Raspberry Pi for passwordless login and improved security.
RaspberryPi -
Enabling SSH on Debian Raspberry Pi
Enable SSH on Debian Raspberry Pi for remote management. Find the IP address and connect from another computer.
RaspberryPi -
Controlling access to Routes and Rack apps in Rails 3 with Devise and Warden
Protect mounted Rack apps like Split or Resque with Devise authentication using Warden constraints in Rails routes.
Rails Sinatra -
Display error_messages_for for a single flash error using a helper
A Rails helper to display flash error messages using the same styling as Active Model's error_messages_for.
Rails ruby Snippet Posts -
Language List Gem - a list of languages (ISO-639-1 or ISO-639-3) for Ruby
A Ruby gem providing a comprehensive list of languages with ISO-639-1 and ISO-639-3 codes for use in Rails apps.
Rails ruby -
Some really quick git helpers
Useful git commands for deleting remote branches and tags, finding commits, and cleaning up merged branches.
Snippet Posts -
Using factory girl in a Rake task - uninitialized class variable @@configuration in Rails
Fix the uninitialized class variable @@configuration error when using Factory Girl in a Rails rake task by requiring it inside the task block.
Rails Snippet Posts -
Receiving and Saving Incoming Email Images and Attachments with Paperclip and Rails 3
Extract email attachments and save them with Paperclip in Rails 3 using a Tempfile or StringIO approach.
Email Rails -
Receiving Test Driven Incoming Email for Rails 3
Develop and test incoming email handling in Rails 3 offline using TDD with controllers and ActionMailer receive methods.
Email Rails -
A Step by Step Guide to Receiving Email in your Web Application with CloudMailin
Configure CloudMailin to receive incoming emails via HTTP POST in any web application with custom domain support.
Email Rails Scalability -
Multipart Body - A gem for working with multipart data
A Ruby gem for creating multipart/form-data content for HTTP requests with file upload support.
Rails Sinatra Snippet Posts -
Receiving Incoming Email in Rails 3 - choosing the right approach
Compare approaches for receiving email in Rails 3: script/rails runner, cURL, IMAP polling, and service providers like CloudMailin.
Email Rails Scalability -
Thoughts on Google Priority Inbox, The How and the Why
How Google Priority Inbox uses Bayesian filtering to determine email importance, and alternatives like OtherInbox.
Email Research -
MySQL, Snow Leopard and Rails 2.2.x, where has my Gem gone?
Install the MySQL gem on Snow Leopard with the correct architecture flags to fix native extension build errors.
-
Automatically prepending url's with http://
A Ruby mixin to automatically prepend http:// to URLs stored in ActiveRecord models if the protocol is missing.
Rails Snippet Posts -
Rails 3, Rake and url_for
How to use url_for and named routes in Rails 3 rake tasks by including the correct ActionDispatch modules.
Rails -
Render 'Rails Style' Partials in Sinatra
A Sinatra helper to render partials using Rails-style syntax with render :partial for easier migration between frameworks.
Rails Sinatra -
Rounded Corners with an arrow on a UIView with the iPhone SDK 3.0
Draw a UIView with rounded corners and a speech bubble arrow using Core Graphics paths in iPhone SDK 3.0.
-
Rounded Corners on a UIView with the iPhone SDK 3.0
Add rounded corners to UIViews programmatically using CALayer's cornerRadius property in iPhone SDK 3.0.
-
Using Rack::Rewrite to remove the www
Use Rack::Rewrite middleware for server-agnostic 301 redirects to remove www from your Rails app URLs.
Rails -
ID free pretty permalink based URL's in Rails
Create SEO-friendly URLs in Rails without IDs using the slugs_are_bad plugin to override default finder methods.
Rails -
Using the new Rails 3.0 Gem bundler with Passenger, Mongrel and Heroku
Configure Bundler to work with both Passenger and Mongrel by splitting the setup between preinitializer.rb and boot.rb.
Rails -
Random, Previous and Next entries from Active Record models using offset
Efficient methods for getting random, previous, and next ActiveRecord entries using SQL offset instead of ORDER BY RAND().
Rails -
Ruby Gems and OSX 10.6 (Snow Leopard)
Fix native extension errors after upgrading to Snow Leopard by reinstalling gems like sys-uname that require rebuilding.
Rails -
Fragment Cache Expiration in Ruby on Rails
Use expires_in with fragment caching in Rails by specifying a custom cache key along with the options hash.
Rails Scalability