Skip to content

Instantly share code, notes, and snippets.

View speeday's full-sized avatar
🎯
Focusing

speeday

🎯
Focusing
View GitHub Profile
@speeday
speeday / gist:a29bcf4d754156be01c2b3061c00b19f
Created June 12, 2021 08:59 — forked from EvanHahn/gist:2587465
Caesar shift in JavaScript
/*
JavaScript Caesar shift
by Evan Hahn (evanhahn.com)
"Encrypt" like this:
caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!"
And "decrypt" like this:
@speeday
speeday / index.html
Last active August 15, 2021 18:08 — forked from FranciscoG/scrollIt.js
Vanilla JS scroll window to an element
<a className="btn btn-secondary" href="javascript:void(0)" onClick={(e) => scrollToElement(document.getElementsByClassName("role-section")[0], e)}>
{props?.button_text}
</a>
@speeday
speeday / gist:1955504aac6b0e4ef7adf39a7b0742ac
Created May 2, 2021 08:45 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@speeday
speeday / download-file.js
Created April 27, 2021 10:56 — forked from javilobo8/download-file.js
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@speeday
speeday / flexbox.scss
Created February 28, 2021 17:20 — forked from richardtorres314/flexbox.scss
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
@speeday
speeday / index.html
Created February 24, 2021 17:59 — forked from tommydunn/index.html
Slick Slider with auto play YouTube, Vimeo and HTML5 video
<header>
<h1>SITE TITLE</h1>
<nav>
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
@speeday
speeday / findStyles.js
Created September 29, 2020 12:47 — forked from macbookandrew/findStyles.js
List unique CSS properties for all DOM elements
/**
* List unique CSS properties for all DOM elements
* Initially created to list unique font stacks on a page
* @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer}
*
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file}
*
* @author AndrewRMinion Design (https://andrewrminion.com)
* @version 1.1
*
@speeday
speeday / nextScriptCustom.js
Created September 17, 2020 11:44 — forked from alinzk/nextScriptCustom.js
Customized NextScript from next.js to delay loading for non-critical js
/*
NOTE: This modifies next.js internal api behavior and may break your application.
Tested on next.js version: 9.2.1
*/
import React from 'react';
import { compact, flatten } from 'lodash';
import { NextScript } from 'next/document';
@speeday
speeday / headCustom.js
Created September 17, 2020 11:44 — forked from alinzk/headCustom.js
Customized Head from next.js to disable preloading JS and CSS assets
/*
NOTE: This modifies next.js internal api behavior and may break your application.
Tested on next.js version: 9.2.1
*/
import React from 'react';
import { Head } from 'next/document';
class HeadCustom extends Head {
@speeday
speeday / main.js
Created May 12, 2020 16:35 — forked from kirandash/main.js
Slick slider with animate.css
$('#banner-home .slick-home-banner').on('init', function(e, slick) {
var $firstAnimatingElements = $('div.banner-item:first-child').find('[data-animation]');
doAnimations($firstAnimatingElements);
});
$('#banner-home .slick-home-banner').on('beforeChange', function(e, slick, currentSlide, nextSlide) {
var $animatingElements = $('div.banner-item[data-slick-index="' + nextSlide + '"]').find('[data-animation]');
doAnimations($animatingElements);
});
$('#banner-home .slick-home-banner').slick({
autoplay: true,