Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Juan Olvera j0lv3r4

🎯
Focusing
View GitHub Profile
@j0lv3r4
j0lv3r4 / Readme.md
Created Oct 12, 2019 — forked from colllin/Readme.md
FaunaDB User Token Expiration (for ABAC)
View Readme.md

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.
View pylintrc
[MASTER]
# 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
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
@j0lv3r4
j0lv3r4 / search_index.json
Last active Jul 6, 2017
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
j0lv3r4 / commands.md
Last active Jul 3, 2017
npm installs for laravel-mix
View commands.md
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
j0lv3r4 / laravel-mix-scripts.js
Created Jul 3, 2017
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"
}
View keybase.md

Keybase proof

I hereby claim:

  • I am thinkxl on github.
  • I am thinkxl (https://keybase.io/thinkxl) on keybase.
  • I have a public key ASAbrK8cv-npVMgCkqe0wxB1TsXpsxEp3F9vqCmfQpma1wo

To claim this, I am signing this object:

@j0lv3r4
j0lv3r4 / bottle-cors.py
Created Oct 29, 2016 — forked from richard-flosi/bottle-cors.py
Bottle with Cross-origin resource sharing (CORS)
View bottle-cors.py
"""
Example of setting up CORS with Bottle.py.
"""
from bottle import Bottle, request, response, run
app = Bottle()
@app.hook('after_request')
def enable_cors():
"""
@j0lv3r4
j0lv3r4 / index.html
Last active Oct 25, 2016
HTML example
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Home page</title>
</head>
<body>
<header>
<nav>
<a href="index.html">Home Page</a>
<a href="about.html">About</a>
View bower-style-guide.md

Bower's Style Guide

Description

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.