Binary to Octal Evaluation
binary to octal evaluation

This is another thing I learned while watching ruby-tapas video on binary literals. Length of the video was 1m:47s only and I am already writing second blog about the learnings from there!
In this post, we will see binary to octal conversion as shown in the video.
# U G O
# rwxrwxrwx
0b111101101
perms = 0b111101101
perms.to_s(8) # => "755"I will surely add other ways of achieving the same as I find in future. I know you are another wise rubyist there, feel free to share your knowledge in the comments below.
Happy Learning! :)
Keep reading

Fix mise GitHub Rate Limit with a Token
mise makes unauthenticated GitHub API calls by default. When you hit the rate limit installing tools, a personal access token (no scopes required) fixes it permanently.

How to solve Deployment Failure-`assets:precompile`
I was trying to deploy rails 6 app on ec2 server using capistrano when precompile failure lead to whole deploymentt failure. I had to uninstall cmdtest and install yarn

How to Sort an Array of Objects in JavaScript
How to Sort an Array of Objects in JavaScript

What did you take away?
Thoughts, pushback, or a story of your own? Drop a reply below — I read every one.
Comments are powered by Disqus. By posting you agree to theirterms.