Skip to content

Instantly share code, notes, and snippets.

View alexbassy's full-sized avatar
🌈

Alex Bass alexbassy

🌈
  • Berlin, Germany
View GitHub Profile
<style>
.socialIconsWrap {
display: flex;
list-style: none;
padding: 0;
}
.socialIcon {
display: block;
background: url('https://d2xy5qvxyo4wme.cloudfront.net/dist/img/common/sprites-social.svg') no-repeat;
@alexbassy
alexbassy / Dropzone.js
Created August 13, 2015 22:55
My own attempt at a dropzone element. Requires jQuery.
"use strict";
var defaults = {
message: {
idle: {
main: 'Drop an image here',
sub: '(or click to select a file)'
},
loading: {
main: 'Loading...',
@alexbassy
alexbassy / stopwatch.js
Created April 15, 2015 11:53
Super simple stopwatch
// Simple stopwatch. Make a new stopwatch with any html element.
// Usage: var sw = new Stopwatch('span.elapsedTime');
// or: var sw = new Stopwatch(el);
// Output: 0.1s, 7.3s, etc
function Stopwatch(selector) {
this.element = typeof selector === 'string' ? document.querySelector(selector) : selector;
this.time = 0;
this.accuracy = 1;
this.element.innerText = '0.0s';