Skip to content

Instantly share code, notes, and snippets.

View haydenbleasel's full-sized avatar
🔮
Working on Eververse

Hayden Bleasel haydenbleasel

🔮
Working on Eververse
View GitHub Profile
@haydenbleasel
haydenbleasel / origin.js
Last active July 20, 2017 11:35
Window location origin polyfill (ES6)
if (!window.location.origin) {
const { protocol, hostname, port } = window.location;
window.location.origin = `${protocol}//${hostname}${port ? `:${port}` : ''}`;
}
@haydenbleasel
haydenbleasel / dribbble.html
Last active April 27, 2016 13:45
Dribbble feed for portfolio
#dribbble
.row.clearfix.hidden-xs
noscript Sorry, you need Javascript enabled to view these Dribbble shots.
.column-3
p Simplicity, functionality and accessibility will always remain at the core of my philosphy. I like to combine aspects of print and graphic such as dynamic layouts and typographic flourishes with the principles of modern, minimalism.
@haydenbleasel
haydenbleasel / strikethrough.js
Created April 26, 2016 12:54
Animated strikethrough on hover
$('a').addClass('strikethrough').hover(
(e) => $(e.target).stop().addClass('mouseenter'),
(e) => {
$(e.target).stop().removeClass('mouseenter').addClass('mouseleave');
setTimeout(() => {
$(e.target).stop().removeClass('mouseleave').addClass('no-transition');
}, STIKETHROUGH_DURATION - STIKETHROUGH_OFFSET);
setTimeout(() => {
$(e.target).stop().removeClass('no-transition');
}, STIKETHROUGH_DURATION + STIKETHROUGH_OFFSET);
@haydenbleasel
haydenbleasel / github.js
Created April 24, 2016 05:50
GitHub chart for website.
#github
.row.clearfix
#canvas-container.hidden-xs
canvas#repositories
noscript Sorry, you need Javascript enabled to view this chart.
@haydenbleasel
haydenbleasel / .editorconfig
Last active March 5, 2016 15:28
My default configuration files.
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@haydenbleasel
haydenbleasel / jquery-soundcloud.js
Last active November 18, 2015 05:24
jQuery setup for the SoundCloud API
$ ->
# Create abc,def string
Number::numberWithCommas =
String::numberWithCommas = ->
@toString().replace /\B(?=(\d{3})+(?!\d))/g, ','
# Initial sound is empty
sound = undefined