Skip to content

Instantly share code, notes, and snippets.

@brunoleles
brunoleles / README.md
Last active November 13, 2025 01:19
Install PHP 7.1 - Ubuntu

Install PHP 7.1 - Ubuntu

Assumptions

  • Apache2 is already installed

Steps

Adding packages repositories and dependencies

@brunoleles
brunoleles / README.md
Last active May 9, 2021 04:04
Workaround: Uncaught Error: Call to undefined function xdebug_is_enabled()

workaround - function "xdebug_is_enabled" has been deprecated

<?php
if (!function_exists('xdebug_is_enabled')) {
	function xdebug_is_enabled() {
		if (ini_get('xdebug.mode') === 'develop') {
			return true;
		}
 return false;
@brunoleles
brunoleles / README.md
Last active December 13, 2021 02:41
git - reset only file permissions, keep content modifications
@brunoleles
brunoleles / README.md
Last active March 24, 2022 23:22
Modify Apache2 Server Header (Ubuntu)

Modify Apache 2 Server Header

Check if mod_security2

$> ls -lah /etc/apache2/mods-available/ | egrep "security"
-rw-r--r-- 1 root root  551 Mar 24 22:43 security2.conf
-rw-r--r-- 1 root root   91 Sep 28  2017 security2.load
@brunoleles
brunoleles / readme.md
Created April 18, 2023 14:18
Ubuntu - SSH Keep Alive
  • Open: /etc/ssh/sshd_config
  • Change:
    • TCPKeepAlive yes
    • ClientAliveInterval 100 (desired interval in seconds )
  • Restart ssh service (mine was, sudo service ssh restart )
  • To validade, open a ssh coneection and on other terminal, run sudo tcpdump -n -tttt
@brunoleles
brunoleles / Android (allow screen capture cast).md
Last active January 25, 2025 13:20
Android (allow screen capture cast)
@brunoleles
brunoleles / readme.md
Created June 11, 2024 13:19
Mongodb Logrotate config example

Mongodb Logrotate config example

Mongodb don't rotate automaticaly its logs, this config to lofrotate does the trick

# File: /etc/logrotate.d/mongodb
/var/log/mongodb/mongod.log {
        daily
        missingok
 rotate 14
@brunoleles
brunoleles / readme.md
Last active August 20, 2025 19:07
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXX

Problem

$> sudo apt update
...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 InRelease: The following signatures couldn\'t be verified because the public key is not available: NO_PUBKEY 6A26B1AE64C3C388