Skip to content

Instantly share code, notes, and snippets.


Ryan Chenkie chenkie

View GitHub Profile
View AuthContext.js
return (
setAuthState: authInfo => setAuthInfo(authInfo)
View disable-vscode-autocomplete.json
"editor.acceptSuggestionOnEnter": "off",
"editor.hover.enabled": false,
"editor.quickSuggestions": false,
"editor.quickSuggestionsDelay": 10,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestOnTriggerCharacters": false,
"editor.wordBasedSuggestions": false
View graphql-parse-fields.js
const { ApolloServer, gql } = require('apollo-server');
const parseFields = require('graphql-parse-fields');
const typeDefs = gql`
type User {
firstName: String
lastName: String
age: Int
View speakdotdev.graphql
type Speaker {
firstName: String!
lastName: String!
email: String!
avatarLink: String
shortBio: String
fullBio: String
status: String
location: SpeakerLocation
shouldDisplayLocation: Boolean
View avatar-rule.js
function (user, context, callback) {
context.idToken["http://your-domain/azure_photo"] = user.azure_photo;
callback(null, user, context);
View jwt.interceptor.ts
import {
} from '@angular/common/http';
import 'rxjs/add/operator/map';
View auth0-custom-hosted-login.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sign In with Auth0</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="">

One of my favorite things about Vue.js is how approachable it is. We can simply drop the library into an existing project, create a Vue instance with an element or ID of our choosing as a selector, and we're all set to add reactivity to the page. This simplicity is great and comes in handy if we just want to use a few of Vue's features, but there's actually a lot more we can do with the library that some people may not be aware of.

Surrounding the core Vue.js library is a rich ecosystem of tools and plugins that allow us to create full single page applications. Vue also offers full support for ES2015 and comes with its own file type: the .vue component, which is great because it allows us to have our template, scripts, and styles all in the same file. While some might say that this could be cumbersome and file sizes could get huge, I would argue that the number of clicks and amount of mental bandwidth (even if small) that we save by using this kind of format makes it quite valuable.

This is the secon

View usernameEmailValidator.ts
import {Http, HTTP_PROVIDERS} from 'angular2/http';
import {Injector} from 'angular2/core'
import {Control} from 'angular2/common';
import 'rxjs/Rx';
export class UsernameEmailValidator {
constructor() {}
static checkUser(control: Control) {
You can’t perform that action at this time.