C3rd
Free Outlook - for Microsoft 365 Business Basic
Posted: 13 Dec 2024, 9:12am - FridayAs 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.
Fastest way to connect to DB with existing .env
Posted: 10 Jul 2024, 14:34pm - WednesdaySeveral 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).
This is how I do it.. Helps a lot doing this way.
Netflix bug: Updating payment method
Posted: 28 Jul 2022, 20:27pm - ThursdayI registered my Netflix in New Zealand. So, credit card and mobile number will be NZ. Now, I moved to Australia. I need to update the information. So, I updated my mobile number to Australia. But then, when I update my credit card, it's asking for confirmation code but the form is in NZ! Then keep saying "Something went wrong!" Of course because your form is wrong. Because your form is using NZ form for the mobile confirmation. So dumb!
Don't get me wrong! Both countries have confusing flags. But I do know the difference between the flags. :) Back to the topic. Now, how can update my credit card?
So I contacted Live Chat and their recommendation, deactivate my account! Nice!
Now I have to wait until 27 August 2022 so I can update my credit card. Great! Best system!
testssl.sh - testing SSL
Posted: 12 Jul 2021, 20:33pm - MondayI have been using https://www.ssllabs.com/ssltest/analyze.html and today I found a script to give me report the same ssllabs.com does.
The bash script based is really good. Very helpful giving me the report I need.
https://testssl.sh/ -- You can download the script from their github.
Here's the sample report: (I can display this because its an A+ verdict)
My Progression to Senior Software Engineer at Objective
Posted: 13 Oct 2020, 1:51am - TuesdayIn 2012, I was visiting my sister in New Zealand when I decided I wanted to move over there from The Philippines, too. Soon I was working as a PHP/SQL Programmer, developing and maintaining New Zealand’s first end-to-end Building Consenting System, AlphaOne.
I enjoyed it and it was very demanding. I was pretty much solely responsible for managing AlphaOne and had to wear multiple hats in addition to writing code. When AlphaOne was acquired by Objective last year, I felt a really welcome change to my job.
There’s so much support: everything is manageable. My worklife balance has changed dramatically and I now enjoy my weekends without worrying about work, here’s a little bit more about how I got here and what it’s like working at Objective.
My road to Senior Software Engineer at Objective
I graduated with a BS Information Management in 2008 from Xavier University, Philippines. While studying, I freelanced as a desktop application developer (using .Net C# + MySQL) and I mostly wrote web based applications, using PHP or LAMP stack.
After working for a while as a lecturer, I was employed remotely by companies all over the world to do PHP web applications, maintain or build applications and websites, and manage web servers.
Eventually I found myself in NZ on the AlphaOne project. ] With one remote and two on-site developers, we managed to stabilise the system and grow our client base from 2 to 12 in just 3 years.
AlphaOne was acquired by Objective in March 2019 and as the Senior Software Engineer for Alpha One, I love working for Objective! I write code, manage our mail and web servers and am also responsible for developing hybrid mobile applications (a mobile version of AlphaOne), so we can easily maintain and deploy it on the Apple, Google and Windows stores.
How I developed my skills
In 2004, before I knew anything at all about the existence of Facebook, I had a very similar idea. I didn't write the code until 2005 though, when I built my own popular and exclusive social network called Zabyer.
The challenges I faced with it (such as performance degradation, compatibility issues, exploitation and hacking) brought my knowledge up to a commercial level long before I’d even finished university. Then, equipped with that knowledge, I started freelancing, which added to my skills in dealing with customers and clients.
I created another social network in 2008 but I struggled to finance it and realised I really just needed money. That’s when I began working remotely for multiple companies, before finding my job at AlphaOne.
The most important things I’ve learned on my career journey
Probably the most important things I’ve learned over the years are:
- Working with a legacy system and someone else’s code is hard! But you should learn to appreciate other people’s work because you have the knowledge to improve it.
- Every developer has their own style, so whoever you’re on a team with, come up with rules you can all agree on. I’ve also learned I should get my teammates involved with what I’m doing instead of making them wait around for my part.
- When it comes to small-medium businesses, I’ve learned how to balance what a business wants and is capable of, with its customers’ needs. With the information from both sides, I can recommend and easily deliver the output.
How we develop our engineers at Objective
At Objective, our best and well-tested approach is to start off new employees on bug fixing (from easy to hard) and guide them closely. This way, they will learn the project structure, flows and its ecosystem.
I don't tell them all the details, but I do show them how it is done rather than giving a long list of instructions. A visual presentation stays in the mind a lot better. Once they catch up with the other developers, they can be eased into bug fixing and other mixed tasks, like new stuff and best practices.
We like to include our new engineers in research and development as well, to make them excited about new technologies and boost their confidence to do more things. I always listen to their ideas and allow them to explore: I want them to feel like they are truly contributing to a project.
Personally, I’m glad all my hard work has led me here. I love the culture and the energy of this company. To me, Objective is the perfect workplace!
Do you think you have what it takes to become part of our engineering team at Objective? Check our careers page for job openings!
IntelliJ IDEA + Java versions + Maven + Gradle
Posted: 5 Jun 2020, 11:57am - FridayOk, I have been writing java codes from quite some time now. And most common I forgot to set are the following areas to configure in IntelliJ IDEA.
- Project Structure - always set both Project SDK and Project Language Level
2. SDK - you have to define the JDK home path to use in your project
3. Java bytecode - ensure that you set the Project bytecode version and add your project in per-module bytecode version and define the target bytecode version.
4. Maven - pom.xml file
5. Gradle - build.gradle file
And if you fail to configure these versions, you'll end up seeing RED texts/icons.
zsh -> grml
Posted: 18 Nov 2019, 1:09am - Monday$ sudo apt install -y zshdownload grml's zsh configuration
$ cd ~/; wget -O .zshrc https://git.grml.org/f/grml-etc-core/etc/zsh/zshrcthen run zsh
$ zshthat's it.. will look like this: also you can make zsh-grml shell as default:
chsh -s /bin/zshor
camilord@camilo3rd-ubuntu /srv/localhost/alpha1v1 (git)-[3508-fixing-unit-test] % chsh Password: Changing the login shell for camilord Enter the new value, or press ENTER for the default Login Shell [/bin/bash]:
[ssllabs.com] How to get "A+" on SSL Server test
Posted: 23 Mar 2018, 9:38am - FridaySSLProtocol all -SSLv2 -SSLv3 SSLHonorCipherOrder onThen save your changes and restart your Apache. That's it! You should get an A+ for that. Note: It was just recently that you have to turn on that SSLHonorCipherOrder or "Apache for Forward Secrecy" to ON. Reference: https://www.digicert.com/ssl-support/ssl-enabling-perfect-forward-secrecy.htm
PHP: about NULL vs 0
Posted: 18 Sep 2017, 20:43pm - Monday$parcelData = []; $jobVarObj = new JobsVarsTable(); $jobVarObj->setDrivers($this->getQueryDriver()); $prime_parcel = $jobVarObj->getVarValue($this->job_id, 'PRIMARY_PARCEL'); ... $q = "SELECT * FROM jobs_parcels WHERE JID = '%d' AND ID != '%d' AND Deleted IS NULL"; $sql = $this->getQueryDriver()->fetchAll($q, [$this->job_id, $prime_parcel]); $parcel_data_list = $sql->getData();In that codes above, the $parcel_data_list is always empty and I know there are 1 row results. 2 hours later... Note: $prime_parcel = null; // if does not exists in the records, will return literal null I just realised that printing vsprintf($q, [ $this->job, $prime_parcel ]) will gave me what I expected because when you sprintf() or vsprintf() the NULL to %d, this will convert to ZERO. But actually when I pass the query to our QueryDriver, %d and %s are actually converted to ? which the NULL become literal NULL in the query. Instead of "SELECT * FROM jobs_parcels JID = '123' AND ID != '0' AND DELETED IS NULL" then becomes "SELECT * FROM jobs_parcels JID = '123' AND ID != NULL AND DELETED IS NULL". So there will be no result. So lesson learn... Solution:
$parcelData = []; $jobVarObj = new JobsVarsTable(); $jobVarObj->setDrivers($this->getQueryDriver()); $prime_parcel = (int)$jobVarObj->getVarValue($this->job_id, 'PRIMARY_PARCEL', 'n'); ... $q = "SELECT * FROM jobs_parcels WHERE JID = '%d' AND ID != '%d' AND Deleted IS NULL"; $sql = $this->getQueryDriver()->fetchAll($q, [$this->job_id, $prime_parcel]); $parcel_data_list = $sql->getData();Then it solves my 2hrs problem!!! Ok that's my entry for half of 2017... hehehe.. Cheers!
Moving WSL to another machine
Posted: 8 Dec 2024, 1:22am - SundayIn 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
BeeCheckout Online Ordering System
Posted: 19 Jun 2024, 16:59pm - WednesdayWhen 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.
VM: Resize Partition on a running system
Posted: 20 Sep 2021, 22:09pm - MondayI was stuck for a while how to resize a running partition in my VM. Been searching for answers and all answers are quite long except this one:
root@silex5:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 798M 1.1M 797M 1% /run
/dev/sda2 49G 32G 15G 69% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/loop0 100M 100M 0 100% /snap/core/11420
/dev/loop1 18M 18M 0 100% /snap/pdftk/9
/dev/loop2 100M 100M 0 100% /snap/core/11606
tmpfs 798M 0 798M 0% /run/user/1011
root@silex5:~# growpart /dev/sda 2
CHANGED: partition=2 start=4096 old: size=104851456 end=104855552 new: size=251654111,end=251658207
root@silex5:~# resize2fs /dev/sda2
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/sda2 is mounted on /; on-line resizing required
old_desc_blocks = 7, new_desc_blocks = 15
The filesystem on /dev/sda2 is now 31456763 (4k) blocks long.
root@silex5:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 798M 1.1M 797M 1% /run
/dev/sda2 118G 32G 81G 29% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/loop0 100M 100M 0 100% /snap/core/11420
/dev/loop1 18M 18M 0 100% /snap/pdftk/9
/dev/loop2 100M 100M 0 100% /snap/core/11606
tmpfs 798M 0 798M 0% /run/user/1011
root@silex5:~# reboot
Reference: https://unix.stackexchange.com/questions/137482/how-to-to-resize-an-ext4-partition-from-the-command-line
Free Planning Poker
Posted: 12 Jun 2021, 13:26pm - SaturdayHello Agile/Scrum people ...
If you are looking for free planning poker, use http://www.freeplanningpoker.co.nz/ or http://www.freeplanningpoker.site/ or http://www.freeplanning.poker/ and there will be no ads or limitation of 5 users or 5 issues then try to force you to upgrade to premium. The limitation is like it can create 100 issues of each gameplay and of course limit to 8 players, more than that will be a conference already. So 8 users or players, cast a vote and get the score for your issues.
This application is used for team management amd planning for agile team.
Cleaning HDDs and monitor it
Posted: 24 Jun 2020, 1:21am - WednesdayI've been assigned to clean up our server hardware and trying to create a monitoring how the progress going.
---------------- s04_wipe.sh ----------------------
#!/bin/bash
# s04
dd if=/dev/zero of=/dev/sdg status=progress
dd if=/dev/urandom of=/dev/sdg status=progress
---------------- s03_wipe.sh ----------------------
#!/bin/bash
# s03
dd if=/dev/zero of=/dev/sdf status=progress
dd if=/dev/urandom of=/dev/sdf status=progress
---------------- s02_wipe.sh ----------------------
#!/bin/bash
# s02
dd if=/dev/zero of=/dev/sde status=progress
dd if=/dev/urandom of=/dev/sde status=progress
---------------- s01_wipe.sh ----------------------
#!/bin/bash
# s01
dd if=/dev/zero of=/dev/sdd status=progress
dd if=/dev/urandom of=/dev/sdd status=progress
---------------- uat_wipe.sh ----------------------
#!/bin/bash
# uat
dd if=/dev/zero of=/dev/sdc status=progress
dd if=/dev/urandom of=/dev/sdc status=progress
---------------- db_wipe.sh ----------------------
#!/bin/bash
# database
dd if=/dev/zero of=/dev/sdb status=progress
dd if=/dev/urandom of=/dev/sdb status=progress
----------------os_wipe.sh ----------------------
#!/bin/bash
# os disk
dd if=/dev/zero of=/dev/sda status=progress
dd if=/dev/urandom of=/dev/sda status=progress
I ran it this way...
nohup bash s02_wipe.sh > sde.out 2>&1 &
then this is my monitoring script (monitor.sh) to check the status:
#!/bin/bash
echo "/dev/sdb: "
echo $(tail -n 1 -c 120 sdb.out) | rev | cut -d "s" -f1,2,3,4| rev
echo -e "\n"
echo "/dev/sdc: "
echo $(tail -n 1 -c 120 sdc.out) | rev | cut -d "s" -f1,2,3,4| rev
echo -e "\n"
echo "/dev/sdd: "
echo $(tail -n 1 -c 120 sdd.out) | rev | cut -d "s" -f1,2,3,4| rev
echo -e "\n"
echo "/dev/sde: "
echo $(tail -n 1 -c 120 sde.out) | rev | cut -d "s" -f1,2,3,4| rev
echo -e "\n"
echo "/dev/sdf: "
echo $(tail -n 1 -c 120 sdf.out) | rev | cut -d "s" -f1,2,3,4| rev
echo -e "\n"
echo "/dev/sdg: "
echo $(tail -n 1 -c 120 sdg.out) | rev | cut -d "s" -f1,2,3,4| rev
echo -e "\n"
then run it by:
watch -d "bash monitor.sh"
if you're needing like this, feel free to use my method.
git doesn't pull or push: "error: RPC failed; HTTP 502 curl 22 The requested URL returned: 502 Bad Gateway"
Posted: 29 Mar 2020, 19:59pm - SundayI recently encountered a weird error on my repo when I "git push" or "git pull" in Windows 7. But when I tried it on my Mac, Ubuntu & Windows 10, its working fine.
As shown above, that's the error I am getting when I pull/push. I tried the solution from others:
But unfortunately it didn't resolve my problem. Somehow, it did made it a bit faster.
I already tried many things, but I cannot find any solution that works for my problem. I know that the issue is just in my PC, even tried emptying my hosts file still didn't work.
Then a lightbulb popup, maybe I should delete my current repo and checkout again. So I did and resolve my problem. I can pull and push after that.
CentOS / RHEL 7 : How to create custom daemon service
Posted: 25 Jul 2018, 13:08pm - Wednesday# vi /root/firewalld.sh #!/bin/bash iptables -F iptables -LThen make this executable...
chmox u+x /root/firewalld.shthen you need to create the daemon service
# vi /etc/systemd/system/sample.service [Unit] Description=Description for sample script goes here After=network.target [Service] Type=simple ExecStart=/root/firewalld.sh TimeoutStartSec=0 [Install] WantedBy=default.targetdefinitions:
After= : If the script needs any other system facilities (networking, etc), modify the [Unit] section to include appropriate After=, Wants=, or Requires= directives. Type= : Switch Type=simple for Type=idle in the [Service] section to delay execution of the script until all other jobs are dispatched WantedBy= : target to run the sample script inthen cast the commands below:
# systemctl daemon-reload # systemctl enable sample.service # systemctl start sample.service # systemctl rebootafter rebooting, your script should be executed. Reference: https://www.thegeekdiary.com/centos-rhel-7-how-to-make-custom-script-to-run-automatically-during-boot/
[securityheaders.io] Getting an "A"
Posted: 22 Mar 2018, 11:29am - Thursday# # to apply this settings, you must enable apache headers first... # e.g.: a2enmod headers # # headers customised by camilo3rd | 2018-03-22 ---- [start] # Header unset Content-Security-Policy #Header add Content-Security-Policy "default-src 'self'" Header add Content-Security-Policy "default-src * 'self'; img-src * 'self' data: 'unsafe-inline'; style-src * 'self' 'unsafe-inline'; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; report-uri https://www.abcs.co.nz/violationReportForCSP.php;" Header unset X-Content-Security-Policy #Header add X-Content-Security-Policy "default-src 'self'" Header add X-Content-Security-Policy "default-src * 'self'; img-src * 'self' data: 'unsafe-inline'; style-src * 'self' 'unsafe-inline'; script-src * 'self' 'unsafe-inline' 'unsafe-eval';" Header unset X-WebKit-CSP #Header add X-WebKit-CSP "default-src 'self'" Header add X-WebKit-CSP "default-src * 'self'; img-src * 'self' data: 'unsafe-inline'; style-src * 'self' 'unsafe-inline'; script-src * 'self' 'unsafe-inline' 'unsafe-eval';" Header always set Referrer-Policy "same-origin" Header set X-Content-Type-Options "nosniff" Header set X-XSS-Protection "1; mode=block" #Header set X-Frame-Options "DENY" Header set X-Frame-Options SAMEORIGIN Header set Strict-Transport-Security "max-age=631138519; includeSubDomains" # # headers customised by camilo3rd | 2018-03-22 ---- [end] #Then save.. Restart your apache and that's it. You should get an A score. To understand those statements above especially the values, please refer to:
- https://developers.google.com/web/fundamentals/security/csp/
- https://content-security-policy.com/
MAIL: How to disable or remove new outlook permanently in Windows 10
Posted: 30 Sep 2024, 9:40am - MondayAs 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.
- https://answers.microsoft.com/en-us/outlook_com/forum/all/how-do-i-totally-delete-the-new-outlook-i-only/216889bd-1dd0-4d58-8a2a-5e290e97f3bc
- https://answers.microsoft.com/en-us/outlook_com/forum/all/how-to-remove-new-outlook-from-windows-10/7afcbf97-19c7-45bb-a15c-1ad0cbfae44d
- https://answers.microsoft.com/en-us/outlook_com/forum/all/since-i-did-try-the-new-outlook-how-do-i-eradicate/a14a9e47-cee0-4538-870a-a7acc15ae1ab
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!
docker
Posted: 14 May 2024, 19:18pm - TuesdayI 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"
Windows: Setting up Apache 2.4.48 and PHP 7.4.20
Posted: 13 Jul 2021, 23:43pm - TuesdayBefore going thru the steps below, you need to download the installers first at http://camilord.com/downloads/Apache2.4.48_PHP7.4.20.zip
Then, just extract the zip which will give you both apache (httpd-2.4.48-o111k-x64-vc15) and php (php-7.4.20-Win32-vc15-x64). They are also in a zip, extract it in "C:\" and rename it like below.
would look like:
C:\Apache24
C:\php
then in apache, go to httpd.conf and edit it.
Add the following lines:
# php 7.4.20 handler
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/php/php7apache2_4.dll"
PHPIniDir "c:/php"
you can skip this step, you only do this when you have existing apache installation
httpd -k uninstall -n "Apache2.4"
then save it. go to Apache24\bin using CLI or powershell (as administrator) then run:
httpd.exe -k install -n "Apache2.4"
this will install as a service. then to start and stop
httpd -k start
httpd -k stop
or
net start "Apache2.4"
net stop "Apache2.4"
then for PHP, copy the php.ini-development
as php.ini
then adjust the necessary configuration
needed by your application. then since you're in dev mode, add this at the end of the php.ini:
[Xdebug]
zend_extension="C:/php/ext/php_xdebug-3.0.4-7.4-vc15-x86_64.dll"
xdebug.client_port="9003"
xdebug.mode=debug
;xdebug.mode=profile
you can find the file in this folder and make sure you copy that xdebug dll file to C:\php\ext\
then restart the apache…
and if you have changes in your php.ini
on next edit, restart again your apache.
Zeacurity: Allow all to ssh except specific IP addresses
Posted: 8 Feb 2021, 3:12am - MondaySince I open my ssh to all for the past 3 months, the auth.log is incredibly flooded with login attempts. I know they can't get in because I am using public key authentication and AllowedUser. Somehow it is still worrying the number of attempts.
So I created an app to counter these login attempts. Introducing my console app, Zecurity (https://github.com/camilord/Zeacurity). It's using Symfony Console framework and easy to use if you are having the same situation I got and want to protect your server. I wrote (I believe) the details how to implement on your server, please see the read me file.
Screenshot below, as you can see there's like every milliseconds attempting to login. Then I ran Zeacurity at 3:00 and after that, no attempts. :)
PS: when I was trying to resolve my problem, I stumble down with an issue that all incoming attempts still going thru, thanks to Sid Bachtiar when he mentioned about to remove the MASQUERADE and it was the one causing it. To read more about it, see https://linuxhacks.org/what-is-ip-masquerade-and-how-to-rule-it-with-iptables/
Gradle Project Tests
Posted: 6 Jun 2020, 9:59am - SaturdayThe Error:
gradle Caused by: org.junit.platform.commons.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
I've been writing tests on my java gradle project and I thought the tests was running every time I compile. I'm using IntelliJ IDEA and when I right click the test folder and `Run All Tests`, seems to work well.
Then I found out that it wasn't running at all when I ran the report.
"Five hours later..." I almost gave up and decided to go back to maven. Then thought maybe I will search the error one last time. Landed to this page: https://discuss.gradle.org/t/gradle-4-6-and-junit-5/26061 -- then decided to give one last try. So I change my build.gradle
plugins { id 'java' id 'project-report' } group 'nz.camilord.alphaone.sample' version '1.0.0-SNAPSHOT' sourceCompatibility = 11 targetCompatibility = 11 repositories { mavenCentral() } dependencies { compile 'postgresql:postgresql:9.0-801.jdbc4' compile 'com.google.code.gson:gson:2.8.0' testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.2' //testCompile 'junit:junit:4.13' }
to this new configuration:
plugins { id 'java' id 'project-report' } group 'nz.camilord.alphaone.sample' version '1.0.0-SNAPSHOT' sourceCompatibility = 11 targetCompatibility = 11 repositories { mavenCentral() } dependencies { compile 'postgresql:postgresql:9.0-801.jdbc4' compile 'com.google.code.gson:gson:2.8.0' testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.2' testCompile 'org.jetbrains.spek:spek-junit-platform-engine:1.0.89' testRuntime 'org.junit.jupiter:junit-jupiter-engine' //testCompile 'junit:junit:4.13' } test { useJUnitPlatform() } configurations { externalLibraries compile.extendsFrom (externalLibraries) }
... and the result is a success! It works!
ASP.Net Core C#: Visual Studio 2019 missing UseSqlServer()
Posted: 21 Mar 2020, 0:17am - SaturdayFew days ago, been learning again ASP.Net C#, but this time its ASP.Net Core C#. It took me a while to resolve this issue because all the reference in the internet and stackoverflow were for Visual Studio 2017.
DotNet Version: 3.1 | IDE: VS 2019
In VS2017 might work just by adding:
use using Microsoft.EntityFrameworkCore;
But in VS2019, what works is both adding describe above and execute add package:
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
after that, you problem should go away...
My Meme Generator (mymeme.app)
Posted: 16 Jul 2018, 12:08pm - MondayNZ Companies Register API
Posted: 25 Feb 2018, 3:50am - Sundayuse camilord\NZCompaniesRegister\NZCompaniesRegister; $obj = new NZCompaniesRegister(); $result = $obj->search('blue horn'); print_r($result);Cheers!