Shirotech - CSS, Javascript, Node.js and Linux articles

How to automate an Arch Linux installation

For those who have not tried this amazing Linux distro called Arch Linux, I would strongly recommend you give it a try. Try to understand what it is all about before giving these automation scripts a spin. In a nutshell Arch Linux is a minimalist Linux distro for users who are more experienced, likes to mess around the terminal and customize it. Basically it is designed to make it “Yours”.

What Arch Linux differs from the mainstream distros such as Ubuntu, Debian and CentOS is that those have periodic releases. It is good and all, but upgrading to a major version can sometimes be a nightmare and people just do fresh installs every 6 months? Maybe. This is what I love about Arch Linux, there is no notion of “releases”, rather they have this concept called a “rolling release”. What this means is that you just update all your packages and your system will stay updated with the latest and greatest…

Read More

:not(.active) vs overriding active class

There are times when you need to toggle classes with javascript. Perhaps it is part of a many items you would only want to show an active one amongst many. So you got this piece of javascript:

JavaScript
1
element.classList.toggle('active');

Makes you wonder when writing your bit of css, some would go for something like this:

SCSS
1
2
3
4
5
6
7
8
.item {
display: none;
border: 1px solid #ccc;
&.active {
display: block;
}
}

For me, I would prefer the inverse…

Read More