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 / BasicToken.sol
Created October 17, 2017 06:18 — forked from anonymous/BasicToken.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.17+commit.bdeb9e52.js&optimize=undefined&gist=
pragma solidity ^0.4.15;
import './ERC20Basic.sol';
import './SafeMath.sol';
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
@whatafunc
whatafunc / Model_Repo_RelatedProfile.php
Created March 20, 2018 11:50
XC5 module for marking customers related when needed so that the admin knows which clients are in fact from the same company
<?php
namespace XLite\Module\RealData\Related\Model\Repo;
/**
* Profile relations repository
*/
class ProfileRelation extends \XLite\Model\Repo\ARepo
{
/**
@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 МГц

@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 / 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
/*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 / 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...
$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 / 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" : "*"
},
@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>