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
window.am5geodata_switzerlandLow = (function () { | |
const map = {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-3.288,34.226],[-3.288,34.217],[-3.278,34.217],[-3.278,34.18],[-3.269,34.175],[-3.269,34.156],[-3.283,34.147],[-3.32,34.147],[-3.32,34.152],[-3.334,34.152],[-3.334,34.147],[-3.348,34.147],[-3.353,34.156],[-3.362,34.156],[-3.362,34.17],[-3.353,34.18],[-3.344,34.184],[-3.334,34.194],[-3.33,34.203],[-3.32,34.203],[-3.316,34.212],[-3.316,34.221],[-3.297,34.221],[-3.288,34.226]]],[[[-2.44,34.258],[-2.432,34.255],[-2.417,34.255],[-2.403,34.245],[-2.395,34.236],[-2.391,34.227],[-2.373,34.214],[-2.362,34.213],[-2.335,34.195],[-2.325,34.183],[-2.309,34.178],[-2.277,34.158],[-2.266,34.148],[-2.235,34.127],[-2.224,34.126],[-2.209,34.121],[-2.194,34.112],[-2.175,34.112],[-2.157,34.094],[-2.143,34.089],[-2.128,34.088],[-2.124,34.084],[-2.118,34.064],[-2.11,34.054],[-2.109,34.04],[-2.095,34.026],[-2.095,34.019],[-2.085,34.009],[-2.087,33.989],[-2.065,33. |
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 { defineConfig } from 'vite'; | |
import react from '@vitejs/plugin-react'; | |
import svgr from "vite-plugin-svgr"; | |
import { customAlphabet } from 'nanoid'; | |
const prefixList = new Set(); | |
const nanoid = customAlphabet("0123456789abcdefghijklmnopqrstuvwxyz", 10); | |
const uniquePrefix = () => { | |
let prefix; | |
do { |
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 { AuthenticationRequest } from '@feathersjs/authentication' | |
import { OAuthProfile, OAuthStrategy } from '@feathersjs/authentication-oauth' | |
import { GeneralError } from '@feathersjs/errors' | |
import { Params } from '@feathersjs/feathers' | |
import axios from 'axios' | |
import { logger } from '../../../logger' | |
export class MicrosoftStrategy extends OAuthStrategy { | |
async getProfile(authResult: AuthenticationRequest, _params: Params) { | |
const { accessToken } = authResult |
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 view = new WebView(); | |
view.shouldAllowRequest = request => { | |
if(request.url.startsWith("http")) { | |
Safari.open(request.url); | |
return false; | |
} | |
return true; | |
} |
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 computeRelativeTime = (time) => { | |
if(typeof time === 'string') { | |
return computeRelativeTime(new Date(time)); | |
} | |
const plural = (val) => val !== 1 ? 's' : ''; | |
const format = (val, unit) => `${val} ${unit}${plural(val)} ago`; | |
let diff = (Date.now() - time.getTime()) / 1000; |
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
git archive --format zip --output=./changes.zip HEAD $(git diff --name-only <SHA> <SHA>) |
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
alias ls='ls -G' | |
alias ..='cd ..' | |
alias start='npm run start' | |
alias updalias='source ~/.bashrc' | |
alias wget='wget -c ' | |
alias makepass="openssl rand -base64 20" | |
alias ipe='curl ipinfo.io/ip' | |
alias ipl='ipconfig getifaddr en0' | |
alias c='clear' |
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
//Need to be run on : http://fontawesome.io/icons/ | |
$.map($("h2.page-header").map(function(){ | |
var a = $(this).nextAll(".row:first").find("a").map(function(){ | |
return $(this).attr('href').split("/").slice(-1)[0]; | |
}); | |
return {title: $(this).html(), options: a} | |
}), function(object){ return "<optgroup label='"+object.title+"'>"+$.map($.unique(object.options), function(option){ return "<option>"+option+"</option>"; }).join("")+"</optgroup>"; }).join(""); |
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
{ | |
"500px.com": { | |
"color": "#0099e5", | |
"name": "500px", | |
"unicode": "\\f26e " | |
}, | |
"amazon.com": { | |
"color": "#ff9900", | |
"name": "amazon", | |
"unicode": "\\f270 " |