Free Outlook - for Microsoft 365 Business Basic
Posted: 13 Dec 2024, 9:12am - Friday

As you know, you are force to use Outlook in Windows 10 nor Windows 11 which sucks because Windows Mail is fine. They are deprecating Windows Mail and force users to use Outlook. And when you are Microsoft 365 Business Basic account holder, using outlook will shut you down, in short you cannot use it. Even you pay for it, you just can't.

I wrote a work around to repel Outlook from installing in Windows 10/11 machine in my previous blog. It works! But I thought, maybe I should make another solution. So here's the solution.

Wrote few lines of code in Visual C# Desktop applicaiton with using WebView2 from Nuget and load outlook.office.com.

Download FreeOutlook_Setup.exe or FreeOutlook.zip and install it. Go to installed directory, double click FreeOutlook.exe. Then you'll get outlook in your desktop with separate window and not bothering your browser stuff.

enlarge
Fastest way to connect to DB with existing .env
Posted: 10 Jul 2024, 14:34pm - Wednesday

 Several projects now I ended up to create a standalone script to do specific task. Loading doctrine would be using lots of resources. I always want to create a lite-weight script to do specific tasks but connecting to the DB is a bit tricky when you are in a framework (symfony + doctrine).

 
$connection = $_ENV['DATABASE_URL'];
list(
    $driver,,, $username, $password,
    $host, $port, $db_name, $extra1
) = preg_split('/(:|\/|@|\?|&)/', $connection);

$sql = new xSQL([
    'driver' => $driver,
    'port' => $port,
    'database' => $db_name,
    'host' => $host,
    'username' => $username,
    'password' => $password
], true);

 

This is how I do it.. Helps a lot doing this way.

enlarge

 

This quality property has been designed and built to make living and outdoor entertaining a breeze.

 

The heart of the home is the beautiful kitchen with a stone bench countertop, quality appliances, walk-in pantry, and breakfast bar - an ideal spot for quick easy family meals. The kitchen overlooks the relaxed family dining living with seamless flow to the expansive covered entertaining patio, which is enjoyed all year round - you will be impressed! The separate lounge allows for you to pop away for a quiet moment.

 

You will enjoy the roomy master bedroom with an en suite, walk-in wardrobe, and access outdoors to the patio. The other three bedrooms are good sizes with the third located near the front entrance and family living, perfect for those who work from home and those who wish the kids to be nearby while working on their homework.

 

A large double garage with internal access is a must and don't we all love a separate laundry room. Gardens are low maintenance and with some raised garden beds.

 

The location is superb, close to the Summerhill shopping centre and zoned for quality schools. This quality brick home was built in 2019 and is in "as new" condition.

 

Please ring us today to make a time to view or come along to one of our Open Homes, we would love to show you through. Call Lyndsey - 0274462886 or Stu - 0274441594

 

For further information on this property please visit:
https://www.13mediterraneangrove.co.nz or https://rwpalmerstonnorth.co.nz/PNO30173

STATUS: SOLD

enlarge
Quirks on jQuery plugin "lc_switch"
Posted: 12 May 2021, 21:57pm - Wednesday

We've been using lc_switch for our new UI revamp and found some quirks. Here they are:

When binding lc_switch jQuery plugin, do not do these following:

QUIRK 1

WRONG

<label class="ocl-switch-label" for="app_confidential">
    <input class="ocl-switch" type="checkbox" id="app_confidential" name="app_confidential" /> Is the project confidential?
</label>

CORRECT

<label class="ocl-switch-label" for="app_confidential">
    <input class="ocl-switch" type="checkbox" id="app_confidential_answer" name="app_confidential" /> Is the project confidential?
</label>

EXPLANATION:

You should not name the element id and name the same

QUIRK 2

WRONG

<label class="ocl-switch-label" for="app_confidential_answer">
    <input class="ocl-switch" type="checkbox" id="app_confidential_answer" name="app_confidential" /> Is the project confidential?
</label>

CORRECT

<label class="ocl-switch-label" for="app_confidential">
    <input class="ocl-switch" type="checkbox" id="app_confidential_answer" name="app_confidential" /> Is the project confidential?
</label>

EXPLANATION:

You should not address label tag for="" attribute to an element's id, instead address to element's name

enlarge
Moving WSL to another machine
Posted: 8 Dec 2024, 1:22am - Sunday

 In my case, I am moving from Windows 10 to Windows 11. It is my first to do this. I realised how easy I can move my work to another PC/Laptop or new machine.

In my old machine, I exported my Ubuntu by casting the command:

wsl --export Ubuntu E:\wsl\ubuntu.tar

It will take a while, mine was 150Gb for almost an hour. Then I shared my E:\wsl folder so I can easily access the file via network. Or you can copy it to USB drive.

