Skip to content

Instantly share code, notes, and snippets.

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

Dmitriy I. whatafunc

🍭
web development using PHP & Node.js for backend
View GitHub Profile
@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 / 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 / countrydropdown.html
Created October 12, 2023 07:31 — forked from danrovito/countrydropdown.html
HTML Country Select Dropdown List
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span>
<select id="country" name="country" class="form-control">
<option value="Afghanistan">Afghanistan</option>
<option value="Åland Islands">Åland Islands</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
@whatafunc
whatafunc / composer.json
Created October 11, 2023 15:03
composer.json example for developing a module for OC and test it by PHPUnit tests
{
"name" : "whatafunc/opencart-project",
"description": "develop some bespoke functionality and test it with automatic testing such as PHPUnit tests",
"homepage" : "localhost:8000",
"license" : "",
"require-dev" : {
"robmorgan/phinx": "^0.9.2",
"squizlabs/php_codesniffer" : "*"
},
$data = [
[
'sku' => 'test2',
'name' => 'Big TV',
'description' => 'ma tEsEt descr',
'price' => 15000, // in cents
'sale_price' => 129900,
'sale_price_from' => '2019-08-07 18:11:31+02:00',
'sale_price_until' => '2019-10-01 01:00:00+02:00',
'stock' => 14,
@whatafunc
whatafunc / gist:78c37d042af273f339e2618d817eb6d0
Last active September 20, 2023 13:48
Speedtest® CLI install for MAC OSX
Speedtest® CLI for MAC OSX:
brew tap teamookla/speedtest
brew update
# Example how to remove conflicting or old versions using brew
# brew uninstall speedtest --force
# brew uninstall speedtest-cli --force
brew install speedtest --force
Speedtest® CLI for CentOS
# If migrating from prior bintray install instructions please first...
/*some common breakpoints for widths of devices:
320px — 480px: Mobile devices
481px — 768px: iPads, Tablets
769px — 1024px: Small screens, laptops
1025px — 1200px: Desktops, large screens
1201px and more —  Extra large screens, TV
*/
#xmods-twttr-footer{
padding-bottom: 30px;
@whatafunc
whatafunc / MODX Revo Git installation
Created August 18, 2022 12:45
install MODX revolution via github
The following is OK for MODX 2.8.x and 3.x installations using git
https://docs.modx.com/3.x/en/getting-started/installation/git#alternative-using-create-project
git clone http://github.com/modxcms/revolution.git -b 3.x www
curl -sS https://getcomposer.org/installer -o ./composer-setup.php
php7.4 composer-setup.php
php7.4 composer.phar
php7.4 composer.phar install
@whatafunc
whatafunc / mail-test.php
Created August 10, 2022 06:20 — forked from Dreyer/mail-test.php
Quick & Dirty PHP Mail Test Script
<?php
/*
DONT FORGET TO DELETE THIS SCRIPT WHEN FINISHED!
*/
ini_set( 'display_errors', 1 );
error_reporting( E_ALL );
$from = 'webmaster@example.com';
@whatafunc
whatafunc / nginx_nodejs.md
Created August 5, 2022 11:16 — forked from MoonFoxy/nginx_nodejs.md
Сервер в связке Nginx + NodeJs

Сервер в связке Nginx + NodeJs

Данная пошаговая инструкция поможет освоить основы на простом примере

Для справки

Сервер поднимался на Debian 8 c характеристиками:

CPU - 1 ядро x 500 МГц