Labels

Android (1) bash (2) boost (2) C (34) C++ (2) cheatsheet (2) CLion (6) css (3) Debian (33) DL (17) Docker (1) Dreamweaver (2) Eclipse (3) fail2ban (4) git (5) GitHub (4) Hacking (3) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (30) javascript (3) Linux (164) Mac (19) Machine Learning (1) mySQL (47) Netbeans (4) Networking (1) Nexus (1) OpenVMS (6) Oracle (1) Pandas (3) php (16) Postgresql (8) Python (9) raid (1) RedHat (14) Samba (2) Slackware (45) SQL (14) svn (1) tar (1) ThinkPad (1) Virtualbox (3) Visual Basic (1) Visual Studio (1) Windows (2)

Monday 31 August 2020

Sunday 30 August 2020

Install Java 8 on Debian

The following can be used to install Java 1.8 on Debian 10

From the following link;

https://adoptopenjdk.net/installation.html?variant=openjdk8&jvmVariant=hotspot#x64_linux-jdk




1) wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -

2) sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

If the above fails;

2) - (optional) sudo apt-get install -y software-properties-common

3) sudo apt-get install adoptopenjdk-8-hotspot



both java installations (assuming the default was installed) can be found in /usr/lib/jvm

Also, mind update netbeans.conf (probably in /usr/local/netb*/etc/) to point to java 8 as opposed to (11 for example), assuming we're using NB8.2

Failure to do the above may not prevent NB from launching but may well prevent you from Creating a New Project


Wednesday 26 August 2020

start/stop apache on Mac


sudo apachectl start

sudo apachectl stop

also note

brew services 

PHP install on MacOS with note on Debian 10.5

For Mac with Home-brew

brew install php

After install with Home-brew, the location of both the default and new install can be seen below;


the latter is the original Mac install.

Also see here

For Debian;


sudo apt-get install php

then

sudo apt-get install php7.3-cgi

Note, replace the 7.3 with whatever php version was installed in the previous step.

This can be checked by

php -version

or

dpkg -s php



Sunday 23 August 2020

C++ File structure in both Netbeans and CLion

Below shows the file structure of a simple C++ application in both Netbeans and CLion (on a Mac).


Friday 21 August 2020

Debian 10 install on Thinkpad p53


The following is my account of installing Debian 10.5 onto a Lenovo ThinkPad P53




Wednesday 19 August 2020

Tuesday 18 August 2020

Gascut stamping instructions

How to populate Gas Cut stamping if this has not been completed automatically.

Sunday 16 August 2020

Linux Display Managers


Debian/Ubuntu

/etc/X11/default-display-manager

RedHat/CentOS/Fedora

/etc/sysconfig/desktop

OpenSuSe

/etc/sysconfig/displaymanager


OR on systemd systems, do;


systemctl status display-manager


To switch Display Managers (Debian)

sudo dpkg-reconfigure <displayManagerName>

Actually with the above, we can use any installed DisplayManager and then from the prompt, simply choose the one we wish to switch to.

To restart the Display Manager (Debian), do;

sudo service <displayManager> restart

Example: sudo service gdm restart



See also here 

and here for the good old RedHat logo, which is a must for any Applications Menu logo.

Saturday 15 August 2020

Linux - UEFI or Legacy boot.

To find out whether we are booted in UEFI or Legacy mode, so;

[ -d /sys/firmware/efi ] && echo UEFI || echo Legacy

Basically, if the refi file exists, we are in UEFI mode.

I'm not sure if the /sys folder is even there on < 2.6 kernels, it doesn't appear on my Slackware 8.1 (specifically for the SCS machine).

Thursday 13 August 2020

Some apt-get stuff



To search for packages, do;


apt-cache search package

To update package list, do;


apt-get update

 

See also here

 

Wednesday 12 August 2020

Kill a running query in mysql

If we are finding that we are struggling to connect to a MySQL database, it can be a result of a long running query and this can usually be terminated as follows;

Firstly, login to the MySQL database and run;

show processlist;

We can then kill the process bu the ID as follows;

kill id;

This can be verified bu again running show processlist; to ensure that the query has indeed been stopped.