About Iliyan Trifonov

Web Developer, Blogger

Bash on Ubuntu on Windows. The creators update and what we can do with this neat feature.

Installation Guide

Uninstall it and start anew

How to run Linux GUI apps with Bash on Windows

Update: New distro’s coming to Bash/WSL via Windows Store

April 11th passed and now we have another big update of Windows 10 called the Creators update. It adds a lot of new features but the most interesting one from a developer point of view is the Bash console.

Before the Creators update we had bash but it was at an early stage. People that wanted to play with it early had to register for Insiders update of their OS. Now all of us have the latest features with an official stable update.

The new linux subsystem now comes with Ubuntu 16.04 LTS which gives us a lot of new things and also the updated allows a lot more linux software to run.

My favorite update is the one that allows the file watchers to work. What that means is that nodejs apps like grunt, gulp and friends now just work. Of course there are other updates and fixes that allow a full development environment to be set using only the bash console. You don’t need to install the Windows alternatives of the apps you need. Just use bash and run apt-get install xxxx. Software like git, nodejs/npm, php, ruby can be ran under bash now.

One thing that needs improvement for me now is when I use browser sync, it cannot open the browser and I want it to open the default browser I set under Windows. However you can still open you browser and go to http://localhost:3000 and it works.

We’ll see in the near future how many console apps we can use. I personally want bash to be my default shell in every shell program and IDE I have and to run without problems with paths or environment: just like if using bash.exe for windows. I also need to check how mysql, mongodb, docker and similar software behaves. Still having everything that I use for web development under the bash console is way better than using ported to Windows software or a slow virtual machine.

My advice for you is to start using bash on Windows today, set up your own environment and report any error you have on their Github issues pages.

No Internet access from your Docker container? Check this out!

After a recent update I started having issues with my containers that hosted apps which were accessing the outside world periodically. At first I couldn’t understand where the problem is. I’ve been checking a lot Github issues without success and finally I remembered that I’ve made an update to my host which updated the kernel.

What I needed now is to find a way to boot with an older kernel selected by default. I started looking in Stackoverflow pages and blogs and found a way to set any kernel that I already have installed as the default one.

Here are the steps I took to fix my problem(my host is running Ubuntu linux):

  • check the /boot/grub/grub.cfg file for all available options you have. The name of every kernel installed is there. Pick one that is older than the latest installed. You have to look for entries like: “menuentry ‘Ubuntu, with Linux 3.13.0-113-generic'”. You will use the “Ubuntu, with Linux 3.13.0-113-generic” part
  • next open the /etc/default/grub file and look for the GRUB_DEFAULT entry
  • combine your kernel config name from point one from above with “Advanced options for Ubuntu” or “Previous Linux versions” for older Ubuntu versions (<14.04). You’ll have to have a similar string like this one now: “Previous Linux versions>Ubuntu, with Linux 3.13.0-92-generic”. Set GRUB_DEFAULT to this string like: GRUB_DEFAULT=Previous Linux versions>Ubuntu, with Linux 3.13.0-92-generic
  • you can use numeric values for GRUB_DEFAULT but it’s not recommended as the number will point to a random kernel config after the next update
  • save, run sudo update-grub and restart

Now you should have an Internet access from inside the Docker containers. This is just a temporary solution so don’t leave it like this, especially running with an older kernel. Better check you configuration and even reinstall everything on your host, use a newer linux distro, etc.

Source

You SHOULD Learn Vanilla JavaScript Before JS Frameworks – Snipcart

Should you learn vanilla, pure JavaScript before hopping on the trendy JS frameworks bandwagon? Yes. Read this post to learn why.

Source: You SHOULD Learn Vanilla JavaScript Before JS Frameworks – Snipcart

A brilliant article on why you should learn pure JavaScript first and also continue learning it(considering how much new things are in the language since ES6).

I also recommend reading the Axel Rauschmayer‘s books on ES5 and ES6 where you can even find how the JavaScript engine works!

“Practice always leads to mastery” – Francois-Xavier P. Darveau

Native vs Ionic vs Nativescript vs React Native

From time to time I stumble upon some articles that I like from reading the first sentence. This is one of them. I am also thinking of the performance vs ease of use between writing native and hybrid mobile apps. I like how refreshing it felt when I read that when putting your app in a Webview you should not expect much performance(for more complex apps of course). Not that I didn’t know or experienced that but it’s always better if you find that someone else is thinking the same.
I also found this one while searching if somebody used Elm with Ionic (just for fun! :)). I remember Ionic made something about not having to use Angular if you don’t want to. Of course you’ll miss all the components made especially for it I guess(will check again later :)).

As a small (but growing) engineering team, being as efficient as possible with our development effort is massively important to us. We want to give our wonderfully engaged members, the best functionality we can as quickly (and as bug free) as possible. Hence as preparation for building our upcoming App, we wanted to review the pros and cons of Native vs Hybrid mobile development frameworks, and see how the latter lived up to it’s promise of write once, run anywhere.

Source: Native vs Ionic vs Nativescript vs React Native

How to Limit Windows 10 Data Use Over a Metered Connection

Living in a rural area comes with limits for bandwidth, and if you are like me, you might be coming to the realization that Windows 10 loves data, a lot.

Source: How to Limit Windows 10 Data Use Over a Metered Connection

Lately I needed to use a limited data connection to Internet using my mobile Internet. That meant I needed to limit as much as possible any unneeded data transfer my PC with Windows 10 can do. The article above shows probably 99% of the settings you have to change to do that. The rest 1% you can do with a special data limiting software or a firewall and block the traffic an app does completely.

Now just be careful while opening different websites. Some of them may contain tens of big images. Of course there is a browser extension for blocking images too!

What Do the Popular JavaScript Tools Depend On? -Telerik Developer Network

Cody Lindley explores the dependencies of popular JavaScript tools and frameworks including Angular, React, jQuery, Aurelia and more.

See what famous JS libraries like Angular and React use as their dependencies.

Source: What Do the Popular JavaScript Tools Depend On? -Telerik Developer Network

Docker 1.9.0 and the new network configuration

Docker 1.9 is here and it introduces a new way to handle the networking between containers.
Because docker containers should live a short live before being replaced with their new versions one should ask himself do we really need the static IP that was existing until now and assigned to the Docker’s bridge? The usual IP you will see was 172.17.42.1.

After upgrading this IP will be gone. Instead other IPs will be created dynamically. Of course there will be another IP like 172.17.0.1 assigned to the docker0 bridge. You can use it if you are brave enough but better not.
However if you need a quick fix before going to bed you can use the Docker’s –bip parameter to set the bridge IP back to 172.17.42.1.

Another way is to go back to version 1.7.1 using your OS’s package manager or direct install/compile.
Later when you decide to start using Docker’s networking the right and better way, you can start from here.