Skip to content

Instantly share code, notes, and snippets.


Juan Olvera j0lv3r4

View GitHub Profile
j0lv3r4 /
Created October 12, 2019 20:19 — forked from colllin/
FaunaDB User Token Expiration (for ABAC)

Auth0 + FaunaDB ABAC integration: How to expire Fauna user secrets.

Fauna doesn't yet provide expiration/TTL for ABAC tokens, so we need to implement it ourselves.

What's in the box?

3 javascript functions, each of which can be imported into your project or run from the command-line using node path/to/script.js arg1 arg2 ... argN:

  1. deploy-schema.js: a javascript function for creating supporting collections and indexes in your Fauna database.
j0lv3r4 / pylintrc
Created July 25, 2017 19:28
View pylintrc
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
# Add files or directories to the blacklist. They should be base names, not
# paths.
j0lv3r4 / search_index.json
Last active July 6, 2017 06:00
WHATWG Search index in Python
View search_index.json
[{"text": "Introduction", "section": "1", "uri": "introduction.html#introduction"}, {"text": "Is this HTML5?", "section": "1.1 - Introduction", "uri": "introduction.html#is-this-html5?"}, {"text": "Background", "section": "1.2 - Introduction", "uri": "introduction.html#background"}, {"text": "Audience", "section": "1.3 - Introduction", "uri": "introduction.html#audience"}, {"text": "Scope", "section": "1.4 - Introduction", "uri": "introduction.html#scope"}, {"text": "History", "section": "1.5 - Introduction", "uri": "introduction.html#history-2"}, {"text": "Design notes", "section": "1.6 - Introduction", "uri": "introduction.html#design-notes"}, {"text": "Compliance with other specifications", "section": "1.6.1 - Design notes", "uri": "introduction.html#compliance-with-other-specifications"}, {"text": "Extensibility", "section": "1.6.2 - Design notes", "uri": "introduction.html#extensibility"}, {"text": "HTML vs XML syntax", "section": "1.7 - Introduction", "uri": "introduction.html#html-vs-xhtml"}, {"text":
j0lv3r4 /
Last active July 3, 2017 02:54
npm installs for laravel-mix
npm init
npm i laravel-mix cross-env node-sass -D
npm i react react-dom -S
  • Create webpack.mix.js
  • Paste scripts in package.js
j0lv3r4 / laravel-mix-scripts.js
Created July 3, 2017 02:47
laravel-mix npm scripts
View laravel-mix-scripts.js
"dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
j0lv3r4 /
Created June 23, 2017 16:16

Keybase proof

I hereby claim:

  • I am thinkxl on github.
  • I am thinkxl ( on keybase.
  • I have a public key ASAbrK8cv-npVMgCkqe0wxB1TsXpsxEp3F9vqCmfQpma1wo

To claim this, I am signing this object:

j0lv3r4 /
Created October 29, 2016 04:28 — forked from richard-flosi/
Bottle with Cross-origin resource sharing (CORS)
Example of setting up CORS with
from bottle import Bottle, request, response, run
app = Bottle()
def enable_cors():
j0lv3r4 / index.html
Last active October 25, 2016 00:47
HTML example
View index.html
<!DOCTYPE html>
<title>Home page</title>
<a href="index.html">Home Page</a>
<a href="about.html">About</a>
j0lv3r4 /
Last active December 2, 2015 23:02
Bower Style Guide

Bower's Style Guide


This is a living document with coding conventions and rules to improve the writing and design of the Bower codebase.

All code in any code-base should look like a single person typed it, no matter how many people contributed. – Principles of Writing Consistent, Idiomatic JavaScript

Bower's code style stays true to convention, while still allowing for flexibility. When contributing, you should write your code following Bower's style.