Search a word in a two-dimensional array using Java

Overview I was playing this word search game with my children when I realized that I can create a simple Java application that search for words in a grid. I uploaded the source at In this example, I created a 15×15 character array and populate it with strings per row. public class MainApp { public static void main(String[] args) { char[][] m = new char[15][15]; m[0] = "LRHCODRUMAJTMLE".toCharArray(); m[1] = "IYDTANDARPMAKLJ"....

September 13, 2019 · John Pili

How to connect to a Cisco VPN in Ubuntu 18.04 LTS

Here’s the simple steps for you to connect to a Cisco VPN in Ubuntu 18.04 LTS. Cisco, an American company is the leading provider and manufacturer of enterprise network devices, telecommunication hardware, networking security and networking software. According to as of April 2018, Cisco holds a 73.9% market which makes it the undisputed leader in its industry. Without further ado here are the steps. Install vpnc and network-manager-vpnc-gnome sudo apt install vpnc network-manager-vpnc-gnome Enter your password Confirm installation After successfully installing the required software it is time to configure it....

October 16, 2018 · John Pili

A simple firewall-cmd cheatsheet

I tested this using CentOS 7 with firewalld service running. Get Default Zone To know the default zone, use this command firewall-cmd --get-default-zone Get Active Zones firewall-cmd --get-active-zones List Zone Services To check services, ports and settings on a specific zone, use this command firewall-cmd --zone=public --list-all Add a permanent port into a zone Adding a permanent TCP/UDP port in a specific zone. Example: opening MongoDB port firewall-cmd --permanent --zone=public --add-port=27017/tcp firewall-cmd --permanent --zone=public --add-port=27017/udp Remove a permanent port from a zone firewall-cmd --permanent --zone=public --remove-port=27017/tcp firewall-cmd --permanent --zone=public --remove-port=27017/udp Firewall-cmd reload To reflect your firewall changes....

May 27, 2018 · John Pili
How to use Cloudflare as Dynamic DNS

How to use Cloudflare as Dynamic DNS

In this post I will share how I use Cloudflare as Dynamic DNS. I was previously using dynamic DNS service from No-IP for three years until a colleague of mine mentioned about Cloudflare’s really fast global DNS. Initially, I thought that Cloudflare was just a CDN and an Internet company that protects websites from Distributed Denial-of-Service (DDoS) attack, upon further research I found out that Cloudflare also provides a DNS service with a REST-API for you to update your DNS records....

May 26, 2018 · John Pili

Configure Tomcat as an init.d service

If you are using the core version of Apache Tomcat and would like auto-start it on Linux here are the simple steps. I assume that you already have a running Apache Tomcat and know how to navigate to the terminal and have necessary system permission to proceed with this tutorial. Depending on the distribution that you are using you may need to find a specific location for the configuration or init....

May 1, 2018 · John Pili