Skip to content

Instantly share code, notes, and snippets.

View justrhysism's full-sized avatar

Rhys Lloyd justrhysism

View GitHub Profile
@thelimberlambda
thelimberlambda / lh-ttfb-tti.sh
Last active March 13, 2019 06:12
Script to measure key web performance metrics using the Lighthouse CLI
#!/usr/bin/env bash
url="$1"
scenario="$2"
output_filename="$(echo "${url}${scenario}" | sed -e 's/[^A-Za-z0-9._-]/_/g')"
runs=20
template="%3s | %9s | %8s | %10s | %5s |"
ttfb_total=0
tti_total=0
spi_raw_total=0
@LeonardoCardoso
LeonardoCardoso / GPG-Tower
Last active April 21, 2023 11:53
How to setup Tower to use the GPG Suite
# GPG on Tower
// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@paulirish
paulirish / what-forces-layout.md
Last active April 30, 2024 17:56
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
@rymawby
rymawby / stripe-credit-card-numbers.md
Last active April 19, 2024 13:27
Stripe test credit card numbers for use in development

#Test credit card numbers to use when developing with Stripe

4242424242424242 Visa

4012888888881881 Visa

4000056655665556 Visa (debit)

@natelandau
natelandau / .bash_profile
Last active April 30, 2024 18:07
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
Orchard's Source Moving To Git
By the end of July, we’ll be moving the Orchard sources hosted on CodePlex from a Mercurial repository to a Git repository. This won’t impact or affect Orchard's users, but Orchard's contributors might need to act before this move.
Forks
All of the current forks on the CodePlex website relative to Orchard will be deleted as part of this move. If you have forked Orchard, and you need to keep that fork, you can clone the fork and keep it locally or you can find somewhere else to push it. Alternatively we are doing a backup of all of them as of today's state, which you can request later on if you were not able to clone it in time. We will keep this backup for a few months only.
Pull Requests
The Orchard team will decline all the currently active pull requests before we move to Git. The result of this action is that you will receive a notification, and will have to recreate it once we have completed the move. We will not be accepting any new pull requests until this move is compl
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD