mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 23:00:19 +03:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f63ae14d6f |
No files matched your search
Vendored
+4
-3
@@ -80,6 +80,7 @@ declare module '@vue/runtime-core' {
|
||||
EtaCalculator: typeof import('./src/tools/eta-calculator/eta-calculator.vue')['default']
|
||||
FavoriteButton: typeof import('./src/components/FavoriteButton.vue')['default']
|
||||
FormatTransformer: typeof import('./src/components/FormatTransformer.vue')['default']
|
||||
GeoDistanceCalculator: typeof import('./src/tools/geo-distance-calculator/geo-distance-calculator.vue')['default']
|
||||
GitMemo: typeof import('./src/tools/git-memo/git-memo.vue')['default']
|
||||
'GitMemo.content': typeof import('./src/tools/git-memo/git-memo.content.md')['default']
|
||||
HashText: typeof import('./src/tools/hash-text/hash-text.vue')['default']
|
||||
@@ -130,18 +131,19 @@ declare module '@vue/runtime-core' {
|
||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||
@@ -187,7 +189,6 @@ declare module '@vue/runtime-core' {
|
||||
WifiQrCodeGenerator: typeof import('./src/tools/wifi-qr-code-generator/wifi-qr-code-generator.vue')['default']
|
||||
XmlFormatter: typeof import('./src/tools/xml-formatter/xml-formatter.vue')['default']
|
||||
XmlToJson: typeof import('./src/tools/xml-to-json/xml-to-json.vue')['default']
|
||||
XVrSpamcauseDecoder: typeof import('./src/tools/x-vr-spamcause-decoder/x-vr-spamcause-decoder.vue')['default']
|
||||
YamlToJson: typeof import('./src/tools/yaml-to-json-converter/yaml-to-json.vue')['default']
|
||||
YamlToToml: typeof import('./src/tools/yaml-to-toml/yaml-to-toml.vue')['default']
|
||||
YamlViewer: typeof import('./src/tools/yaml-viewer/yaml-viewer.vue')['default']
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
"@tiptap/starter-kit": "2.1.6",
|
||||
"@tiptap/vue-3": "2.0.3",
|
||||
"@types/figlet": "^1.5.8",
|
||||
"@types/haversine": "^1.1.8",
|
||||
"@types/markdown-it": "^13.0.7",
|
||||
"@vicons/material": "^0.12.0",
|
||||
"@vicons/tabler": "^0.12.0",
|
||||
@@ -67,6 +68,7 @@
|
||||
"figlet": "^1.7.0",
|
||||
"figue": "^1.2.0",
|
||||
"fuse.js": "^6.6.2",
|
||||
"haversine": "^1.1.1",
|
||||
"highlight.js": "^11.7.0",
|
||||
"iarna-toml-esm": "^3.0.5",
|
||||
"ibantools": "^4.3.3",
|
||||
|
||||
Generated
+21
-7
@@ -32,6 +32,9 @@ dependencies:
|
||||
'@types/figlet':
|
||||
specifier: ^1.5.8
|
||||
version: 1.7.0
|
||||
'@types/haversine':
|
||||
specifier: ^1.1.8
|
||||
version: 1.1.8
|
||||
'@types/markdown-it':
|
||||
specifier: ^13.0.7
|
||||
version: 13.0.9
|
||||
@@ -95,6 +98,9 @@ dependencies:
|
||||
fuse.js:
|
||||
specifier: ^6.6.2
|
||||
version: 6.6.2
|
||||
haversine:
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1
|
||||
highlight.js:
|
||||
specifier: ^11.7.0
|
||||
version: 11.7.0
|
||||
@@ -1834,7 +1840,7 @@ packages:
|
||||
'@babel/helper-split-export-declaration': 7.22.6
|
||||
'@babel/parser': 7.22.10
|
||||
'@babel/types': 7.22.10
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -3359,6 +3365,10 @@ packages:
|
||||
'@types/node': 18.15.11
|
||||
dev: true
|
||||
|
||||
/@types/haversine@1.1.8:
|
||||
resolution: {integrity: sha512-t2loPC7vWBPGUlViZy0K5KeyHBL5FP7UPhdzQMI98ofy+D9/tv+2ciAB1eAhCSseMDMLqQvS4KNk8PSMC+TOHg==}
|
||||
dev: false
|
||||
|
||||
/@types/jsdom@21.1.0:
|
||||
resolution: {integrity: sha512-leWreJOdnuIxq9Y70tBVm/bvTuh31DSlF/r4l7Cfi4uhVQqLHD0Q4v301GMisEMwwbMgF7ZKxuZ+Jbd4NcdmRw==}
|
||||
dependencies:
|
||||
@@ -3608,7 +3618,7 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2)
|
||||
'@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.2.2)
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
eslint: 8.47.0
|
||||
ts-api-utils: 1.0.1(typescript@5.2.2)
|
||||
typescript: 5.2.2
|
||||
@@ -3663,7 +3673,7 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.4.1
|
||||
'@typescript-eslint/visitor-keys': 6.4.1
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
semver: 7.6.3
|
||||
@@ -3727,7 +3737,7 @@ packages:
|
||||
'@typescript-eslint/types': 6.4.1
|
||||
'@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2)
|
||||
eslint: 8.47.0
|
||||
semver: 7.5.4
|
||||
semver: 7.6.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- typescript
|
||||
@@ -4549,7 +4559,7 @@ packages:
|
||||
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
|
||||
engines: {node: '>= 6.0.0'}
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -4798,7 +4808,7 @@ packages:
|
||||
/builtins@5.0.1:
|
||||
resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==}
|
||||
dependencies:
|
||||
semver: 7.5.4
|
||||
semver: 7.6.3
|
||||
dev: true
|
||||
|
||||
/bundle-require@5.1.0(esbuild@0.24.2):
|
||||
@@ -6772,6 +6782,10 @@ packages:
|
||||
function-bind: 1.1.2
|
||||
dev: true
|
||||
|
||||
/haversine@1.1.1:
|
||||
resolution: {integrity: sha512-KW4MS8+krLIeiw8bF5z532CptG0ZyGGFj0UbKMxx25lKnnJ1hMUbuzQl+PXQjNiDLnl1bOyz23U6hSK10r4guw==}
|
||||
dev: false
|
||||
|
||||
/he@1.2.0:
|
||||
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
|
||||
dev: false
|
||||
@@ -10327,7 +10341,7 @@ packages:
|
||||
espree: 9.6.1
|
||||
esquery: 1.5.0
|
||||
lodash: 4.17.21
|
||||
semver: 7.5.4
|
||||
semver: 7.6.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
@@ -128,7 +128,7 @@ function activateOption(option: PaletteOption) {
|
||||
<c-input-text ref="inputRef" v-model:value="searchPrompt" raw-text placeholder="Type to search a tool or a command..." autofocus clearable />
|
||||
|
||||
<div v-for="(options, category) in filteredSearchResult" :key="category">
|
||||
<div ml-3 mt-3 text-sm font-bold text-primary op-60>
|
||||
<div ml-3 mt-3 text-sm text-primary font-bold op-60>
|
||||
{{ category }}
|
||||
</div>
|
||||
<command-palette-option v-for="option in options" :key="option.name" :option="option" :selected="selectedOptionIndex === getOptionIndex(option)" @activated="activateOption" />
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<script setup lang="ts">
|
||||
import haversine from 'haversine';
|
||||
import SpanCopyable from '@/components/SpanCopyable.vue';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const latitude1 = useQueryParamOrStorage({ name: 'lat1', storageName: 'geo-dist:lat1', defaultValue: 0 });
|
||||
const longitude1 = useQueryParamOrStorage({ name: 'lng1', storageName: 'geo-dist:lng1', defaultValue: 0 });
|
||||
|
||||
const latitude2 = useQueryParamOrStorage({ name: 'lat2', storageName: 'geo-dist:lat2', defaultValue: 0 });
|
||||
const longitude2 = useQueryParamOrStorage({ name: 'lng2', storageName: 'geo-dist:lng2', defaultValue: 0 });
|
||||
|
||||
const start = computed(() => ({ latitude: latitude1.value, longitude: longitude1.value }));
|
||||
const end = computed(() => ({ latitude: latitude2.value, longitude: longitude2.value }));
|
||||
|
||||
const { coords: userCoords } = useGeolocation();
|
||||
|
||||
const distanceKM = computed(() => haversine(start.value, end.value, { unit: 'km' }));
|
||||
const distanceMeter = computed(() => haversine(start.value, end.value, { unit: 'meter' }));
|
||||
const distanceMile = computed(() => haversine(start.value, end.value, { unit: 'mile' }));
|
||||
const distanceNMI = computed(() => haversine(start.value, end.value, { unit: 'nmi' }));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-card title="Distance computer" mb-2>
|
||||
<n-form-item label="Geolocation 1 (latitude, longitude):">
|
||||
<n-space justify="space-between">
|
||||
<n-input-number v-model:value="latitude1" :min="-90" :max="90" placeholder="Latitude..." />
|
||||
<n-input-number v-model:value="longitude1" :min="-180" :max="180" placeholder="Longitude..." />
|
||||
</n-space>
|
||||
</n-form-item>
|
||||
<n-form-item label="Geolocation 2 (latitude, longitude):" gap-2>
|
||||
<n-space justify="space-between">
|
||||
<n-input-number v-model:value="latitude2" :min="-90" :max="90" placeholder="Latitude..." />
|
||||
<n-input-number v-model:value="longitude2" :min="-180" :max="180" placeholder="Longitude..." />
|
||||
</n-space>
|
||||
</n-form-item>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<n-form-item label="Distance (km):" label-width="120px" label-placement="left">
|
||||
<SpanCopyable :value="distanceKM.toString()" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Distance (mile):" label-width="120px" label-placement="left">
|
||||
<SpanCopyable :value="distanceMile.toString()" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Distance (meter):" label-width="120px" label-placement="left">
|
||||
<SpanCopyable :value="distanceMeter.toString()" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Distance (nmi):" label-width="120px" label-placement="left">
|
||||
<SpanCopyable :value="distanceNMI.toString()" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Your position">
|
||||
<n-space justify="center">
|
||||
<n-form-item label="Latitude:" label-placement="left">
|
||||
<SpanCopyable :value="userCoords?.latitude?.toString() || 'Unknown'" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Longitude:" label-placement="left">
|
||||
<SpanCopyable :value="userCoords?.longitude?.toString() || 'Unknown'" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
<n-space justify="center">
|
||||
<n-form-item label="Altitude:" label-placement="left">
|
||||
<SpanCopyable :value="userCoords?.altitude?.toString() || 'Unknown'" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Heading:" label-placement="left">
|
||||
<SpanCopyable :value="userCoords?.heading?.toString() || 'Unknown'" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Speed:" label-placement="left">
|
||||
<SpanCopyable :value="userCoords?.speed?.toString() || 'Unknown'" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Accuracy:" label-placement="left">
|
||||
<SpanCopyable :value="userCoords?.accuracy?.toString() || 'Unknown'" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { WorldLatitude } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Geo distance calculator',
|
||||
path: '/geo-distance-calculator',
|
||||
description: 'Compute distance between two geo location (and display current user location information)',
|
||||
keywords: ['geo', 'distance', 'calculator'],
|
||||
component: () => import('./geo-distance-calculator.vue'),
|
||||
icon: WorldLatitude,
|
||||
createdAt: new Date('2025-01-01'),
|
||||
});
|
||||
+8
-11
@@ -2,7 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter';
|
||||
import { tool as base64StringConverter } from './base64-string-converter';
|
||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||
import { tool as emailNormalizer } from './email-normalizer';
|
||||
import { tool as xVrSpamcauseDecoder } from './x-vr-spamcause-decoder';
|
||||
import { tool as geoDistanceCalculator } from './geo-distance-calculator';
|
||||
|
||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||
|
||||
@@ -165,15 +165,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
},
|
||||
{
|
||||
name: 'Network',
|
||||
components: [
|
||||
ipv4SubnetCalculator,
|
||||
ipv4AddressConverter,
|
||||
ipv4RangeExpander,
|
||||
macAddressLookup,
|
||||
macAddressGenerator,
|
||||
ipv6UlaGenerator,
|
||||
xVrSpamcauseDecoder,
|
||||
],
|
||||
components: [ipv4SubnetCalculator, ipv4AddressConverter, ipv4RangeExpander, macAddressLookup, macAddressGenerator, ipv6UlaGenerator],
|
||||
},
|
||||
{
|
||||
name: 'Math',
|
||||
@@ -181,7 +173,12 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
},
|
||||
{
|
||||
name: 'Measurement',
|
||||
components: [chronometer, temperatureConverter, benchmarkBuilder],
|
||||
components: [
|
||||
chronometer,
|
||||
temperatureConverter,
|
||||
benchmarkBuilder,
|
||||
geoDistanceCalculator,
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Text',
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { RecordMail } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'X-VR-SpamCause Decoder',
|
||||
path: '/x-vr-spamcause-decoder',
|
||||
description: 'Decode X-VR-SPAMCAUSE header in OVH mails',
|
||||
keywords: ['ovh', 'vade', 'retro', 'vr', 'spam', 'spamcause', 'decoder'],
|
||||
component: () => import('./x-vr-spamcause-decoder.vue'),
|
||||
icon: RecordMail,
|
||||
createdAt: new Date('2024-08-15'),
|
||||
});
|
||||
@@ -1,10 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { spamCauseDecode } from './x-vr-spamcause-decoder.service';
|
||||
|
||||
describe('x-vr-spamcause-decoder', () => {
|
||||
it('should decode X-VR-SPAMCAUSE', () => {
|
||||
expect(spamCauseDecode('gggruggvucftvghtrhhoucdtuddrfeelgedrvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucgohfhorhgsihguuggvnhfjughrucdlhedttddm')).toBe(
|
||||
'Vade Retro 01.394.21 AS+AV+AP+RT Profile: OVH; Bailout: 300; ^ForbiddenHdr (500)',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,24 +0,0 @@
|
||||
function unrot(a: string, b: string, pos: number) {
|
||||
if (b === undefined) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (pos % 2 === 0) {
|
||||
const c = a;
|
||||
a = b;
|
||||
b = c;
|
||||
}
|
||||
|
||||
const offset = ('g'.charCodeAt(0) - a.charCodeAt(0)) * 16;
|
||||
return String.fromCharCode((a.charCodeAt(0) + b.charCodeAt(0)) - 'x'.charCodeAt(0) - offset);
|
||||
}
|
||||
|
||||
export function spamCauseDecode(text: string) {
|
||||
let result = '';
|
||||
|
||||
for (let n = 0; n < text.length; n += 2) {
|
||||
result += unrot(text[n], text[n + 1], Math.floor(n / 2));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { spamCauseDecode } from './x-vr-spamcause-decoder.service';
|
||||
|
||||
const encodedXVRSpamCause = ref('');
|
||||
const decoded = computed(() => spamCauseDecode(encodedXVRSpamCause.value));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="encodedXVRSpamCause"
|
||||
label="Encoded X-VR-SPAMCAUSE:"
|
||||
multiline
|
||||
rows="1"
|
||||
autosize
|
||||
placeholder="Your X-VR-SPAMCAUSE header value..."
|
||||
mb-6
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<textarea-copyable readonly label="Decoded" :value="decoded" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -151,7 +151,7 @@ function onSearchInput() {
|
||||
>
|
||||
<div flex-1 truncate>
|
||||
<slot name="displayed-value">
|
||||
<input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full lh-normal color-current @input="onSearchInput">
|
||||
<input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full color-current lh-normal @input="onSearchInput">
|
||||
<span v-else-if="selectedOption" lh-normal>
|
||||
{{ selectedOption.label }}
|
||||
</span>
|
||||
|
||||
@@ -39,7 +39,7 @@ const headers = computed(() => {
|
||||
<template>
|
||||
<div class="relative overflow-x-auto rounded">
|
||||
<table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400" role="table" :aria-label="description">
|
||||
<thead v-if="!hideHeaders" class="bg-#ffffff uppercase text-gray-700 dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5">
|
||||
<thead v-if="!hideHeaders" class="bg-#ffffff text-gray-700 uppercase dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5">
|
||||
<tr>
|
||||
<th v-for="header in headers" :key="header.key" scope="col" class="px-6 py-3 text-xs">
|
||||
{{ header.label }}
|
||||
|
||||
Reference in new issue
Block a user