<activity android:name=".PackageInstallerActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="content" />
<data android:scheme="file" />
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function xrange($start, $limit, $step = 1) { | |
if ($start < $limit) { | |
if ($step <= 0) { | |
throw new LogicException('Step must be +ve'); | |
} | |
for ($i = $start; $i <= $limit; $i += $step) { | |
yield $i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================= | |
ONLINE RESOURCES: | |
======================= | |
SECTION 1 - OVERVIEW - COURSE INTRODUCTION | |
======================================== | |
- understand the Magento architecture and modules | |
- efficiently and effectively customize and extend Magento | |
- enable the best upgrade path to new versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Java install === | |
java zookeeper-3.4.10.jar | |
sudo apt-add-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
sudo apt install oracle-java8-set-default | |
export JAVA_HOME=/usr/lib/jvm/java-8-oracle | |
sudo update-alternatives --config java | |
sudo update-alternatives --config javac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://github.com/lupomontero/psl/blob/master/index.js | |
class Domain | |
{ | |
protected ?string $input = null; | |
protected $tld = null; | |
protected $sld = null; | |
protected $domain = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$message = \Swift_Message::newInstance() | |
->setSubject('Hello Email') | |
->setFrom('send@example.com') | |
->setTo('recipient@example.com') | |
->setBody('You should see me from the profiler!') | |
; | |
$this->get('mailer')->send($message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API PLATFORM | |
https://api-platform.com | |
https://github.com/api-platform/api-platform | |
### Install ### | |
composer create-project api-platform/api-platform bookshop-api | |
bin/console doctrine:database:create | |
bin/console server:run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add eio so file in php.ini | |
var_dump(extension_loaded('eio')); | |
// sudo pecl install eio-1.2.5 | |
// add extension in php.ini extension=eio.so | |
/* Is called when eio_nop() finished */ | |
function my_nop_cb($data, $result) { | |
sleep(1); | |
echo "my_nop ", $data, "\n"; | |
sleep(2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install react-i18next i18next --save | |
npm install i18next-http-backend i18next-browser-languagedetector --save | |
Create i18nextConf.js in a root: | |
``` | |
import i18n from 'i18next'; | |
import { initReactI18next } from 'react-i18next'; | |
import Backend from 'i18next-xhr-backend'; | |
import LanguageDetector from 'i18next-browser-languagedetector'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const required = value => (value || typeof value === 'number' ? undefined : 'Required'); | |
const maxLength = max => value => | |
value && value.length > max ? `Must be ${max} characters or less` : undefined; | |
const maxLength15 = maxLength(15); | |
export const minLength = min => value => | |
value && value.length < min ? `Must be ${min} characters or more` : undefined; | |
export const minLength2 = minLength(2); | |
const number = value => | |
value && isNaN(Number(value)) ? 'Must be a number' : undefined; | |
const minValue = min => value => |
NewerOlder