Skip to content

Instantly share code, notes, and snippets.

View Matt-Jensen's full-sized avatar
🟩
GREEN SQUARE GOOD

Matt-Jensen Matt-Jensen

🟩
GREEN SQUARE GOOD
View GitHub Profile
@Matt-Jensen
Matt-Jensen / Firebase Local Storage IndexedDb Dump.js
Created February 17, 2020 17:04
Access your Firebase Auth Token by dumping your IndexedDB session
(() => {
const asyncForEach = (array, callback, done) => {
const runAndWait = i => {
if (i === array.length) return done();
return callback(array[i], () => runAndWait(i + 1));
};
return runAndWait(0);
};
const dump = {};
@Matt-Jensen
Matt-Jensen / iOS 13.4 User Agents
Created March 24, 2020 21:50
User agents of 2 Apple devices running iOS 13.4. Notice iPad is damn liar.
# iPad
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15
# iPhone
Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1
(async () => {
const itterations = Array.from({length: 4});
console.log('starting');
itterations.map(async (_, i) => {
await wait(300);
console.log(`itteration done ${i}`);
});
include .env
PROJECTNAME=$(shell basename "$(PWD)")
# Go related variables.
GOBASE=$(shell pwd)
GOPATH="$(GOBASE)/vendor:$(GOBASE)
GOBIN=$(GOBASE)/bin
GOFILES=$(wildcard *.go)
export default (...fns) => x => fns.reduceRight((v, f) => f(v), x)
// compose(double, add1)(2) === 6
export default (...fns) => x => fns.reduce((v, f) => f(v), x);
// pipe(double, add1)(2) === 5
0xFbbf996d047D49488CDb782e823817ecE779247C
Verifying that +mattjensen is my blockchain ID. https://onename.com/mattjensen
var phoneRegExp = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
@Matt-Jensen
Matt-Jensen / Sass Retina Query Mixin
Last active December 22, 2015 01:19
A sass function to generate retina media queries.
/* Update: 5/3/14 - supports IE9+, FF3.5+, Opera9.5+ */
@mixin retina($query: null, $density: 2) {
$dpi: $density * 96;
/* Accepts optional @media query conditions */
@if $query {
$query: "and (#{$query})";
}
@else {