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 / 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 / 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
@JQL
JQL / NetBeansTemplates
Created September 3, 2018 19:04
Creating and Updating NetBeans Templates
Do you need to Create and Update the NetBeans Templates? Creating and Updating NetBeans Templates is very easy and in this video we show you how.
NetBeans Template Variables: http://wiki.netbeans.org/FaqTemplateVariables
Here are some suggested templates
1. Default Licence Template:
<#setting locale="en_GB">
<#if licenseFirst??>
@JQL
JQL / NetBeans8.2Plugins
Created August 30, 2018 19:11
Which NetBeans Plugins should you install for PHP and HTML?
So, which NetBeans Plugins should you install for PHP and HTML? We look at the ones I've installed. We also look at changing the netbeans.conf file (in the netbeans-8.2/etc directory). We also look at updating the Plugins and how to download a Plugin from the NetBeans Plugin Repository.
If you've downloaded and installed just the HTML and PHP version of NetBeans 8.2, which NetBeans Plugins should you install?
Here are my recommendations:
C/C++
Color Codes Preview
ESLint
Emmet
@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 / NetBeans9Linux
Last active September 10, 2018 08:25
How to Install Apache NetBeans (incubating) 9.0 on Linux (Ubuntu and Linux Mint 19)
NetBeans is, at the time of writing, in the process of being transfered from Oracle to Apache. Therefore, things ARE GOING TO change and change rapidly. So please check back regularly.
See the video : https://youtu.be/1uU9Toj9zXk
1. Update your repositories:
sudo apt-get update && sudo apt-get upgrade
2. Check if you have java installed:
which java
If java is installed then check the version:
java -version