Skip to content

Instantly share code, notes, and snippets.

View josephscott's full-sized avatar

Joseph Scott josephscott

View GitHub Profile
@josephscott
josephscott / coredump.txt
Created December 9, 2015 22:28
HHVM nightly - hhvm-nightly-dbg_2015.12.09~wheezy_amd64.deb - core dump
Thread 3 (Thread 0x7f47303ff700 (LWP 29153)):
#0 0x00007f473ef6cd63 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f474060a5d3 in ?? ()
from /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5
#2 0x00007f47405f5f60 in event_base_loop ()
from /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5
#3 0x000000000634b2fd in folly::EventBase::loopBody(int) ()
at /tmp/tmp.hEWUdoldcP/third-party/folly/src/folly/io/async/EventBase.cpp: 347
#4 0x000000000634af95 in folly::EventBase::loop() ()
at /tmp/tmp.hEWUdoldcP/third-party/folly/src/folly/io/async/EventBase.cpp: 299
document.addEventListener("DOMContentLoaded", function() {
var lazyImages = [].slice.call(document.getElementsByClassName("js-lazy-img"));
if ("IntersectionObserver" in window) {
var config = {
// If the image gets within 250px of the browser's viewport, start the download:
rootMargin: '250px 0px',
};
var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
document.addEventListener("DOMContentLoaded",function(){var e=[].slice.call(document.getElementsByClassName("js-lazy-img"));if("IntersectionObserver"in window){var t=new IntersectionObserver(function(e,s){e.forEach(function(e){if(e.isIntersecting){var s=e.target;s.src=s.dataset.src,s.dataset.srcset&&(s.srcset=s.dataset.srcset),t.unobserve(s)}})},{rootMargin:"250px 0px"});e.forEach(function(e){t.observe(e)})}else e.forEach(function(e){e.src=e.dataset.src,e.dataset.srcset&&(e.srcset=e.dataset.srcset)})});
@josephscott
josephscott / wait-ttfb
Last active May 19, 2021 21:19
Get the app response TTFB ( Time To First Byte ) with curl
#!/usr/bin/env bash
set -eu
export LC_ALL=C.UTF-8
CURL_FORMAT="%{time_starttransfer} - %{time_pretransfer}"
declare -a TIMES
for i in {1..15}; do
OUT_CURL=$(curl -w "$CURL_FORMAT" -k --compressed -s -o /dev/null "$@")