The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Jekyll Quick Reference (Cheat Sheet) for Static Site Generator
I’ve started with a Jekyll Quick Reference (Cheat Sheet) for the static site generator - sections so far include: folder structure (_posts folder, _drafts folder, etc.), global variables, site variables, page variables, Liquid template filters n tags (standard and Jekyll extras), and more. It’s a single-page (8 pages printed) hosted at the Planet Jekyll GitHub repo. Cheers. Update (Jul/15): Link updated/fixed.
Video encoding processor for CarrierWave
As previously promised, here are some more tips how to tackle with video processing. Streamio FFMPEG has a bunch of useful options. You can specify for example frame rate, resolution, bitrate, codecs and many other by simply passing an options hash to transcoding. This time I wanted to change the previous code a little bit, add some options and include latest rails goodies as ActiveJob and Enumerable. Let’s get started!
Preview: Simple CLI for managing your Rails VPS or cloud server
Intercity CLI will help you set up hosting for your Rails apps on a VPS. This article shows a preview of how you can set up your Rails VPS in four commands.
Security for Lotus v0.3.0
Markup auto-escape, Content-Security-Policy, X-Frame-Options, HttpOnly cookies by default: read the proposals.
Implementing Ruby's Collect Method
Ruby’s collect method is one that I use all the time. In fact, mastering the Enumerable module will help out your Ruby code like no other. I wanted to see what it would be like to implement Ruby’s collect method.
Incisive Ruby Substitutions - The gsub Hash Syntax
How do you perform multiple Ruby substitutions simultaneously? Read more
Command Line Reporter 3.3.5 Released
Bug fix release regarding border colors and vertical spacing. Check out the wiki to see examples of nicely formatted tables. As always the gem is available on rubygems.org with source on github. For those not familiar with “the reporter”, it provides a ruby DSL for writing reports with built in features for progress reporting and table formatting. It is very handy for system level and data reporting scripts.
Resilient Networking: Planning for Failure
A successful application is one that is resilient to fluctuations in network availability and performance: it can take advantage of the peak performance, but it plans for and continues to work when conditions degrade. Thoughts and tips on how to build such a thing.
Rapp - A Ruby Gem for scaffolding CLI or Daemonizable Ruby apps
I went looking a little while back for something fitting this description, and didn’t find anything that really worked for me. So, I wrote my own: Rapp Read more
Timeago date filter for Liquid templates!
Jekyll-timeago is a Liquid extension to compute and display distance of dates in words. It allows localization and integrates easily with Jekyll. You can use it via a filter or via tag:
Upload base64 encoded data to carrierwave uploaders.
If you develop some API, that interact with mobile devises, then this small gem might be handy: Read more
Panthro: The RubyGems Proxy Cache
Hi, I’ve developed Panthro, a POC of a rubygems proxy cache - it’s a very simple rack app that caches gem files in your local filsystem. Read more
Alternative to CanCan: ActionAccess
Action Access is a very lightweight and straightforward access control system for Rails. It boils down to this: Read more
Rails Fundamentals: Introducing the belongs_to Assocation (14+ minute video)
Active Record associations are an incredibly powerful feature yet configuring them can be confusing to Rails newcomers. In this free 14+ minute excerpt of the Easy Rails Active Record Video Associations series I’ll introduce the belongs_to association, complete with a detailed code example. Watch the video.
Test Driven Rails 4 Contact Form
I just posted How to build a Contact Form with Rails 4.2 on my site.
Stop Writing Rails Controllers
Stop writing controller code in Rails. Declare them in data.
How to write a clean code in Ruby on Rails?
I just launched How to write a clean code in Ruby on Rails?
Build a Pocket Clone: Part 3
My latest post in building a pocket clone from scratch
ActiveRecord SQLServer v4.2.0 Prerelease
Code named Kantishna for the Denali area of Alaska, the ActiveRecord SQLServer v4.2.0.pre is ready for testing. As the name suggests, this is for SQL Server 2012 and higher.
Today I Learned
thoughtbot created an open source GitHub repo this week called Today I Learned. It’s receiving lots of community submissions for tips in all programming languages, including lots of Ruby.
How to detect and block bots with NGINX
Reverb.com infrastructure engineer Adam Enger explains How to block bots with NGINX rate limiting
How to tackle with video processing with CarrierWave and streamio-FFMPEG gems.
Video encoding processor for CarrierWave, more options and background processing here.
Cleaner, safer Ruby API clients with Kleisli
I just blogged about how to build better APIs using general, simple but powerful ideas from the world of monads.
New Rails feature - ActiveModel errors details
Read about a new Rails feature ActiveModel::Errors#details
[Gem] I made a gem to build an interactive graph based on gem dependencies from your Gemfile
Please visit here . Constructive criticisms and suggestions welcome. Output is something like this