Then go to your new machine or destination PC/laptop. First I unregister the existing Ubuntu I installed in my destination machine.

wsl --unregister Ubuntu

Then I need to import the Ubuntu I recently exported. Either you access the file remotely from your old machine or from the USB drive by casting the command:

mkdir $env:USERPROFILE\WSL\instances\Ubuntu
wsl --import Ubuntu $env:USERPROFILE\WSL\instances\Ubuntu \\OldMachine\wsl\ubuntu.tar --version 2

It will take a while again... Once done, I set it to default.

wsl --set-default Ubuntu

Then we need to set the user in the imported Ubuntu, by default will set to "root"

wsl ~
nano /etc/wsl.conf

Then add the following:

[user]
default=your_username

Save and exit. Restart WSL and when you use WSL, it should be your username.

Reference: https://askubuntu.com/questions/1429369/how-to-transfer-ubuntu-on-wsl-from-one-laptop-to-another

enlarge
BeeCheckout Online Ordering System
Posted: 19 Jun 2024, 16:59pm - Wednesday

 When you own a restaurant or food shop, online presence is highly recommended to increase sales. Ordering online is a must too. Several online ordering providers are in the wild and daunting to choose from. Then, most of them are commission based platform!

Imagine a online ordering system that bill you on fixed price, not commission based, which more profitable on your side? Try BeeCheckout - https://www.beecheckout.com, take control of your sales and say good bye with commission based platform.

enlarge
Securing Mail Server SSL/TLS
Posted: 8 Jul 2021, 23:28pm - Thursday

I have been auditing our servers security. I was trying to resolved some issues detected by tenable.io, one of the issue raised was the SWEET32. There are few, by I am not disclosing that here. :) To resolve all vulnerabilities, these are my new settings in my postfix (main.cf) :

smtpd_tls_mandatory_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA, EXP, MEDIUM, ADH, AECDH, DSS, ECDSA, CAMELLIA128, 3DES, CAMELLIA256, RSA+AES
smtpd_tls_mandatory_protocols = !SSLv2 !SLv3 !TLSv1
smtpd_tls_protocols = !SSLv2 !SSLv3 !TLSv1

then restart postfix:

postfix stop; postfix start

that's it. it resolved my issues.

enlarge
Delete all git local branches
Posted: 3 Feb 2021, 2:59am - Wednesday

I was wondering how to delete all local git branch in Windows. But I didn't bother as I realized I got Cygwin anyway so I just took the Linux one... :) So I write a bash script named "clean_git.sh" with this contents:

#!/bin/bash
git checkout master
# git pull - optional
git status
git branch | grep -v "master" | xargs git branch -D

Cheers!

enlarge

As we know, new outlook keeps popping up in Windows Mail where you can toggle to use the new Outlook. Which is fucked up! Windows Mail is free, you can use outlook if you have free account but you cannot use Outlook if you purchase basic subscription. So I have no choice but to use Windows Mail because I only got basic subscription.

Somehow, Windows can force install this to your system and even replace the Mail to the new Outlook. I go through to few sites which they have the same problem with me.

But none of them works!!!

So, here's my solution. Open your notepad, write a powershell script, copy the code below...

# power shell

# show list of apps
# Get-AppxPackage | select Name, PackageFullName | Format-List

# remove outlook
Remove-AppxPackage -allusers Microsoft.OutlookForWindows_1.2024.916.0_x64__8wekyb3d8bbwe
Get-AppxPackage -all Microsoft.OutlookForWindows_* | Remove-AppxPackage -AllUsers

then save the file as powershell script at any location you want, example: "D:\uninstall_outlook.ps1"

then open in your Windows Task Scheduler, create a task, schedule it to run every 10 minutes.

or (this is the one I used because Task Scheduler sucks!) download and use System Scheduler at https://www.splinterware.com/download/index.html -- the free version of course! System Scheduler is better doing the task than Windows Task Scheduler.

Do the same, create a task/event then in the Event tab, name the event or task. there fill up the other fields like:

  • Application: powershell.exe
  • Parameters: -File uninstall_outlook.ps1
  • Working Dir: D:\
  • State: Hidden

then go to the next tab, Schedule. Select Every hour / selected Minutes, then select every 5 minutes.

UPDATE 2024-10-14: ensure you run the system scheduler as "Administrator"

What does the powershell do?

What you did is simply create a script to uninstall outlook. So if Windows install the Outlook in the background, your script will counter which to uninstall Outlook without bothering you.

Wallah! Problem solved!

 

enlarge
docker
Posted: 14 May 2024, 19:18pm - Tuesday

 I have been using docker lately. I have these legacy personal projects that I can't just abandon them. Still display in my portfolio. :) Then my new projects are now using Symfony 6.4 with MySQL 8.0. It is the time that I need both MySQL v5.7 and v8.x to run side-by-side in my server. Here's my docker-compose.yaml

