Skip to content

Instantly share code, notes, and snippets.

View kyleridolfo's full-sized avatar

Kyle Ridolfo kyleridolfo

View GitHub Profile
/* the page should not change width as content is loaded */
body {
overflow-y: scroll;
}
/* block scrolling without losing the scroll bar and shifting the page */
/* add this class when a modal is open */
body.block-scroll {
overflow: hidden;
overflow-y: scroll !important;
@kyleridolfo
kyleridolfo / config.php
Created July 19, 2017 15:18 — forked from jarektkaczyk/config.php
Laravel - tinker like a boss (with PsySH)
<?php // ~/.config/psysh/config.php
// Anything not Laravel - let's try to autoload something likely to exist
if (!defined('LARAVEL_START')) {
return [
'defaultIncludes' => [
getcwd().'/vendor/autoload.php',
getcwd().'/bootstrap/autoload.php',
],
];
@kyleridolfo
kyleridolfo / README.md
Created February 12, 2018 19:45 — forked from Snugug/README.md
Progressively Enhanced Lazy Loading Images in 40 lines of code

Lazy Load Images in 40 Lines of Code

Behold! Intersection Observers at work!

Usage

First, update your source code to move your image sources in to data attributes.

@kyleridolfo
kyleridolfo / big.json
Created March 19, 2023 14:53
big.json example
{"currentWeather":{"asOf":"2023-03-18T12:40:33Z","cloudCover":0.64,"cloudCoverHighAltPct":0.75,"cloudCoverLowAltPct":0.11,"cloudCoverMidAltPct":0.08,"conditionCode":"MostlyCloudy","daylight":true,"humidity":0.67,"metadata":{"attributionURL":"https://weatherkit.apple.com/legal-attribution.html","expireTime":"2023-03-18T12:45:33Z","latitude":42.384,"longitude":-72.652,"readTime":"2023-03-18T12:40:33Z","reportedTime":"2023-03-18T11:00:00Z","units":"m","version":1},"name":"CurrentWeather","precipitationIntensity":0.0,"pressure":1006.01,"pressureTrend":"rising","temperature":2.72,"temperatureApparent":-0.27,"temperatureDewPoint":-2.76,"uvIndex":1,"visibility":27870.37,"windDirection":324,"windGust":31.41,"windSpeed":10.88},"forecastDaily":{"days":[{"conditionCode":"PartlyCloudy","daytimeForecast":{"cloudCover":0.42,"conditionCode":"PartlyCloudy","forecastEnd":"2023-03-19T00:00:00Z","forecastStart":"2023-03-18T12:00:00Z","humidity":0.59,"precipitationAmount":0.0,"precipitationChance":0.0,"precipitationType":"clear"