Skip to content

Instantly share code, notes, and snippets.

View jsivakumaran's full-sized avatar

J Sivakumaran jsivakumaran

  • AAFC
  • Ottawa, Canada
View GitHub Profile
cy.checkA11y({
runOnly: {
type: "tag",
values: ["wcag2a", "wcag2aa"]
}
});
@jsivakumaran
jsivakumaran / webdriver-offline-setup
Created February 14, 2017 18:09
WebDriver.io offline setup
1. Install yarn
A. yarn config set yarn-offline-mirror ./npm-packages-offline-cache
B. yarn install
2. Download Selenium-stanlone-server into root project folder
3. Download geckodriver into root project folder
4. In one PowerShell -> java -jar selenium-server-standalone-3.0.1.jar
5. In a second PowerShell -> npm test
@jsivakumaran
jsivakumaran / ases
Created September 19, 2016 14:50
Amazon SES
1. Create AWS Account
2. From Admin Console Create an SES Account
3. Verify your account using your email or phone number
4. Ask for permission from Amazon to send emails to email addresses that have not asked for permission
The key to getting permission is to say that you will not be sending emails to complete strangers (no spamming)
5. Send email requests to people that need their emails in the sent-from field (they must click on the link or amazon will not allow
the emails to go through.
1. Edit the host, username and password on common\config\main-local.php
A. Replace them with the host, username and password gotten from AWS SES
?XDEBUG_SESSION_START=netbeans-xdebug
<?php
$membershipFee = ArrayHelper::map(Fee::find()->joinWith('feeLists')->where(['fee_list_id'=>$membership->fee_list_id])->orderBy('name')->all(), 'id', 'name');
// echo $form->field($memberEnroll, 'id[]',['inputOptions' => ['class' => 'form-control','id'=>'fee-id','tabindex'=>4]])->dropDownList($membershipFee)->label('Membership Fee');
echo Select2::widget([
'model' => $memberEnroll,
'attribute' => 'id[]',
'data'=> ArrayHelper::map($fees, 'id', 'name'),
'options' => [
'placeholder' => 'Select Complex ...', 'multiple' => false,
'class' => 'col-md-3',
@jsivakumaran
jsivakumaran / installSilverSearcherOnCentoOS
Created June 17, 2016 03:16
Installing ag on CentOS
Installing ag on CentOS
Prerequistes
$ sudo yum install -y pcre-devel
$ sudo yum install xz-devel
$ cd /usr/local/src
$ sudo git clone https://github.com/ggreer/the_silver_searcher.git
@jsivakumaran
jsivakumaran / Using Gii Generator
Last active May 11, 2016 18:35
Gii Generate Model and CRUD Templates
To Get to the Generator
xx.xx.xx.xx/frontend/web/gii
To Create a Model
1. Create a migration script in /console/migrations
2. ./yii migrate up
3. Head to /frontend/web/gii - click Model Generator - Table Name && Class Name are obvious - Namespace - common\models\ar
4. Click Preview - then if everything looks good - Click Generate.
To Create a CRUD
1. MySQL Slow Query Log - to get mysql to write every queries that take over a certain amount of time
2. XHProf - Profiling with XHProf - See where the performance issues are
3. Redis - cache queries so that the performance hit of database query is not paid a second time.
4. Load Testing with Seige + monitoring with Appneta Traceview (or as an alternative New Relic or App Dynamics)
5. Continous Integration - (Jenkins, Travis, phpUnderControl, PHPCI, CircleCI etc.)
6. Automated Testing - Codeception (Acceptance and Unit Tests)
7. PHP7
8. Use Git - /w pull requests - so that code is reviewed before being pushed up - (another person is in charge of ensuring that the
functionality works & is refactored & tests present before making it into the code base)
9. SASS
@jsivakumaran
jsivakumaran / codeception on yii2 advanced project
Last active June 17, 2016 15:22
Install Codeception on yii2 project
Step 1.
//install the plugins
composer global require "codeception/codeception=2.0.*"
composer global require "codeception/specify=*"
composer global require "codeception/verify=*"
Step2.
//Might need to install missing php-xml if needed
Step3.