Dart programming is a language optimized for building user interfaces used in the Flutter mobile framework. It combines the world of OOP and functional. I am a big fan of functional programming, One of the problems in Dart I found boring and inconvenient is to write the built-in List#map API…

class ShipmentItem < ApplicationRecord  has_one_attached :image  validates :width, presence: true, if: ->(item) { !item.image.attached?}end
it 'is valid if image is attached' do file = Rails.root.join('spec', 'support', 'assets', 'shipment_item', 'wine-box.jpeg')image = ActiveStorage::Blob.create_after_upload!( io: File.open(file, 'rb'), filename: 'wine-box.jpeg', content_type: 'image/jpeg' # Or figure it out from `name` if you have non-JPEGs).signed_id shipment_item = ShipmentItem.new(image: image) expect(shipment_item.valid?).to eq trueend

From time to time I have this warning

Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4

Now I can inspect

gem list bundler

The…

The new macOS Catalina 10.15 with default openssl@1.1 build failed.

use the following to install it.

RUBY_CONFIGURE_OPTS=”-with-openssl-dir=/usr/local/opt/openssl” rbenv install 2.3.1

gem libv8 issue in macOS 10.15 Catalina

Install libv8 v=6.7.288.46.1 get stuck with macOS Catalina. Update mini_racer to depend on the libv8 version greater than 7.x.x.

I had gem ‘mini_racer’, ‘~> 0.2.4’ which depends on libv8(6.7.288.46.1).

#…

I’ve been through some of the problems that were hard enough for me that I was not even sure if an optimal solution existed.

After having solved those problems, I have seen a pattern that is useful for solving general problem especially when the problem is abstract or you are…

ObEE is an open source, next generation Media Streaming end to end solution that supports modern streaming protocol HLS, Dash, WebRTC running on Linux, Nginx, FFMpeg and Janus.

The application runs on Erlang VM that support on demand video streaming, video broadcasting, live streaming, video and audio call, media annotation…

Ly Channa

Rails, REST API, Postgresql, Elasticsearch, Firebase, Redis, Spree, Shopify, Analytics, ML, Docker, Terraform, AWS ECS, Lambda, Personalize, Cloudfront and apps

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store