What’s up with Angular Universal?

I was excited when I heard Angular 2 would support server-side rendering since SEO was a huge PITA (pain in the ass) with Angular 1. It was said that server-side rendering would be possible through Angular Universal. Yet, this Angular Universal thing, what’s up with that? Seems to have a …

I can’t see my <hr> tag (horizontal line), where did it go?

If you can’t see your <hr> tag, your best bet might be that it somehow got display: flex . This will cause the hr to have width 0. Test it by giving it the style <hr style=”width: 100%”> and see whether this solves your problem. For example, if you use an Angular …

UIB (Bootstrap) Component Modals Made Easy

UIB (Bootstrap) Component Modals Made Easy

So UIB decided to support “component modals”. Unfortunately, the way I see it, the components need to be “dirtied” with the modal logic, meaning you will also need to include resolve and close in every component you want to display as a modal. Inside the components constructor or $onInit you then proceed to …

Bootstrapping an Angular 1.5 Component with Typescript

Angular 1.5 introduces the “Component” concept in order to get closer to Angular 2. By now you might have started to use typescript in your project, but upgrading to Angular 2 was too big of a step. However, you can start writing “Components” in an exact-angular2-style. Here’s what you’ve got …

Long to Base64 and Base64 to Long in Java

The following code converts a base64 String to a long and vice versa. private static final String alphabet = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-“; public static String encodeBase64(long v) { char[] a = alphabet.toCharArray(); v = Math.abs(v); String s = “”; for (int i = 0; i < 11; i++) { long val = …

Get an A+ rating in SSL Labs

Get Certificate from Letsencrypt sudo apt-get -y install git bc sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt ./letsencrypt-auto certonly –standalone –email yourmail@gmail.com -d www.example.com Strong Diffie-Hellman sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048 Link to SSL Certificate / Key cd /etc/nginx mkdir ssl cd ssl ln -s /etc/letsencrypt/live/www.example.com/privkey.pem nginx.key ln -s /etc/letsencrypt/live/www.example.com/fullchain.pem taskbaSe.crt …