version: '3.1'

services:
   mysql8:
      container_name: docker_mysql8
      image: mysql:8.0
      ports:
        - 3313:3306
      restart: always
      environment:
        MYSQL_USER: user
        MYSQL_PASSWORD: xxx
        MYSQL_ROOT_PASSWORD: xxx
        MYSQL_ROOT_HOST: "%"
        MYSQL_PORT: 3306
      volumes:
        - /var/lib/mysqld8:/var/lib/mysql
      healthcheck:
        test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
        timeout: 20s
        retries: 10
      networks:
        - default
   mysql5_7:
      container_name: docker_mysql5_7
      image: mysql:5.7
      ports:
        - 3312:3306
      restart: always
      environment:
        MYSQL_USER: user
        MYSQL_PASSWORD: xxxx
        MYSQL_ROOT_PASSWORD: xxxx
        MYSQL_ROOT_HOST: "%"
        MYSQL_PORT: 3306
      volumes:
        - /var/lib/mysqld57:/var/lib/mysql
      healthcheck:
        test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
        timeout: 20s
        retries: 10
      networks:
        - default

 

then save it let's say at "/srv/mysql/docker-compose.yaml" and to initialise, run "docker-compose up -d"

one thing to remember though, if you want to make some changes. Never cast the command: "docker-composer down" because this will delete the data you got in the container unless you created backups.

instead, just do "docker-compose stop" to stop the container and "docker-compose start" when you want to get the container running again.

if errors encounter, simply just restart docker then cast "systemctl restart docker" then go to "/srv/mysql" and run "docker-compose up -d"

enlarge
GPG error: The following signatures were invalid
Posted: 30 Jun 2021, 20:42pm - Wednesday
W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Solution:

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com --refresh-keys
enlarge
bash: load db with progress
Posted: 24 Sep 2020, 4:01am - Thursday

Just want to share this and my reminder how to create the script.

#!/bin/bash

NOW=$(date -d '-1 day' '+%Y-%m-%d')

COUNCIL=$1

gzip -dv db_${NOW}/${COUNCIL}_checklists.mysql.dmp.gz
gzip -dv db_${NOW}/${COUNCIL}_obca.mysql.dmp.gz
gzip -dv db_${NOW}/${COUNCIL}_fileman.mysql.dmp.gz
gzip -dv db_${NOW}/${COUNCIL}_logging.mysql.dmp.gz

mysql -h 127.0.0.1 -u root -psecret -e "CREATE DATABASE IF NOT EXISTS ${COUNCIL}_checklists"
mysql -h 127.0.0.1 -u root -psecret -e "CREATE DATABASE IF NOT EXISTS ${COUNCIL}_obca"
mysql -h 127.0.0.1 -u root -psecret -e "CREATE DATABASE IF NOT EXISTS ${COUNCIL}_logging"
mysql -h 127.0.0.1 -u root -psecret -e "CREATE DATABASE IF NOT EXISTS ${COUNCIL}_fileman"

#mysql ${COUNCIL}_checklists -h 127.0.0.1 -u root -psecret --force < db_${NOW}/${COUNCIL}_checklists.mysql.dmp
#mysql ${COUNCIL}_obca -h 127.0.0.1 -u root -psecret < db_${NOW}/${COUNCIL}_obca.mysql.dmp
#mysql ${COUNCIL}_fileman -h 127.0.0.1 -u root -psecret < db_${NOW}/${COUNCIL}_fileman.mysql.dmp
#mysql ${COUNCIL}_logging -h 127.0.0.1 -u root -psecret < db_${NOW}/${COUNCIL}_logging.mysql.dmp

pv db_${NOW}/${COUNCIL}_checklists.mysql.dmp | mysql ${COUNCIL}_checklists -h 127.0.0.1 -u root -psecret --force
pv db_${NOW}/${COUNCIL}_obca.mysql.dmp | mysql ${COUNCIL}_obca -h 127.0.0.1 -u root -psecret --force
pv db_${NOW}/${COUNCIL}_logging.mysql.dmp | mysql ${COUNCIL}_logging -h 127.0.0.1 -u root -psecret --force
pv db_${NOW}/${COUNCIL}_fileman.mysql.dmp | mysql ${COUNCIL}_fileman -h 127.0.0.1 -u root -psecret --force

gzip -9v db_${NOW}/${COUNCIL}_checklists.mysql.dmp
gzip -9v db_${NOW}/${COUNCIL}_obca.mysql.dmp
gzip -9v db_${NOW}/${COUNCIL}_fileman.mysql.dmp
gzip -9v db_${NOW}/${COUNCIL}_logging.mysql.dmp

echo "Import completed!"

Sample output below:

screenshot of the script in action...

That's it! Cheers!

enlarge