Skip to content

Instantly share code, notes, and snippets.

@pmilla1606
pmilla1606 / dispatchWithTimeout.js
Created December 13, 2017 22:21
Redux helper method to dispatch twice, once with a timeout
// dispatch = the dispatch function to be passed from components
// timeout = the duration
// options = an options object spread into the dispatch
// triggerString = the string of the action type to show
// hideString = the string of the action type to hide
export const dispatchWithTimeout = (dispatch, timeout, options = {}, triggerString, hideString) => {
dispatch({type: triggerString, ...options});
setTimeout(() => {
dispatch({type: hideString});
'use strict';
var rgbArr = [];
var max = 255;
var min = 0;
for (var x=0; x<1000; x++){
rgbArr.push([
_.round(Math.random() * (max - min) + min, 0),
_.round(Math.random() * (max - min) + min, 0),
_.round(Math.random() * (max - min) + min, 0)
@pmilla1606
pmilla1606 / petters
Last active December 15, 2015 22:42
strawpetter
- http://i.imgur.com/tEZDwhL.jpg
- http://i.imgur.com/tEZDwhL.jpg?6969
- http://i.imgur.com/tEZDwhL.jpg?420
- http://i.imgur.com/tEZDwhL.jpg?666
- http://i.imgur.com/tEZDwhL.jpg?420666
- http://i.imgur.com/hAaloD3.jpg
petter
- http://i.imgur.com/TJzIZ40.gif