Sometimes we face situations when all the tests are passing, we find no bugs, but still, on our users’ part, something broke. By impersonating our users, we can see what they see and track the bugs down easily. We can use laravel-impersonate package for this use case. https://github.com/404labfr/laravel-impersonate The installation and configuration is described in …
How to use private package on github action
Github provides github action for CI/CD. For the CI, we could meet some cases to use private packages. In this case, npm run install will have permission problem. So, we need to set ssh agent. – name: Set ssh agent uses: webfactory/ssh-agent@v0.4.1 with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} Then it will work for a private repository. …
AWS CloudFormation
AWS CloudFormation gives you an easy way to model a collection of related AWS and third-party resources, provision them quickly and consistently, and manage them throughout their lifecycles, by treating infrastructure as code. A CloudFormation template describes your desired resources and their dependencies so you can launch and configure them together as a stack. You …
Yup
Yup is a JavaScript schema builder for value parsing and validation. Define a schema, transform a value to match, validate the shape of an existing value, or both. Yup schema are extremely expressive and allow modeling complex, interdependent validations, or value transformations. Yup’s API is heavily inspired by Joi, but leaner and built with client-side validation …
Make a mapping object from an array of objects using Reduce function in Javascript
Sometimes, we face some usecases to make a mapping object from an array of object. For example, we have a Users array, we need to find a user by tagId. Here tagIdis supposed to be unique. Generally, we may try to use array.find() function to find the object with tagId. But using array.reduce()function in Javascript, …
Slate.js
Slate.js is a rich text editor library similar to Draft.js The most important feature of slate.js is strong customizability. Slate.js itself provides very rich functionalities and we can add our plugin to slate.js very easily. Disadvantage of this library is steep learning curve. More details can be found here: https://docs.slatejs.org/
MailSlurper
MailSlurper is a small SMTP mail server that slurps mail into oblivion! MailSlurper is perfect for individual developers or small teams writing mail-enabled applications that wish to test email functionality without the risk or hassle of installing and configuring a full blown email server. It’s simple to use! Simply setup MailSlurper, configure your code and/or …
Knex.js
Knex.js (pronounced /kəˈnɛks/) is a “batteries included” SQL query builder for Postgres, MSSQL, MySQL, MariaDB, SQLite3, Oracle, and Amazon Redshift designed to be flexible, portable, and fun to use. It features both traditional node style callbacks as well as a promise interface for cleaner async flow control, a stream interface, full featured query and schema builders, transaction support (with savepoints), connection pooling and standardized responses between different query clients and dialects. The project is hosted on GitHub, and …
Laravel Sanctum
Laravel Sanctum provides a featherweight authentication system for SPAs (single page applications), mobile applications, and simple, token based APIs. Sanctum allows each user of your application to generate multiple API tokens for their account. These tokens may be granted abilities / scopes which specify which actions the tokens are allowed to perform. How It Works …
SCORM
Shareable Content Object Reference Model is a collection of standards and specifications for web-based electronic educational technology. It defines communications between client side content and a host system, which is commonly supported by a learning management system What is SCORM? SCORM is a set of technical standards for eLearning products. It provides the communication method …