Skip to content

Instantly share code, notes, and snippets.

View denar90's full-sized avatar

Artem Denysov denar90

View GitHub Profile
name: CI
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","benchmarkIndex":1540},"lighthouseVersion":"4.3.1","fetchTime":"2019-06-28T20:13:30.403Z","requestedUrl":"https://dev-meetups.org/","finalUrl":"https://dev-meetups.org/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Uses HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](
{
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/76.0.3803.0 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/76.0.3803.0 Safari/537.36",
"benchmarkIndex": 1062
},
"lighthouseVersion": "5.0.0",
"fetchTime": "2019-05-23T14:09:36.416Z",
"requestedUrl": "https://www.apple.com/",
+--------------------------------------+-------------------------------------------------------------------------------+
| Pros | Cons |
+--------------------------------------+-------------------------------------------------------------------------------+
| UX improvemnts | Critical CSS inlined, so can't be cached |
| Page isn't blocked for rendering | Need some workaround to extract critical CSS for different screen resolutions |
| Easy to apply for small applications | Hard to use on pages with dynamic components composition |
+--------------------------------------+-------------------------------------------------------------------------------+
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="./clooney.min.js"></script>
<script>
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.greenlet=n()}(this,function(){return function(e){var n=new Worker(URL.createObjectURL(new Blob(["onmessage=("+function(e){return function(n){var t=n.data;return Promise.resolve().then(function(){return e.apply(e,t[1])}).then(function(e){postMessage([t[0],null,e])},function(e){postMessage([t[0],""+e])})}}+")("+e+")"]))),t=0,o={};return n.onmessage=function(e){var n=e.data,t=n[0],r=n[1];o[t][r?1:0](r||n[2]),delete o[t]},function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return new Promise(function(r,u){o[++t]=[r,u],n.postMessage([t,e])})}}});
//# sourceMappingURL=greenlet.umd.js.map
</script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js').then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
}
var notoSansRegular = new FontFace('Noto Sans Regular', 'url(/fonts/NotoSans-Regular.woff2)', {
style: 'normal',
weight: '400'
});
// add new font
document.fonts.add(notoSansRegular);
// load font
notoSansRegular.load();
//check status
notoSansRegular.loaded.then((fontFace) => {
{
"first-meaningful-paint": {
"score": 100,
"displayValue": "1,040 ms",
"rawValue": 1038.8,
"optimalValue": "< 1,600 ms",
"extendedInfo": {
"value": {
"timestamps": {
"navStart": 73206215685,
git clone --mirror <url_of_old_repo>
cd <name_of_old_repo>
git remote add new-origin <url_of_new_repo>
git push new-origin --mirror
{"traceEvents":[{"pid":64264,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_name","args":{"name":"CrRendererMain"}},{"pid":64258,"tid":0,"ts":0,"ph":"M","cat":"__metadata","name":"num_cpus","args":{"number":4}},{"pid":64258,"tid":10247,"ts":0,"ph":"M","cat":"__metadata","name":"process_name","args":{"name":"Renderer"}},{"pid":64258,"tid":10247,"ts":0,"ph":"M","cat":"__metadata","name":"process_uptime_seconds","args":{"uptime":3}},{"pid":64258,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_sort_index","args":{"sort_index":-1}},{"pid":64258,"tid":10247,"ts":0,"ph":"M","cat":"__metadata","name":"thread_name","args":{"name":"Chrome_ChildIOThread"}},{"pid":64258,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_name","args":{"name":"CrRendererMain"}},{"pid":64269,"tid":775,"ts":0,"ph":"M","cat":"__metadata","name":"thread_name","args":{"name":"CrRendererMain"}},{"pid":64269,"tid":21763,"ts":0,"ph":"M","cat":"__metadata","name":"thread_name","args":{"name":"CompositorTileWorker2/