Skip to content

Instantly share code, notes, and snippets.


Tim Carry pixelastic

View GitHub Profile
pixelastic / custom-token.js
Created Jul 2, 2018
Firebase function to return an Auth0 custom token
View custom-token.js
import cors from 'cors';
import Promise from 'bluebird';
import axios from 'axios';
import database from '../database/database.js';
* The goal of this function is to mint custom token that can be used to
* authenticate to Firebase.
* The function will be called through https, and will check the credentials of
* the requested user (through the usage of its Auth0 token). If the Auth0 token
pixelastic / data.json
Last active Apr 30, 2018
Staticgen data
View data.json
View matching-keywords.scss
// Show only for matching keywords
input[value="alexandre" i] ~ #results #result15,
input[value="alexandre" i] ~ #results #result16,
input[value="alexandre" i] ~ #results #result17 {
display: block
View several-results.scss
// Pre-fill the content
#result0:before { content: "Aurora Pleguezelo" }
// […]
#result15:before { content: "Alexandre Collin" }
#result16:before { content: "Alexandre Meunier" }
#result17:before { content: "Alexandre Stanislawski" }
// […]
#result150:before { content: "Zo Asmail" }
// Hide them all
#results div { display: none }
View several-results.html
<!-- one div per employee -->
<div id="results">
<div id="result0"></div>
<div id="result1"></div>
<div id="result2"></div>
<div id="result148"></div>
<div id="result149"></div>
<div id="result150"></div>
View oninput.html
<input type="search" value=""
oninput="this.setAttribute('value', this.value)"
View basic-selector.scss
input[value="tim" i] ~ #result:before {
content: "Tim Carry";
View basic-markup.html
<input type="search" value="Tim" />
<div id="result"></div>
pixelastic / basic-markup.html
Created Jan 9, 2018
A Search Engine in CSS
View basic-markup.html
<input type="search" value="Tim" />
<div id="result"></div>
pixelastic / Answers
Last active Jan 9, 2018 — forked from aymorgan/Introduction
Guidance for implementing Algolia.generate_secured_api_key
View Answers
# Answer
Thanks for the question, I'll do my best to guide you the best way I can.
I think you're very close to have a working implementation.
Algolia secured API keys are API keys with *hard* filters already embedded
inside. You generic Search API key will let you search through all the content
in your index, but when you create a secured API key, you create a specific
version of your search API key that can only search into a subset of records.