Skip to content

Instantly share code, notes, and snippets.

View whatafunc's full-sized avatar
🍭
Web development using PHP, Golang & Node.js for backend

Dmitriy I. whatafunc

🍭
Web development using PHP, Golang & Node.js for backend
View GitHub Profile
@whatafunc
whatafunc / readme.modx-revolution.install.txt
Created December 22, 2023 08:42
MODX Revolution is a CMS written in PHP and it's recent version do support php 8.2.
MODX Revolution is a CMS written in PHP and it's recent version do support php 8.2.
There is a confedence it's support will be continued so just in case a small guide how you can deploy it on your Digitalocean cloud or other vps
Let's go:
$ apt-get install php8.2 php8.2-mysql mysql-server
# download modx revolution from http://modxcms.com
$ cd /var/www
$ unzip /home/ubuntu/modx-2.8.6-pl.zip
$ mv modx-2.8.6-pl modx
$ cd modx
@whatafunc
whatafunc / gist:1ab8656888b9ec13000558b062912f88
Created April 12, 2024 07:13
Support for nano editor in *nix of CSS, PHP, C / C ++, HTML, Python, etc.
To achieve this for all the above languages, here are the steps:
1. Open a terminal, in it write the following and press [enter]:
cd $HOME/ && wget https://blog.desdelinux.net/wp-content/uploads/nanorc.nanorc && mv nanorc.nanorc .nanorc
2. Once this and pressed [enter], the terminal will be closed.
3. Open another terminal, and try the following:
nanotest.html
@whatafunc
whatafunc / redis-glue-test.php
Last active August 7, 2024 09:19 — forked from raphaelstolt/redis-glue-test.php
Redis installation test script
<?php
define('TEST_KEY', 'are_we_glued');
$redis = new Redis();
try {
$redis->connect('localhost', 6379);
$redis->set(TEST_KEY, 'yes');
$glueStatus = $redis->get(TEST_KEY);
if ($glueStatus) {
$testKey = TEST_KEY;
echo "Glued with the Redis key value store:" . PHP_EOL;
@whatafunc
whatafunc / .DS_Store
Last active April 25, 2025 08:25
Golang vs PHP
@whatafunc
whatafunc / gist:9eea50f58eeec4a8c3f8f70ed3f1dd67
Created June 7, 2026 14:17
Fix CentOS 7 repo to link to vault repos && install KVM/virtualization Python library
#!/bin/bash
sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo
sed -i 's/^mirrorlist=http/#mirrorlist=http/g' /etc/yum.repos.d/*.repo
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
sed -i 's/^metalink=/#metalink=/g' /etc/yum.repos.d/epel*.repo
sed -i 's|http://download.fedoraproject.org/pub/epel|https://archives.fedoraproject.org/pub/archive/epel|g' /etc/yum.repos.d/epel*.repo
sed -i '/\[base\]/,/enabled=/ s/enabled=0/enabled=1/' /etc/yum.repos.d/CentOS-Base.repo
yum clean all