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
{ | |
"workbench.colorCustomizations": { | |
// copy from Catppuccin for VSCode theme (catppuccin.catppuccin-vsc): ~/.vscode/extensions/catppuccin.catppuccin-vsc-3.16.0/themes/mocha.json | |
"terminal.foreground": "#cdd6f4", | |
"terminal.ansiBlack": "#45475a", | |
"terminal.ansiRed": "#f38ba8", | |
"terminal.ansiGreen": "#a6e3a1", | |
"terminal.ansiYellow": "#f9e2af", | |
"terminal.ansiBlue": "#89b4fa", | |
"terminal.ansiMagenta": "#f5c2e7", |
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 { height, width } = await new Promise(resolve => { | |
const fr = new FileReader(); | |
fr.onload = () => { | |
const img = new Image(); | |
img.onload = () => { | |
resolve({ width: img.width, height: img.height }); | |
}; | |
img.src = fr.result; | |
}; | |
fr.readAsDataURL(file); |
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 express = require('express'); | |
const request = require('request'); | |
const { | |
PROXIED_HOST: proxiedHost = 'https://tomekf.pl', | |
PROXY_PORT: proxyPort = 1337, | |
LOCAL_PORT: localPort = 8000, | |
LOCAL_HOST: localHost = 'http://localhost', | |
} = process.env; |
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 http = require('http'); | |
const { parse: urlParse } = require('url'); | |
const { parse: querystringParse } = require('querystring'); | |
const log = require('fancy-log'); | |
const chalk = require('chalk'); | |
const env = require('minimist')(process.argv.slice(2)); | |
const getUrlVar = (where, item) => querystringParse(urlParse(where).query)[item]; | |
const line = '-'.repeat(80); |
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 eartMeanRadiusInMeters = 6378137; | |
function rad(x) { | |
return x * Math.PI / 180; | |
} | |
function distHaversine(p1, p2) { | |
var radLat = rad(p2.lat() - p1.lat()); | |
var radLng = rad(p2.lng() - p1.lng()); | |
var intermediate = |