Skip to content

Instantly share code, notes, and snippets.

Guljar Prasad guljarpd

  • Rivi
  • Bengaluru, India
Block or report user

Report or block guljarpd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AWS-Lambda-Function-For-Cognito.js
/* ----------------------------------- preSignUp -------------------------------------------*/
exports.handler = async (event) => {
// Confirm the user
event.response.autoConfirmUser = true;
// Set the email as verified if it is in the request
if (event.request.userAttributes.hasOwnProperty("email")) {
event.response.autoVerifyEmail = true;
guljarpd /
Created Aug 21, 2019
migrate redis db to another redis db.
#source DB (localhost or IP)
#target DB (localhost or IP)
guljarpd / Guardian
Created Jan 18, 2019 — forked from nikneroz/Guardian
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.
View Guardian

Elixir + Phoenix Framework + Guardian + JWT + Comeonin

Preparing environment

We need to generate secret key for development environment.

mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf

Let's generate User model and controller.

guljarpd / mentions.js
Created Dec 1, 2018 — forked from nicubarbaros/mentions.js
Draft Js Mentions
View mentions.js
import { convertFromRaw, convertToRaw, ContentState } from 'draft-js';
const getIndicesOf = (searchStr, str, caseSensitive) => {
let tempStr = str;
let tempSearchStr = searchStr;
const searchStrLen = tempSearchStr.length;
if (searchStrLen === 0) {
return [];
let startIndex = 0;
guljarpd /
Created May 2, 2018 — forked from nrollr/
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
$ sudo yum install nginx -y
## Install PHP and PHP-FPM
$ sudo yum install php -y
$ sudo yum install php-fpm -y
## Configure NGINX (see below)
$ sudo nano /etc/nginx/conf.d/default.conf
You can’t perform that action at this time.