This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shelf extends React.Component { | |
componentDidMount () { | |
this.intervals = []; | |
} | |
componentWillUnmount () { | |
this.intervals.map(clearInterval); | |
} | |
setInterval () { | |
this.intervals.push(setInterval.apply(null, arguments)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); | |
const webpack = require('webpack'); | |
const path = require('path'); | |
const IS_DIST = (process.argv.indexOf('--dist') !== -1) ? true : false; | |
const config = { | |
devServer: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.carousel { | |
height: 300px; | |
width: 400px; | |
overflow: hidden; | |
text-align: center; | |
position: relative; | |
padding: 0; | |
list-style: none; | |
} | |
.carousel__controls, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const browsersync = require('browser-sync'), | |
vf = require('vinyl-file'), | |
vss = require('vinyl-source-stream'), | |
vb = require('vinyl-buffer'); | |
const start = () => { | |
const server = browsersync.create(); | |
server.init({ | |
baseDir: 'public/' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new bookmark in your browsers' Bookmark Manager pointing at the following script: | |
javascript:(function(){let a;const b=new CSSStyleSheet;b.insertRule("header, [data-testid=\"sidebarColumn\"] { transition: opacity .5s ease; }"),b.insertRule(".fade-noise header, .fade-noise [data-testid=\"sidebarColumn\"] { opacity: 0.005; }"),document.adoptedStyleSheets=[b];const c=()=>{document.body.classList.add("fade-noise"),a&&clearTimeout(a),a=setTimeout(()=>{document.body.classList.remove("fade-noise")},2500)};window.addEventListener("scroll",c)})(); | |
// NOTE:: You can modify the behavior by updating the values in the injected CSS | |
// 1. transition time for opacity (0.5s default) | |
// 2. opacity of non-focussed items (0.05 default) | |
// 3. time it takes for non-focussed items to return to full opacity (2500ms default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gulp from 'gulp' | |
const compileMarkup = () => { // COMPILE MARKUP } | |
const compileScript = () => { // COMPILE SCRIPT } | |
const compileStyle = () => { // COMPILE STYLE } | |
const watchMarkup = () => { // WATCH MARKUP } | |
const watchScript = () => { // WATCH SCRIPT } | |
const watchStyle = () => { // WATCH STYLE } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<div> | |
<div> | |
<h1>Get system information</h1> | |
<i>Supports: Win, macOS, Linux <span>|</span> Process: Both</i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let buzzing = false | |
/** | |
* Hard-coded interval for now is not ideal | |
*/ | |
const minutes = 10 | |
const interval = minutes * (1000 * 60) | |
/** | |
* Can you detect if the Bangle is Buzzing or in Buzz in progress? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* So you get 240 x 240 so you can technically do different things right? | |
* Colors? | |
*/ | |
g.clear() | |
//g.drawImage(img, 100,100); | |
class Ring { | |
constructor() { |
OlderNewer