Skip to content

Instantly share code, notes, and snippets.

View netplayer's full-sized avatar
🏠
Working from home

NetPlayer netplayer

🏠
Working from home
View GitHub Profile
@netplayer
netplayer / root server
Created September 4, 2023 11:32
fresh debian server install permission denied (public key)
First, check to see if you can find out why you can't connect. This command will tell you everything that SSH is trying to do and trying to check when accessing your Linode:
$ ssh -vvv account@your-ip
Then, you can try logging into your Linode with the following SSH command:
$ ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no account@your-ip
@netplayer
netplayer / gist:a880de2b89a592859993aa0c47878d1e
Last active September 30, 2025 09:52
Firewalld - block ip's F I R E W A L L --------------------------------------- F I R E W A L L ------------------------------------
FOR SINGLE IP:
firewall-cmd --permanent --zone=drop --add-rich-rule="rule family='ipv4' source address='xxx.xxx.xxx.xxx' reject"
firewall-cmd --reload
FOR RANGE AND BULK:
SETUP:
The Firewalld way:
@netplayer
netplayer / gist:4fb1defb5464eee7dc7e5a81ac1678af
Last active February 22, 2025 19:10
disable php5 enable php7
Interactive switching mode
---------------------------
sudo update-alternatives --config php
Manual Switching
----------------=
sudo a2dismod php5
sudo a2enmod php7.0
@matchaxnb
matchaxnb / prestashop-lib.php
Created May 28, 2015 18:22
Library to manipulate Prestashop from scripts
<?php
/**
prestashop-lib — © 2015 Chloé Tigre Rouge <chloe@tigres-rouges.net>
This is licensed under the same terms as Prestashop.
PrestaShop library to create products, categories and all sorts of things
programmatically by passing arrays around
It needs a bootstrapped PrestaShop framework (you can get one by defining
_PS_ROOT_DIR_ and by a
require_once(_PS_ROOT_DIR_.'config/config.inc.php');