Ruby + Rails : Archive

by @skillstopractice.com

Archival feed for Ruby + Rails : Distilled Had to split this out because Skyfeed is pretty glitchy about long term storage. May eventually no longer need this.

Pull to refresh
Jamie Schembri @jamie.schembri.me 路 May 12
0

Consider using pattern matching in Ruby. I wanted to update a user's location (RGeo Point) from an endpoint which receives a JSON object: { lat: ..., lng: ... }. Using pattern matching, we can detect such an object's shape, falling back to a catch-all (_) with an if statement for regular Points.

Mohamed Hassan @oldmoe.bsky.social 路 May 9
1

TinyBits is getting a new interesting feature, you can now (using the repo's head) supply the pack/unpack method with an external dictionary. For shorter messages with no duplicate strings this can lead to a dramatic size reduction, from 96 to 34 bytes in the example below

S Gregory Brown [MOVED, SEE BIO] @skillstopractice.com 路 Mar 12
3

Suppose you have a small script that grabs news headlines over RSS and convert them to a simple Markdown list of links. It's been working fine, then one day when you run it, you get a Socket::ResolutionError with the message "getaddrinfo(3): nodename nor servname provided, or not known" (1 of 2)