Skip to content

Instantly share code, notes, and snippets.

View borisBelloc's full-sized avatar
🎯
Focusing

Boris BELLOC borisBelloc

🎯
Focusing
View GitHub Profile
@eltonmesquita
eltonmesquita / onViewport.js
Last active November 1, 2020 09:32
A simple jQuery function that adds a class when the target(s) is in the viewport
function onViewport(el, elClass, offset, callback) {
/*** Based on http://ejohn.org/blog/learning-from-twitter/ ***/
var didScroll = false;
var this_top;
var height;
var top;
if(!offset) { var offset = 0; }
$(window).scroll(function() {
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active July 14, 2024 18:01
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@bvandenbon
bvandenbon / redirect-locale.html
Last active November 16, 2022 23:26
a landing page in html+js, which detects language (possibly cached) and redirects.
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
//////////////
/// CONFIG ///
//////////////
var defaultLocale = 'en';
@borisBelloc
borisBelloc / snippet.html
Last active September 26, 2019 08:50
my HTML snippet to make fast POC/Template (Bootstrap4/jQuery/Popper)
<!DOCTYPE html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name='author' content='Boris Belloc'>
<link rel='shortcut icon' type='image/png' href='url' />
<!-- CDN BOOTSTRAP 4.0 -->
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' integrity='sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T' crossorigin='anonymous'>