Posts
Phuc Thai
Cancel

Convert Array to Hash using `to_h` method and notes you should know

Đối với Rubyist, dev Ruby, khi nhắc đến việc chuyển 1 array sang hash thì sẽ nghĩ ngay đến method to_h. Tuy nhiên, có 1 vài lưu ý khi sử dụng method này mà đôi khi bản thân tôi cũng quên luôn. Và tôi quên nó và bạn đừng như tôi =)))

.gitignore and database.yml in Rails

Untrack database.yml file by adding it to .gitignore

Shorten long commands by alias in Ubuntu

Use alias in bash for creating short-cuts to commonly run commands

Docker vs Virtual Machine

A virtual machine and Docker container differences.

Async and defer in script HTML tag

Async and defer are two of the attributes of script tags in html. Both properties are used to specify that the javascript content is downloaded at the same time as the page rendering (asynchronously). However, these two properties will work differently.

Command history with timestamp in Linux/Ubuntu

Display history with timestamp in Linux/Ubuntu

The ~ and ^ symbol in package.json Webpack

The tilde ~ and caret ^ symbols in package.json Webpack

[Tip/Trick] How to open a gem source in Ruby/Rails

Open the source for a gem in your bundle by command: bundle open [gem]

Make code simplier using tag helper in Rails

Tag, a view helper, sometime can make you code simplier.

Rubocop - Suppress warning parse/current is loading

` warning: parser/current is loading parser/ruby2x, which recognizes warning: 2.a-compliant syntax, but you are running 2.b. `