Syed Aslam

Thoughts, Stories, and Ideas

How to use forked NPM dependencies

by Syed Aslam in Node · 3 min read

When using open-source NPM packages in your project, odds are you will run into a dependency that is missing a feature. This dependency doesn't do quite do what you want or has a bug that needs to be worked around for your use-case. What do you do in these situations, if your team doesn't have the time to create your custom solution to the problem?

Node JavaScript NPM Web-Development

Dynamic Full Page Background Images in Rails

by Syed Aslam in Rails · 2 min read

Easy way to set a background from a selected number of images in Rails. You can set a background image purely through CSS thanks to the 'background-size' property in CSS3. Using the `html` element is better than `body` as it's always at least the height of the browser window. You set a fixed and centered background on it, then adjust it's size using `background-size` set to the cover keyword.

rails css helpers

Working with Files in Ruby

by Syed Aslam in Ruby · 10 min read

The built-in class File provides the facilities for manipulating files in Ruby. Let us explore the basic file operations, including opening, reading, writing along with querying file objects to get information about the file itself.

ruby