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.

A Deep Dive into CSRF Protection in Rails

Recently I did a deep-dive into the Rails codebase to understand how the CSRF protection feature has been implemented. I look at how the CSRF tokens are initially generated for each response, and how they’re used on an incoming request to validate the authenticity of the request. [more inside]

Elixir Envy ᐅ Ruby

There has been much envy in the Ruby community over Elixir having the pipe operator as can be witnessed by the many gems, code snippets, and blogs arising from it. This blog post lists and describes various implementations which have been made or written about it.

Nice!

Unsupervised learning using k-means clustering in Ruby

The k-means clustering algorithm is a powerful unsupervised learning algorithm for clustering data. In this blog post I will show how to use the k-means algorithm in Ruby. I will walk through an example where I use the k-mean algorithm to divide California into a number of distribution territories, for my fictitious beer distribution business. You can read more here: http://www.practicalai.io/unsupervised-learning-using-k-means-clustering-in-ruby/

football.json - New 2017/18 Season - Free open public domain football data in JSON

Hello, I’ve updated the /football.json repo /service that offers (auto-)generated match schedules (fixtures and results) and club listings for the major football leagues e.g. English Premier League, Deutsche Bundesliga, Primera División, Italian Seria A, etc. See the 2017-18 season folder for (static) JSON examples. No API key required ;-) All data public domain. Enjoy the beautiful game. Cheers. PS: Ruby works great for generating JSON; see the json.rb script for the code.

Tips to improve speed of your test suite

At Appaloosa, most of our tests are written with Rspec, but we still have a certain amount of legacy Test Unit tests. Our Rspec and Test-Unit suites take up to 10 minutes each, so a full test suite runs in around 20 minutes. That’s a lot. We recently decided to invest time on improving our tests to gain time when developing. https://medium.com/appaloosa-store-engineering/tips-to-improve-speed-of-your-test-suite-8418b485205c

The link is dead. The correct one: https://medium.com/appaloosa-store-engineeri…
Thanks. I’ve updated the link
Loading older posts