Skip to content

Instantly share code, notes, and snippets.

Avatar

Guljar Prasad guljarpd

  • Rivi
  • Bengaluru, India
View GitHub Profile
@guljarpd
guljarpd / Guardian JWT.md
Created Jan 18, 2019 — forked from nikneroz/Guardian JWT.md
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.
View Guardian JWT.md

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
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
guljarpd / Commands.sh
Created May 2, 2018 — forked from nrollr/Commands.sh
Install PHP and NGINX on Amazon Linux AMI
View Commands.sh
## 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.