Skip to content

Instantly share code, notes, and snippets.

View josephmtinangi's full-sized avatar

Joseph Mtinangi josephmtinangi

View GitHub Profile
@Bill-tran
Bill-tran / how-to-install-openssl-1.1.1-on-centos-7.md
Created September 7, 2021 09:22
How to install openssl 1.1.1 on CentOS 7

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.1-curl php7.1-cli php7.1-dev php7.1-gd php7.1-intl php7.1-mcrypt php7.1-json php7.1-mysql php7.1-opcache php7.1-bcmath php7.1-mbstring php7.1-soap php7.1-xml php7.1-zip -y
sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
sudo apt-get install libapache2-mod-php7.1 -y
sudo cp /etc/apache2/envvars.bak /etc/apache2/envvars
@mahamuniraviraj
mahamuniraviraj / installLatestGitOnCentOs7.txt
Created May 10, 2017 19:56
Install Latest Git On Cent OS 7
# Centos 7.3 comes with 1.8.3
# so update git from centos repo
yum update git
# it shows nothing to update
# we download git source and build and install latest git on Centos 7.3
@c0rp-aubakirov
c0rp-aubakirov / ClientInfo.java
Last active March 29, 2024 06:50
How to get full client info using servlet request, including client IP, browser, os, use-agent and referer
public void printClientInfo(HttpServletRequest request) {
final String referer = getReferer(request);
final String fullURL = getFullURL(request);
final String clientIpAddr = getClientIpAddr(request);
final String clientOS = getClientOS(request);
final String clientBrowser = getClientBrowser(request);
final String userAgent = getUserAgent(request);
logger.info("\n" +
@marcosvidolin
marcosvidolin / kill_port_process.sh
Last active June 8, 2021 10:34
Linux: How to list and kill a process using a port
# to list all ports that are used
sudo netstat -ntlp | grep LISTEN
# you can obtain a specific port using the following command
sudo netstat -ntlp | grep :8080
# when you execute the command above you will see something like that
tcp 0 0 0.0.0.0:27370 0.0.0.0:* LISTEN 4394/skype
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 2216/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4912/cupsd