Skip to content

Instantly share code, notes, and snippets.

<!-- TOAST ERRORS -->
<script src="jquery.toast.min.js"></script>
<link href="jquery.toast.min.css" rel="stylesheet" />
<style>
.jq-toast-single {
font-size: 16px;
}
.jq-toast-single h2 {
font-size: 18px;
}
@justinledelson
justinledelson / functions.php
Last active January 16, 2020 05:27
Set WP_User role from Auth0
<?php
// =============================================================================
// AUTH0 CONFIG
// =============================================================================
function auth0_docs_hook_auth0_user_login( $user_id, $userinfo, $is_new, $id_token, $access_token, $refresh_token ) {
// Save role from $userinfo object
$wpRole = $userinfo['app_metadata']['wordpress_role'];
// $wpRole = $userinfo => app_metadata => wordpress_role;
@justinledelson
justinledelson / react-snippets
Created April 19, 2018 18:42
React Snippets
babel src/app.js --out-file=public/scripts/app.js --presets=env,react --watch
@justinledelson
justinledelson / 0_reuse_code.js
Created August 2, 2014 11:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console