Skip to content

Instantly share code, notes, and snippets.

View pixelastic's full-sized avatar

Tim Carry pixelastic

View GitHub Profile

Sed - An Introduction and Tutorial by Bruce Barnett

How to use sed, a special editor for modifying files automatically. If you want to write a program to make changes in a file, sed is the tool to use.

There are a few programs that are the real workhorse in the UNIX toolbox. These programs are simple to use for simple applications, yet have a rich set of commands for performing complex actions. Don't let the complex potential of

@pixelastic
pixelastic / custom-token.js
Created July 2, 2018 10:44
Firebase function to return an Auth0 custom token
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
pixelastic / data.json
Last active April 30, 2018 16:11
Staticgen data
{"wspringer/monkeyman":{"17651":{"size":1275,"stargazers_count":48,"watchers_count":48,"forks_count":15,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":48,"network_count":15,"subscribers_count":9}},"interstar/bootdown":{"17651":{"size":1369,"stargazers_count":7,"watchers_count":7,"forks_count":2,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":7,"network_count":2,"subscribers_count":1}},"adamrenklint/asimov-static":{"17651":{"size":766,"stargazers_count":4,"watchers_count":4,"forks_count":4,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":4,"network_count":4,"subscribers_count":2}},"waferbaby/dimples":{"17651":{"size":561,"stargazers_count":54,"watchers_count":54,"forks_count":7,"open_issues_count":0,"forks":7,"open_issues":0,"watchers":54,"network_count":7,"subscribers_count":3}},"mkdocs/mkdocs":{"17651":{"size":23313,"stargazers_count":5528,"watchers_count":5528,"forks_count":865,"open_issues_count":97,"forks":865,"open_issues":97,"watchers":5528,"network_count":865,"subscrib
// 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
}
// 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 }
<!-- 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>
</div>
<input type="search" value=""
oninput="this.setAttribute('value', this.value)"
/>
input[value="tim" i] ~ #result:before {
content: "Tim Carry";
}
<input type="search" value="Tim" />
<div id="result"></div>
@pixelastic
pixelastic / basic-markup.html
Created January 9, 2018 10:32
A Search Engine in CSS
<input type="search" value="Tim" />
<div id="result"></div>