Skip to content

Instantly share code, notes, and snippets.

View JQL's full-sized avatar

John Lavelle JQL

View GitHub Profile
@JQL
JQL / yii_i18n.md
Last active December 29, 2023 12:00
How to implement Internationalization (I18N) in Yii2 Basic and add a language picker to the Menu

How To Add Internationalisation to the NavBar Menu in Yii2

Yii comes with internationalisation (i18n) "out of the box". There are instructions in the manual as to how to configure Yii to use i18n, but little information all in one place on how to fully integrate it into the bootstrap menu. This document attempts to remedy that.

The Github repository also contains the language flags, some country flags, a list of languages codes and their language names and a list of the languages Yii recognises "out of the box". A video will be posted on YouTube soon.


@JQL
JQL / InstallComposer
Last active November 27, 2023 07:28
How to install Composer Globally
# How to install Composer Globally - Programming for the Web
Are you using Composer and have a separate executable for each project? Do you want to know how to install Composer globally? Yes? Then watch this video.
### WINDOWS:
Download and run Composer-Setup.exe then reboot. - Simples!
### Linux and OSX:
This is a bit more complex so see the video: https://youtu.be/MhSLlnJQQyU
@JQL
JQL / com.ubuntu.pkexec.xampp.policy
Last active March 25, 2023 16:18
How to use pkexec to add XAMPP to the Linux Mint Menu. Note, it also works on Ubuntu and Ubuntu Mate with suitable changes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Apache Friends</vendor>
<vendor_url>https://www.apachefriends.org/index.html</vendor_url>
<icon_name>xampp</icon_name>
<action id="com.ubuntu.pkexec.xampp.policy">
<description>Run XAMPP Control Panel</description>
<message>Authentication is required to run the XAMP Control Panel</message>
@JQL
JQL / NetBeans9Plugins
Last active May 11, 2021 05:08
How to add HTML, PHP and C++ plus other Plugins to Apache NetBeans 9.0 on Windows, MacOS and Linux.
__How to add HTML, PHP and C++ plus other Plugins to Apache NetBeans 9.0 on Windows, MacOS and Linux.__
### COMMANDS & LINKS: ###
NetBeans IDE 8.2 Plugin Centre : http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz
NetBeans Transition from Oracle: https://cwiki.apache.org/confluence/display/NETBEANS/Apache+Transition
Apache Transition Documentation: https://cwiki.apache.org/confluence/display/NETBEANS/Apache+Transition
@JQL
JQL / Database_Basic.md
Created March 10, 2019 19:49
Create a basic database and the MVC files required to access the data in Yii2

Yii2 Database (basic)

Database Table

 CREATE TABLE `country` (
  `code` CHAR(2) NOT NULL PRIMARY KEY,
  `name` CHAR(52) NOT NULL,
  `population` INT(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@JQL
JQL / InstallXAMPP
Last active March 2, 2019 13:44
How to correctly install XAMPP and check that it is properly installed
Installing XAMPP
How to correctly install XAMPP and check that it installed correctly. Also, how to add the XAMPP control panel to the Menu and Quick Launch Bar on Linux.
The commands needed and instructions are shown below:
COMMANDS & LINKS:
XAMPP : https://www.apachefriends.org/
@JQL
JQL / config.md
Last active February 25, 2019 21:43
Configuring Yii2 Basic (in NetBeans IDE)

1. Virtual Host

C:\xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    ##ServerAdmin webmaster@tutorial
    DocumentRoot c:/xampp/htdocs/tutorial
    ServerName tutorial
    ServerAlias tutorial.local
</VirtualHost>
@JQL
JQL / InstallingLinuxMintSoupToNuts.md
Last active February 2, 2019 18:19
How to fully install and configure Linux Mint on your computer

Installing Linux Mint "Soup to Nuts"

Watch the video: []

Preparation:

  1. Your data securely Backed-up (A USB Drive would be good)
    Suitable USB external Hard Drives:
@JQL
JQL / OpenJDK11
Created November 3, 2018 15:43
Solving the OpenJDK 11 Mystery - Linux
Did you use "sudo apt-get install openjdk-11-jdk" to install OpenJDK only to find you've got OpenJDK 10 installed instead?
Here's the solution:
1. Open Terminal
2. Add OpenJDK's PPA : sudo add-apt-repository ppa:openjdk-r/ppa \
3. Update the repository: sudo apt-get update
4. Install OpenJDK 11 : sudo apt install openjdk-11-jdk
@JQL
JQL / CreateNewGitRepo
Last active September 15, 2018 14:23
Creating a GitHub Repository and Pushing and Pulling the Repository
###Creating a GitHub Repository and Pushing and Pulling the Repository###
**Warning**: Never git add, commit, or push sensitive information to a remote repository. Sensitive information can include, but is not limited to:
Passwords
SSH keys
AWS access keys
API keys
Credit card numbers
PIN numbers