This file contains hidden or 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 {VictoryPie, VictoryTheme} from 'victory'; | |
<VictoryPie | |
padAngle={0} | |
// used to hide labels | |
labelComponent={<span/>} | |
innerRadius={70} | |
width={200} height={200} | |
data={[{'key': "", 'y': this.state.metric}, {'key': "", 'y': (100-this.state.metric)} ]} | |
colorScale={["#19B3A6", "#EEEEEE" ]} |
This file contains hidden or 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
<svg width={200} height={200}> | |
<text x={100} y={110} textAnchor="middle" > | |
{this.state.metric}% | |
</text> | |
<VictoryPie | |
padAngle={0} | |
// used to hide labels | |
labelComponent={<span/>} | |
innerRadius={70} | |
width={200} height={200} |
This file contains hidden or 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 | |
# Redirect output to stderr. | |
exec 1>&2 | |
# enable user input | |
exec < /dev/tty | |
consoleregexp='^\+.*console\.log(' | |
# CHECK | |
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
then |
This file contains hidden or 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
npm install nativefier -g |
This file contains hidden or 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
nativefier --name "Google Drive" "https://drive.google.com/drive/recent" |
This file contains hidden or 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
version: '3' | |
services: | |
mongo-parse-server: | |
image: mongo | |
ports: | |
- 27017:27017 | |
parse-server: | |
image: parseplatform/parse-server | |
links: | |
- mongo-parse-server |
This file contains hidden or 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
/*================================================================================================== | |
Application: Utility Function | |
Author: John Gardner | |
Website: http://www.braemoor.co.uk/software/vat.shtml | |
Version: V1.0 | |
Date: 30th July 2005 | |
Description: Used to check the validity of an EU country VAT number |
This file contains hidden or 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 React from 'react'; | |
import MyGreatComponent from './my-component'; | |
class ErrorBoundary extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { hasError: false }; | |
} | |
componentDidCatch(error, info) { |
This file contains hidden or 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
// You can test it in the browser here: https://codepen.io/svschannak/pen/KoLZvm?editors=0011 | |
// try to avoid using const and arrow functions to declare an function, it will help you while debugging | |
function flatten_array(originList){ | |
/** | |
* Flattens an input list with multi levels. | |
* WORKS only with ES6 | |
* Description. (use period) | |
* @param {Array[List]} originList Array List to be flattened. | |
* | |
* @return {Array[List]} New flattened array list. |
This file contains hidden or 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
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.10/bootstrap.sh | |
sudo DOKKU_TAG=v0.12.10 bash bootstrap.sh |