Skip to content

Instantly share code, notes, and snippets.

@leggetter
leggetter / inbound-sms-headers.txt
Created August 14, 2016 10:15
Nexmo Inbound SMS Webhook
Accept */*
Content-Length 145
Content-Type application/x-www-form-urlencoded; charset=UTF-8
User-Agent Nexmo/MessagingHUB/v1.0
X-Forwarded-For 174.36.197.202
X-Forwarded-Proto https
var scripts = ['app.a700a9a3e91a84de5dc0.js']; // script for all users
var newBrowser = (
'fetch' in window &&
'Promise' in window &&
'assign' in Object &&
'keys' in Object
);
if (!newBrowser) {
@nikneroz
nikneroz / Phoenix JWT.md
Last active October 13, 2019 10:16
Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

Elixir + Phoenix Framework 1.3 + Guardian + JWT(Refresh, Revoke, Recover) + Comeonin

User model bootstrap

Let's generate User model and controller.

mix ecto.create
mix phoenix.gen.json Accounts User users email:string password_hash:string