RubyFlow The Ruby and Rails community linklog

×

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

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

As you are not logged in, you will be
directed via GitHub to signup or sign in

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

DRY up your structured plain-text files with ERB

I had a huge Markdown file (used to generate a presentation) that had many repeated elements. It was getting hard to keep those repeated elements consistent. So I slapped a method to output the formatting I need in ERB tags directly within the file, threw an .erb extension on the file name, and used the “erb” command-line tool to render it. You can make managing your plain-text files easier, too, with the details in this blog post!

Ruby's Bitwise Toolbox: Operators, Applications and Magic Tricks

How often do you think about the bits – the ones and zeroes – that make up your app’s data? If you’re doing web development in Ruby there’s rarely any need to. But what if you want to interact with the operating system or a piece of hardware? What if you’d like to understand network protocols or databases? In that case, a solid understanding of bitwise operators is foundational. In this article José M. Gilgado will introduce you to bitwise operations in Ruby, give practical examples of how they can be useful, and finish big with with some fun math tricks. https://www.honeybadger.io/blog/ruby-bitwise-operators/

Loading older posts