Skip to content

Instantly share code, notes, and snippets.

View followdarko's full-sized avatar
😎
Go hard

Den Ilin followdarko

😎
Go hard
View GitHub Profile
import { initializeApp } from 'firebase/app';
import { getAnalytics, logEvent } from 'firebase/analytics';
import { firebaseConfig } from '../store/environment';
/**
* It's important to double-check event names
* cause it's crucial to have same namimg across platforms
*/
const CUSTOM_TYPING = new Set([
'session_started',
// Functions:
function a(x, y, z) {
x[y] = z;
}
function b(x, p) {
for (let i in p) a(x, i, p[i]);
}
function c() {
let x = { foo: 'bar' };
// https://browser.primatelabs.com/ios-benchmarks
// https://mydevice.io/devices/
// http://vizdevices.yesviz.com/devices.php
const IPHONE5_SIZE = 568
const IPAD_SIZE = 1024
const MIN_OPS = 165 /* Upper limit cpu for iPad4 */
const CACHE_KEY = 'anim'
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
@followdarko
followdarko / Measure CSS recalculations
Created March 13, 2017 19:30
Paste it into your Chrome DevTools console
function fillStyles(el, sel, styles, type){
el[sel] = el[sel] || {}
for (var key in styles) {
if (!isNaN(key)) {
if (el[sel][styles[key]]) {
let selector
if (type === 'id') selector = '#'+sel
else if (type === 'class') selector = '.'+sel
else selector = '<'+sel+'>'
return {