Skip to content

Instantly share code, notes, and snippets.

View mithi's full-sized avatar

Mithi Sevilla mithi

View GitHub Profile
@mithi
mithi / what-forces-layout.md
Created July 25, 2020 12:39 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@mithi
mithi / web-performance.md
Created July 25, 2020 09:24 — forked from stevekinney/web-performance.md
Web Performance Workshop

Web Performance

Requirements

Repositories

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
fig = plt.figure(figsize=(18, 16), dpi= 80)
ax = plt.axes(projection='3d')
ax.set_xlim3d(-100, 100)
ax.set_ylim3d(-100, 100)
ax.set_zlim3d(-100, 100)
# -*- coding: utf-8 -*-
"""matplot3d_examples
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Zy_tYU5LXxJuc44AG_4GO9-2ZfVhFMnK
"""
from mpl_toolkits.mplot3d import axes3d
import {
sin,
cos,
unit,
matrix,
multiply,
transpose,
identity,
concat,
dotMultiply,
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Plotly.js
- Grid
- Base Styles
- Typography
- Links
- Buttons
- Forms
- Lists
https://github.com/EvgeniyPeshkov/syntax-highlighter
"workbench.colorTheme": "Default Light+",
"workbench.colorCustomizations": {
"[One Dark Pro]": {
"syntax.type": "#26A69A",
"syntax.scope": "#00897B",
"syntax.function": "#d400b1",
"syntax.variable": "#42A5F5",
"syntax.number": "#90A4AE",
"syntax.string": "#f0a00b",
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <printf.h>
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
const byte ADDRESS[6] = "00001";
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <printf.h>
#define CE_PIN 9
#define CSN_PIN 10
RF24 radio(CE_PIN, CSN_PIN);
const byte ADDRESS[6] = "00001";
/*
* Getting Started example sketch for nRF24L01+ radios
* This is a very basic example of how to send data from one node to another
* Updated: Dec 2014 by TMRh20
*/
#include <SPI.h>
#include "RF24.h"