React Table

React Table - A lightweight, fast and extendable datagrid for React. https://github.com/react-tools/react-table https://react-table.js.org/#/story/readme

» Read more

PHP 7.2 for Ubuntu

1. Add PPA ondrej/php sudo add-apt-repository ppa:ondrej/php sudo apt update 2. Current PHP packages dpkg -l | grep php | tee packages.txt 3. Install PHP 7.2 sudo apt install php7.2 php7.2-common php7.2-cli php7.2-fpm If you are using Apache with prefork MPM (type apachectl -V to see the MPM used), you’d need to install libapache2-mod-php7.2 instead of php7.2-fpm. 4. Install additional modules Take a look at the packages.

» Read more

Auryn Dependency Injector

A dependency injector resolves the dependencies of your class and makes sure that the correct objects are injected when the class is instantiated. Basic Instantiation If a class only asks for concrete dependencies you can use the Injector to inject them without specifying any injection definitions: class SomeDep {} class AnotherDep {} class MyClass { public $dep1; public $dep2; public function __construct(SomeDep $dep1, AnotherDep $dep2) { $this->dep1 = $dep1; $this->dep2 = $dep2; } } $injector = new Auryn\Injector; $myObj = $injector->make('MyClass'); In this scenario you can use the Injector to automatically provision MyClass with the required SomeDependency and AnotherDependency class instances.

» Read more

virtualenv

virtualenv lets you create virtual Python environments. Everything you install or remove in that environment stays there and other environments are not affected. Most importantly, you don’t pollute the global package directory of your system. Create an Environment virtualenv my_blog_environment Exploring the Virtual Environment cd my_blog_environment/ source bin/activate The activate script will also modify your shell prompt to indicate which environment is currently active. To undo these changes to your path (and prompt), just run:

» Read more

Automated Tests with pywatch

Run My tests require SQLite. Let’s install it first: sudo apt-get install php-sqlite3 Now we can run tests with: ./vendor/bin/phpunit Automate We can use a utility called pywatch to run a command when files are changed. Here’s how we create a new Laravel project and run unit tests automatically when they’re updated: cd ~/Sites composer create project laravel/laravel docker-testing cd docker-testing virtualenv .venv source .venv/bin/activate pip install pywatch pywatch .

» Read more

spintax

Use spintax to write variations of an article description. So product descriptions should be: well written grammatically correct fairly unique Link: http://www.spintaxtool.com/ Examples: https://searchwilderness.com/blackhat-article-spinning-spintax-white-seo

» Read more

BEM

BEM (Block, Element, Modifier) is an open source technology for developing websites that need to be created quickly and maintained over many years. BEM is used in the frontend development of all Yandex services. https://tech.yandex.com/bem/ Block A functionally independent page component that can be reused. In HTML, blocks are represented by the class attribute. <!-- Correct. The `error` block is semantically meaningful --> <div class="error"></div> <!-- Incorrect. It describes the appearance --> <div class="red-text"></div> Element A composite part of a block that can’t be used separately from it.

» Read more

FrozenTimeLocal for CakePHP

Modify default DateTime type to return localized date with timezone. class FrozenTimeLocal extends FrozenTime { public function __toString() { return $this->i18nFormat('dd MMM HH:mm', 'Asia/Dhaka', 'ru_Ru'); } } External: Stackoverflow - CakePHP 3 time column gets date added

» Read more