Skip to content

Instantly share code, notes, and snippets.

View hellojebus's full-sized avatar
Golfing

Jesus Lizama hellojebus

Golfing
View GitHub Profile
@hellojebus
hellojebus / check for 404's in blog
Created November 29, 2018 19:05
404 redirect checker
/*
* This piece of code checks to see if the 404ing URL exists under blog
* if so, redirects to the page, if not render normal 404 page
* */
$tmpUrl = "https://".$_SERVER["SERVER_NAME"]."/blog". $_SERVER["REQUEST_URI"];
//check for trailing slash
if(substr($tmpUrl, -1) == '/') {
$tmpUrl = substr($tmpUrl, 0, -1);
@hellojebus
hellojebus / tmp
Last active April 15, 2019 18:01
/* Colors */
/*** default font 15/22 **/
* {
margin: 0;
border: none;
padding: 0;
}
html,
@hellojebus
hellojebus / index.html
Created November 22, 2019 23:36
Consistent Colors, no DB needed
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body id="body">
@hellojebus
hellojebus / example-usage.html
Last active August 27, 2020 18:24
Lazyload function
<!-- Background Image Usage -->
<div data-lazyload="bg" data-lazyload-src="https://path/to/image.jpg"></div>
<!-- Image Usage -->
<img data-lazyload="img" data-lazyload-src="https://path/to/image.jpg" />