import React, { useEffect } from "react";
export default function Buymeacoffee() {
useEffect(() => {
const script = document.createElement("script");
const div = document.getElementById("supportByBMC");
script.setAttribute("data-name", "BMC-Widget");
script.src = "https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js";
script.setAttribute("data-id", "evavic44");
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, { useState } from 'react' | |
import ReactMapGL, { Marker } from 'react-map-gl' | |
import { WebMercatorViewport } from '@deck.gl/core' | |
const getBoundsForPoints = (points, { width = 200, height = 500, padding = 0 } = {}) => { | |
// Calculate corner values of bounds | |
const pointsLong = points.map(point => point.coordinates._long) | |
const pointsLat = points.map(point => point.coordinates._lat) | |
const cornersLongLat = [ | |
[Math.min(...pointsLong), Math.min(...pointsLat)], |
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
const readline = require('readline'); | |
const readLineAsync = () => { | |
const rl = readline.createInterface({ | |
input: process.stdin | |
}); | |
return new Promise((resolve) => { | |
rl.prompt(); | |
rl.on('line', (line) => { |
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
const got = require('got') | |
const cors = require('@koa/cors') | |
const Koa = require('koa') | |
const KoaRouter = require('koa-router') | |
const globalTunnel = require('global-tunnel-ng') | |
const { PROXY } = process.env | |
if (PROXY) { | |
const [ host, port ] = PROXY.split(':') |
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
/** | |
* Append data to a Google Spreadsheet | |
* | |
* You will need a file called '.env' with the following values: | |
* | |
* - GOOGLE_ID (Google oAuth Client ID) | |
* - GOOGLE_SECRET (Google oAuth Client Secret) | |
* - GOOGLE_REFRESH_TOKEN (Google oAuth Refresh Token) | |
* - GOOGLE_SPREADSHEET_ID (Google Spreadsheet ID) | |
* |
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
var _computeRectangleArea = function(bounds) { | |
if (!bounds) { | |
return 0; | |
} | |
var sw = bounds.getSouthWest(); | |
var ne = bounds.getNorthEast(); | |
var southWest = new google.maps.LatLng(sw.lat(), sw.lng()); | |
var northEast = new google.maps.LatLng(ne.lat(), ne.lng()); | |
var southEast = new google.maps.LatLng(sw.lat(), ne.lng()); | |
var northWest = new google.maps.LatLng(ne.lat(), sw.lng()); |
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
/*! | |
* Metronome.js | |
* | |
* A reliable metronome using HTML5 Web Workers to maintain the tick | |
* interval even when the parent thread is run in the background. | |
* | |
* For details, see: | |
* http://pivotallabs.com/chrome-and-firefox-throttle-settimeout-setinterval-in-inactive-tabs/ | |
* |
NewerOlder