Vanilla Debounce esnextbin
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
module.exports = { | |
projects: [ | |
{ | |
displayName: 'dom', | |
testEnvironment: 'jsdom', | |
snapshotSerializers: ['enzyme-to-json/serializer'], | |
testMatch: ['**/__tests__/**/*.test.js?(x)'] | |
}, | |
{ | |
displayName: 'node', |
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 Head from 'next/head' | |
import SEO from '../constants/seo' | |
export default ({ | |
title = SEO.title, | |
description = SEO.description, | |
pageUrl = SEO.siteUrl, | |
mainImage = SEO.mainImage, | |
iosApplink = SEO.quizBuzzHomeUrl, | |
androidAppLink = SEO.quizBuzzHomeUrl, |
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
#!/bin/bash | |
# install: | |
# copy this file to /usr/local/bin/shove | |
# sudo chmod +x /usr/local/bin/shove | |
# then use: shove alpha | |
remoteBranch=${1?Please specify origin branch to shove} | |
localBranch=`git symbolic-ref --short -q HEAD` | |
read -p "Force push local branch ($localBranch) => (origin/$remoteBranch). Proceed? (y/n) " -r |
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
/@\s*?media\s*?\(\s*?(min|max)-(width|height)\s*?:\s*?(\d+)(px|em)\s*?\)\s*?{(.*)}/gms | |
/** | |
* Only basically tested. | |
* Should match min-max-width-height number px|em and following rules. | |
* Provides capturing groups to determinate condition alongside with css. | |
* | |
* Created with help of regex101 | |
* https://regex101.com/r/zA6fX2/1 |
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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
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"> | |
<!-- Replace with your own title --> | |
<title>Your Project's Title</title> | |
<script> | |
// Add your own shareable dropbox link | |
window.location.replace("https://www.dropbox.com"); | |
</script> |
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
// Returns a function, that, as long as it continues to be invoked, will not | |
// be triggered. The function will be called after it stops being called for | |
// N milliseconds. If `immediate` is passed, trigger the function on the | |
// leading edge, instead of the trailing. | |
function debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
clearTimeout(timeout); |
If you want to do cleaning on your Facebook timeline, you may want to unlike all Facebook pages quickly. There is a way for that :
- Go to firefox and install iMacros
- Open a text editor (i.e. Notepad, Sublime Text), and paste that code inside :
VERSION BUILD=7401110 RECORDER=FX
NewerOlder