Skip to content

Instantly share code, notes, and snippets.

View hkfoster's full-sized avatar

H. Kyle Foster hkfoster

  • Richmond, Virginia
View GitHub Profile
@hkfoster
hkfoster / typewriter.js
Last active August 29, 2015 14:22
Headline Typewriter Animation
/**
* Typewriter.js 0.0.1
* @author Kyle Foster (@hkfoster)
* @license MIT (http://www.opensource.org/licenses/mit-license.php/)
*/
var typewriter = ( function() {
var headline = document.querySelector( '.typewriter' );
@hkfoster
hkfoster / module-template.js
Last active May 9, 2016 19:14
A simple boilerplate for UMD JS modules
/**
* MyModule 0.0.1
* A short description of your module
* @author Me (@me)
* @license MIT
*/
;( function( root, factory ) {
if ( typeof define === 'function' && define.amd ) {
define( factory );
@hkfoster
hkfoster / syntax.scss
Created March 3, 2017 02:08
Compose Articles Syntax Highlighting
/* ===================================== *
* Preformatted text
* ------------------------------------- */
$color-code: #58728A;
$color-code-background: #EDF5F7;
$color-code-punctuation: #7EC9FF;
$color-code-tag: #DD2F41;
$color-code-selector: #F69523;
$color-code-keyword: #25C894;
@hkfoster
hkfoster / interval.js
Created April 20, 2024 20:53
A turnkey requestAnimationFrame replacement for setInterval
/**
* Interval 0.0.2
* A turnkey requestAnimationFrame replacement for setInterval
* @author Kyle Foster (@hkfoster)
* @license MIT
**/
const interval = {
set: (fn, delay) => {
if (!window.requestAnimationFrame) return window.setInterval(fn, delay)