Hashid is a Laravel package, which encode/decode id of Laravel model and get hashed/unhashed version. It is useful when we want to hide the actual id of db object so that users don’t know the real id. composer require vinkla/hashidsphp artisan vendor:publish This will create a config/hashids.php file in your app that you can modify to set …
Unexpected behavior of PostgreSql
When you sort data in PostgreSql, using `order by` clause, its behavior is special. When there are null values in the column data, `order by column DESC` puts null values first. For example, there are only 4 rows with values ‘1’, ‘2’, ‘3’, null for column ‘A’, if developer uses `order by A DESC`, row …
NestJS
Nest (NestJS) is a framework for building efficient, scalable Node.js server-side applications. In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front and backend applications. This has given rise to awesome projects like Angular, React and Vue, which improve developer productivity and enable the creation of fast, testable, and extensible frontend …
Using LaravelCollective
This is a set of packages to help us working with HTML, Remote, Annotations and Errors in Laravel. How to install composer require laravelcollective/html Basic Usage Opening a form tag:{!! Form::open([‘url’ => ‘foo/bar’]) !!} Generating a drop-down list: {!! Form::select(‘size’, [‘L’ => ‘Large’, ‘S’ => ‘Small’]) !!} Documentation For further information, please check this documentation: https://laravelcollective.com/docs/6.0/html
The exponential backoff algorithm in Go
This is a Go port of the exponential backoff algorithm from Google’s HTTP Client Library for Java. Exponential backoff is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate. The retries exponentially increase and stop increasing when a certain threshold is met. Usage Import path …
SoapUI – Postman for SOAP / REST API
SoapUI is a tool for testing Web Services; these can be the SOAP Web Services as well RESTful Web Services or HTTP based services. SoapUI is an Open Source and completely free tool with a commercial companion -SoapUI Pro- that has extra functionality for companies with mission critical Web Services. What can I use SoapUI …
Big Blue Button
BigBlueButton is an open source web conferencing system. BigBlueButton supports real-time sharing of audio, video, slides (with whiteboard controls), chat, and the screen. Instructors can engage remote students with polling, emojis, multi-user whiteboard, and breakout rooms. Presenters can record and playback content for later sharing with others. FREE, OPEN SOURCE, NO DEPENDENCY
KNEX JS
Knex.js 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.
google oauth2 – googleapis
We can use googleapis npm to implement google oauth2 functionality.Main thing is to create new one by refresh token when access token is expired. Get authorization code from client. Get refresh token from authorization code. Add following code to generate access token automatically when it is expired oauth2Client.on(‘tokens’, (tokens) => { if (tokens.refresh_token) { // store the refresh_token in my database! console.log(tokens.refresh_token); } console.log(tokens.access_token);});
FingerprintJS, fraud detection + user identification JS
FingerprintJS Pro is a combination of a JavaScript agent that runs in the browser and a server-side storage and API system that securely identifies visitors and stores all the information you need to detect fraud. Business scenarios where FingerprintJS Pro can help Catch bots trying to automatically input many usernames and passwords into your login …