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
--- | |
root: true | |
parser: babel-eslint | |
extends: | |
# http://eslint.org/docs/user-guide/configuring#using-eslintrecommended | |
- eslint:recommended | |
# https://github.com/gajus/eslint-plugin-flowtype | |
- plugin:flowtype/recommended | |
# https://www.npmjs.com/package/eslint-config-airbnb-base |
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/sh | |
packagejson=$(cat package.json) | |
addtopackagejson=$(echo '{ | |
"author": "Marcel Mokoš <https://github.com/marcelmokos>", | |
"pre-commit": [ | |
"lint:pre-commit" | |
], | |
"scripts": { | |
"test": "jest --env=jsdom", | |
"test:coverage": "yarn test -- --coverage", |
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 | |
# bash script that can setup environment with common linting and testing tools | |
yes="${@}" | |
function yes_or_no { | |
if [[ $yes == "-y" ]]; then | |
echo "🛑👍🛑 !!! skipping question !!! 🛑👍🛑" | |
else |
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
@font-face { | |
font-family: octicons-link; | |
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAA |
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
function rotate(element = $("body"), time = 20, turn = 1) { | |
element.style.transition = `all ${20}s ease-in-out`; | |
element.style.transform = `rotate(${turn}turn)`; | |
} | |
rotate($("body")); | |
// find all and spin | |
function findAll(element) { |
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
// @flow | |
import { type Log } from "./Logs"; | |
type PropsAndState = { | |
/** value */ | |
value: number, | |
/** update value */ | |
updateValue: number => void, | |
}; |
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
// @flow | |
const deriveStateFromProps = (nextProps: Object, prevState: Object) => { | |
const derivedStateUpdate: Object = Object.keys(nextProps).reduce( | |
(acc, key) => { | |
if (nextProps[key] !== undefined && nextProps[key] !== prevState[key]) { | |
return { ...acc, [key]: nextProps[key] }; | |
} | |
return acc; | |
}, |
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
<script data-senna-track="temporary" type="text/javascript"> | |
(function(i,s,o,r,g,v,a,m){ | |
g=v?g+'?v='+v:g;i['BrandEmbassy']=r; | |
i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)};i[r].l=+new Date(); | |
a=s.createElement(o);m=s.getElementsByTagName(o)[0];a.async=1;a.setAttribute("data-senna-track", "temporary"); | |
a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','brandembassy','https://livechat-static.brandembassy.com/3/chat.js'); | |
try { |
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 FormattedNumber = ({ value, roundingFn = val => val }) => roundingFn(value); | |
//js | |
console.log( | |
FormattedNumber({value: 5.6}) /* 5.6 */ | |
); | |
//jsx | |
<FormattedNumber value={5.6} /> /* 5.6 */ | |
<FormattedNumber value={5.6} roundingFn={Math.floor} /> /* 5 */ |
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
<Comment | |
channel={channel} | |
createdAt={createdAt} | |
text={text} | |
getComments={getComments} | |
comments={comments} | |
/> |