Skip to content

Instantly share code, notes, and snippets.

View mauricecruz's full-sized avatar

Maurice Cruz mauricecruz

View GitHub Profile
@mauricecruz
mauricecruz / tips.js
Created June 3, 2021 14:42
Lighthouse Tips
const tips = {
mbTakesAMinimumOfSecondsTo: "1MB takes a minimum of 5 seconds to download on a typical 3G connection [Source: `WebPageTest` and `DevTools` 3G definition].",
rebuildingPinterestPagesFor: "Rebuilding Pinterest pages for performance increased conversion rates by 15% [Source: `WPO Stats`]",
byReducingTheResponseSizeOfJson: "By reducing the response size of JSON needed for displaying comments, Instagram saw increased impressions [Source: `WPO Stats`]",
walmartSawAIncreaseInRevenueFor: "Walmart saw a 1% increase in revenue for every 100ms improvement in page load [Source: `WPO Stats`]",
ifASiteTakesSecondToBecome: "If a site takes >1 second to become interactive, users lose attention, and their perception of completing the page task is broken [Source: `Google Developers Blog`]",
OfGlobalMobileUsersInWereOnGOrG: "75% of global mobile users in 2016 were on 2G or 3G [Source: `GSMA Mobile`]",
theAverageUserDeviceCostsLess: "The average user device costs less than 200 USD. [Source: `Internat
@mauricecruz
mauricecruz / snippet.js
Last active April 11, 2017 09:40
Zero Dark Matrix for React Devtools
// Zero Dark Matrix for React Devtools
// Run this snippet inside the inspector's inspector.
(function(){
var themeUrl = 'https://gist.githubusercontent.com/mauricecruz/f53c932961a04c01a096/raw/26b8d584411764cceec91716973df142955230a7/style.css';
function getDevTheme(url){
var identifier = getDomainIdentifier(),
css;
function contains(source, findString){
return source.indexOf(findString) !== -1;
}
@mauricecruz
mauricecruz / JSTL.md
Last active May 17, 2024 03:37
Useful Snippets

Get vars and properties of an object

<%-- replace object with var to test --%>
<c:set var="object" value="${product}" />

<c:if test="${!empty object.class.declaredFields}">
    <h2>Object Attributes <em>&dollar;{object.name}</em></h2>
    <ul>
        <c:forEach var="attr" items="${object.class.declaredFields}">
 <span>${attr.name}</span>${object[attr.name]}
@mauricecruz
mauricecruz / ZeroDarkMatrix.tmTheme
Created April 28, 2015 18:35
Zero Dark Matrix for SublimeText
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Zero Dark Matrix</string>
<key>comment</key>
<string>A highly customized dark theme.</string>
<key>settings</key>
<array>
@mauricecruz
mauricecruz / keybase.md
Created October 3, 2014 23:32
keybase.md

Keybase proof

I hereby claim:

  • I am mauricecruz on github.
  • I am mauricecruz (https://keybase.io/mauricecruz) on keybase.
  • I have a public key whose fingerprint is 702D 56F4 A14D 77CC 9F56 73A5 BD88 3B78 F01F E033

To claim this, I am signing this object:

@mauricecruz
mauricecruz / readme.md
Last active May 17, 2024 03:36
Zero Dark Matrix for Node Inspector
@mauricecruz
mauricecruz / zdm-injector.js
Last active August 29, 2015 13:56
Inject Zero Dark Matrix Devtools Theme
var css = '.panel.sources .split-view-vertical .split-view-contents{-webkit-transition:right .5s ease-in-out}.panel.sources .split-view-contents-second.split-view-sidebar{-webkit-animation:slideInRightBig .2s ease-out}.panel.sources .split-view-vertical .split-view-contents-first.split-view-sidebar,.panel.sources div:not(.split-view-horizontal) .split-view-vertical .split-view-sidebar{-webkit-animation:none!important}.sidebar-overlay{-webkit-animation:slideInLeftBig .5s ease-out}.panel.elements .split-view-horizontal .split-view-contents-second:not(.metrics-and-computed),.panel.sources .split-view-horizontal>.split-view-contents-second.split-view-sidebar{-webkit-animation:bounceInUp 1s ease-in-out;z-index:99}#toolbar>.toolbar-item.toggleable.toggled-on,.small .tabbed-pane:not(.help-window-main) .tabbed-pane-header-tab.selected,.tabbed-pane:not(.help-window-main) .tabbed-pane-header-tab.selected{-webkit-transition:border-top .25s ease-out 0}#network-views{-webkit-animation:bounceInRight .5s ease-in-out}.styles
@mauricecruz
mauricecruz / Custom.css
Last active January 2, 2016 23:28
Zero Dark Matrix Theme for v.32.0.1700
/*****************************************************************************/
/* Zero-Dark-Matrix
/* Optimized for Chrome Stable Channel v32.0.1700
/* https://github.com/mauricecruz/chrome-devtools-zerodarkmatrix-theme
/*************************************************************************/
/**********************************************
/* Animations
/* -------------------------------------------
/* If you are experiencing performance issues,
/* remove the animations section below.
.styles-section .properties .disabled,
.styles-section .properties .not-parsed-ok {
-webkit-transition: opacity 0.5s ease-in-out 0;
}
/*-- CURRENTLY SELECTED --*/
.panel.elements .outline-disclosure ol:focus li.selected .selection {
-webkit-animation: pulsate 2.5s infinite;
}
#elements-crumbs .crumbs .crumb.selected {
/*****************************************************************************/
/* Zero-Dark-Matrix
/* Optimized for Chrome Canary Channel v32
/* https://github.com/mauricecruz/chrome-devtools-zerodarkmatrix-theme
/*************************************************************************/
.styles-section .properties .disabled,
.styles-section .properties .not-parsed-ok {
-webkit-transition: opacity 0.5s ease-in-out 0;
}
/*-- CURRENTLY SELECTED --*/