Lets Encrypt nginx SSL certificate renewal via cron

Add below as a cron entry.

#!/bin/bash
/path/letsencrypt/letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory --renew-by-default -a webroot --webroot-path /webroot/ --email youremail --text --agree-tos --agree-dev-preview -d 7979.us -d www.7979.us auth
/etc/init.d/nginx reload

Then configure nginx SSL like below.

    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/7979.us/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/7979.us/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers HIGH:!aNULL:!MD5:!3DES;


You may want to replace openssl default Diffie-Hellman (DH) key for enhanced security.
/usr/bin/openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096

Then add below into nignx SSL config:
ssl_dhparam /etc/ssl/certs/dhparam.pem;

Q: What if I want to put SNI for all the domain including reverse proxy?
A: Put conditional redirect in nginx for ACME to point the same path and add sni with -d switch

location /.well-known/acme-challenge { alias /weboot/.well-known/acme-challenge; }
location / { return 301 https://$server_name$request_uri; }

Remember this will expose your domain structure in certificate.

F5 AAM Cache for app generated pages

Dynamic content requires cache-control(max-age) and/or expires header to be cached.

The headers also need to be honoured from AAM policy which is not enabled by default.

Debug header decode:
wainfodecode [X-WA-INFO header content]

Force cache clean up:
wa_clear_cache

Check cache stats:
tmsh show ltm profile web-acceleration [iapp name].app/[iapp name]_optimized-acceleration

Reset stats:
tmsh reset-stats ltm profile web-acceleration [iapp name].app/[iapp_name]_optimized-acceleration

Run HTTP POST request from chrome developer tools

Do this from developer mode console.

May need to load a page from the same domain to avoid cross domain validation failure.

var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://url_here', true);
xhr.setRequestHeader('Content-type', 'application/json');
xhr.onload = function () {
// do something to response
console.log(this.responseText);
};
xhr.send('query_here');

Had a car accident in Victoria? Well, too bad.

I assume everyone reading this well aware about how the car insurance works and maybe made a few claims in past for minor scratches and parking mistakes. That covers the vehicle damages then any injuries and losses caused to human will be taken care by TAC. Until I recently had my first major car crush in my life, that was all I know about TAC and no question asked for past decade for paying extra dollars for it.

Let’s say you are driving peacefully one day and someone hit you from the behind. Where there’s no fault from your end, you’d expect full compensation for your loss from whatever insurance and systems applicable. That’s quite not the case in reality, not really with TAC.

Unless you are dead or permanently disabled, there are two possibilities here:

1) Hospitalised
Unfortunately your injury was rather severe so you are hospitalised. You may expect 100% of your income covered or even more for being confined in hospital, not a chance. Your first five days income won’t be covered by TAC, that goes 25% of your monthly income. Then they starts pay only 80% of your income thereafter. For example, you will get 60% of your monthly income if you get hospitalised for a month. Thankfully TAC won’t ask for medical excess in this case, explained below, although your 25% of monthly income most likely well exceed $6xx.

2) NOT Hospitalised
Fortunately, your injury was light so you just need to do some check-ups and treatment as an outpatient. Is TAC covers all the costs? NOT A CHANCE. There’s medical excess of $6xx, which need to come from your pocket, medicare and/or private insurance. You only will get paid once you exceed the given threshold and of course there’s upper limit for amount they provide for an item, which will likely incur gap charge.

Overall, getting injured from a car accident that is not your fault in Victoria means you will have to accept degree of loss for someone else’s fault.
Seems preposterous? Dura lex, sed lex

I guess it’s pretty nice system when you are at fault as you can just walk away from any responsibilities by paying $600-ish excess as long as you have some form of car insurance and not drunk.

Contract position

pros:
Market standard is 30% extra compare to similar perm position, pro-rata basis.
Can claim expense for pretty much all the things, if there’s any.

cons:
9.5% superannuation
3% agency fee (bit cheaper if you manage your tax bits and indemnity insurance by yourself)
8.3% annual leave (20 working days = 4 weeks)
4.16% personal leave (10 working days = 2 weeks)
in total: 24.96%

IMO, 5% income boost + some additional tax deduction doesn’t really make much sense.

Not sure it’s worth leave perm job.

dn;tl: It’s not simple 30% salary bump trade off for job security