mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-10-23 04:52:14 +00:00
Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d87091b23f | ||
|
b65b69dd97 | ||
|
5bd5d2c2f3 | ||
|
55dffa5635 | ||
|
baee5e6656 | ||
|
df5804c71d | ||
|
8e99a0a783 | ||
|
6e22b12494 | ||
|
aaa154d0b8 | ||
|
37b28c8d21 | ||
|
06aac238b2 | ||
|
a282c526c1 | ||
|
19eafdbe37 | ||
|
635552fbce | ||
|
7f8404645d | ||
|
66c569f886 | ||
|
f02a816eaa | ||
|
f0d8a3ad26 | ||
|
f91a2a1343 | ||
|
845d106927 | ||
|
25bbf9b5f3 | ||
|
853e24ca75 | ||
|
41fadc7334 | ||
|
19ab6d06c3 | ||
|
d92c46c60b | ||
|
ed176c7b8c | ||
|
e152651a4b | ||
|
a20858dfb8 | ||
|
b75603f311 | ||
|
d27c133a66 |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -4,16 +4,33 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Next
|
||||
- [feat] [Crontab friendly generator](https://it-tools.tech/crontab-generator)
|
||||
|
||||
## 1.6.0
|
||||
- [feat] [BIP39 generator](https://it-tools.tech/bip39-generator)
|
||||
- [feat] [Base 64 converter](https://it-tools.tech/base64-string-converter)
|
||||
|
||||
## 1.5.2
|
||||
- [feat] [humans.txt](https://it-tools.tech/humans.txt)
|
||||
- [feat] pwa auto update on new changes
|
||||
|
||||
## 1.5.1
|
||||
- [feat] switched back to history mode (no more '#' in url)
|
||||
|
||||
## 1.5.0
|
||||
- [feat] added [qr-code generator](https://it-tools.tech/qrcode-generator)
|
||||
|
||||
## 1.4.0
|
||||
- [ui] condensed + colored sidenav
|
||||
- [feat] added [git memo](/#/git-memo)
|
||||
- [feat] added [git memo](https://it-tools.tech/git-memo)
|
||||
- [refactor] changed app title
|
||||
|
||||
## 1.3.0
|
||||
- [fix] [GithubContributors] ordered contributors by contribution count
|
||||
- [refactor] used vue-typecasting for number inputs
|
||||
- [feat] lazy loading tools routes
|
||||
- [feat] added [markdown editor](/#/markdown-editor)
|
||||
- [feat] added [lorem ipsum generator](/#/lorem-ipsum-generator)
|
||||
- [feat] added [markdown editor](https://it-tools.tech/markdown-editor)
|
||||
- [feat] added [lorem ipsum generator](https://it-tools.tech/lorem-ipsum-generator)
|
||||
|
||||
## 1.2.1
|
||||
- [fix] [UuidGenerator] added quantity validation rules
|
||||
|
33
README.md
33
README.md
@@ -18,12 +18,14 @@ Here is an unordered list of the current functionalities, and some that may come
|
||||
- [x] Markdown editor
|
||||
- [x] Lorem ipsum text generator
|
||||
- [x] Git memo (cheat sheet)
|
||||
- [x] QR code generator
|
||||
- [x] Bip39 pass-phrase generator
|
||||
- [x] Base 64 string converter
|
||||
- [x] Crontab friendly generator
|
||||
- [ ] CSS memo (cheat sheet)
|
||||
- [ ] REGEX memo (cheat sheet) + tester?
|
||||
- [ ] Minify/un-minify
|
||||
- [ ] Image exif editor/remover
|
||||
- [ ] QR code generator
|
||||
- [ ] Bip39 pass-phrase generator
|
||||
- [ ] Crontab friendly generator
|
||||
- [ ] Image format converter?
|
||||
- [ ] Image cropper
|
||||
- [ ] Image resizer
|
||||
@@ -52,10 +54,33 @@ npm run lint
|
||||
## Contribute
|
||||
**Pull requests are welcome !** Feel free to contribute.
|
||||
|
||||
### Add a tool
|
||||
To add a tool you just have to create a vue component in [src/routes/tools](./src/routes/tools), example:
|
||||
```vue
|
||||
<template>
|
||||
<v-card class="single-card">
|
||||
<v-card-title>My component</v-card-title>
|
||||
<v-card-text>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "My component"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
</style>
|
||||
```
|
||||
|
||||
Then, update the file [router.js](./src/router.js) specifying info of the component.
|
||||
Use [fontawesome 5](https://fontawesome.com/icons?d=gallery&m=free) for icons.
|
||||
|
||||
## Credits
|
||||
Coded with ❤️ by [Corentin Thomasset](//corentin-thomasset.fr).
|
||||
|
||||
This project is continuously deployed using [vercel.com](https://vercel.com).
|
||||
|
||||
## License
|
||||
This project is under the [MIT license](LICENSE).
|
||||
This project is under the [MIT license](LICENSE).
|
||||
|
56
package-lock.json
generated
56
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "it-tools",
|
||||
"version": "1.4.0",
|
||||
"version": "1.7.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -2483,6 +2483,24 @@
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"bip39": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.2.tgz",
|
||||
"integrity": "sha512-J4E1r2N0tUylTKt07ibXvhpT2c5pyAFgvuA5q1H9uDy6dEGpjV8jmymh3MTYJDLCNbIVClSB9FbND49I6N24MQ==",
|
||||
"requires": {
|
||||
"@types/node": "11.11.6",
|
||||
"create-hash": "^1.1.0",
|
||||
"pbkdf2": "^3.0.9",
|
||||
"randombytes": "^2.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "11.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz",
|
||||
"integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
||||
@@ -3023,7 +3041,6 @@
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
|
||||
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
@@ -3682,7 +3699,6 @@
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
|
||||
"integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cipher-base": "^1.0.1",
|
||||
"inherits": "^2.0.1",
|
||||
@@ -3695,7 +3711,6 @@
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
|
||||
"integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cipher-base": "^1.0.3",
|
||||
"create-hash": "^1.1.0",
|
||||
@@ -3705,6 +3720,16 @@
|
||||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"cron-validator": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/cron-validator/-/cron-validator-1.1.1.tgz",
|
||||
"integrity": "sha512-vfZb05w/wezuwPZBDvdIBmJp2BvuJExHeyKRa5oBqD2ZDXR61hb3QgPc/3ZhBEQJlAy8Jlnn5XC/JCT3IDqxwg=="
|
||||
},
|
||||
"cronstrue": {
|
||||
"version": "1.96.0",
|
||||
"resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-1.96.0.tgz",
|
||||
"integrity": "sha512-kNuuN0AXqspm+jlpwiecFSFBrG5dYBaL5EaW5MEjGAh4IFT/jbKwKCNhzWb8N5NulKQUHEDN7w98GjoAm6PmMg=="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
@@ -6225,7 +6250,6 @@
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
|
||||
"integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
@@ -6633,8 +6657,7 @@
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "7.1.0",
|
||||
@@ -7918,9 +7941,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash._reinterpolate": {
|
||||
@@ -8117,7 +8140,6 @@
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
|
||||
"integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"hash-base": "^3.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
@@ -9094,7 +9116,6 @@
|
||||
"version": "3.0.17",
|
||||
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
|
||||
"integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"create-hash": "^1.1.2",
|
||||
"create-hmac": "^1.1.4",
|
||||
@@ -9990,6 +10011,11 @@
|
||||
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
|
||||
"dev": true
|
||||
},
|
||||
"qrcode.vue": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz",
|
||||
"integrity": "sha512-R7t6Y3fDDtcU7L4rtqwGUDP9xD64gJhIwpfjhRCTKmBoYF6SS49PIJHRJ048cse6OI7iwTwgyy2C46N9Ygoc6g=="
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
|
||||
@@ -10028,7 +10054,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
@@ -10461,7 +10486,6 @@
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
|
||||
"integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"hash-base": "^3.0.0",
|
||||
"inherits": "^2.0.1"
|
||||
@@ -10508,8 +10532,7 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"safe-regex": {
|
||||
"version": "1.1.0",
|
||||
@@ -10770,7 +10793,6 @@
|
||||
"version": "2.4.11",
|
||||
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
|
||||
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.1",
|
||||
"safe-buffer": "^5.0.1"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "it-tools",
|
||||
"description": "",
|
||||
"version": "1.4.0",
|
||||
"version": "1.7.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
@@ -10,11 +10,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.2",
|
||||
"bip39": "^3.0.2",
|
||||
"color-convert": "^2.0.1",
|
||||
"color-name": "^1.1.4",
|
||||
"core-js": "^3.6.4",
|
||||
"cron-validator": "^1.1.1",
|
||||
"cronstrue": "^1.96.0",
|
||||
"dompurify": "^2.0.11",
|
||||
"marked": "^1.1.0",
|
||||
"qrcode.vue": "^1.7.0",
|
||||
"register-service-worker": "^1.7.1",
|
||||
"roboto-fontface": "*",
|
||||
"vue": "^2.6.11",
|
||||
|
5
public/humans.txt
Normal file
5
public/humans.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
/* TEAM */
|
||||
Developer: Corentin Thomasset
|
||||
Site: https://github.com/CorentinTh
|
||||
Twitter: @cthmsst
|
||||
|
@@ -17,6 +17,8 @@
|
||||
<meta itemprop="image" content="/img/banner.png">
|
||||
<meta property="og:image" content="/img/banner.png">
|
||||
<meta name="twitter:image" content="/img/banner.png">
|
||||
<link rel="author" href="humans.txt" />
|
||||
<meta name="robots" content="noindex">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
@@ -1,2 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Disallow: *
|
||||
|
58
src/components/ColorInput.vue
Normal file
58
src/components/ColorInput.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<v-text-field v-model="color" hide-details class="ma-0 pa-0" outlined :label="label" v-on:input="$emit('input', color)">
|
||||
<template v-slot:append>
|
||||
<v-menu v-model="menu" top nudge-bottom="101" nudge-left="16" :close-on-content-click="false">
|
||||
<template v-slot:activator="{ on }">
|
||||
<div :style="swatchStyle" v-on="on" />
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text class="pa-0">
|
||||
<v-color-picker v-model="color" flat v-on:input="$emit('input', color)"/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-menu>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// From: https://codepen.io/JamieCurnow/pen/KKPjraK
|
||||
|
||||
export default {
|
||||
name: "ColorInput",
|
||||
props:{
|
||||
value: {
|
||||
type: String,
|
||||
default: '#FFFFFF'
|
||||
},
|
||||
label:String
|
||||
},
|
||||
data: () => ({
|
||||
menu: false,
|
||||
color:''
|
||||
}),
|
||||
mounted() {
|
||||
this.color = this.value
|
||||
},
|
||||
computed: {
|
||||
swatchStyle() {
|
||||
const { color, menu } = this
|
||||
return {
|
||||
backgroundColor: color,
|
||||
cursor: 'pointer',
|
||||
height: '30px',
|
||||
width: '30px',
|
||||
borderRadius: menu ? '50%' : '4px',
|
||||
transition: 'border-radius 200ms ease-in-out'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
::v-deep .v-input__append-inner{
|
||||
margin-top: 13px;
|
||||
}
|
||||
|
||||
</style>
|
@@ -20,7 +20,8 @@ if (process.env.NODE_ENV === 'production') {
|
||||
console.log('New content is downloading.')
|
||||
},
|
||||
updated () {
|
||||
console.log('New content is available; please refresh.')
|
||||
console.log('New content is available; hard refresh.');
|
||||
window.location.reload(true);
|
||||
},
|
||||
offline () {
|
||||
console.log('No internet connection found. App is running in offline mode.')
|
||||
|
@@ -38,6 +38,13 @@ const toolsComponents = [
|
||||
component: () => import('./routes/tools/TextCypher'),
|
||||
keywords: ['aes', 'tripledes', 'rabbit', 'rabbitlegacy', 'rc4']
|
||||
},
|
||||
{
|
||||
icon: 'fa-file-word',
|
||||
text: 'BIP39 passphrase generator',
|
||||
path: '/bip39-generator',
|
||||
component: () => import('./routes/tools/BIP39Generator'),
|
||||
keywords: []
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -82,6 +89,12 @@ const toolsComponents = [
|
||||
path: '/file-to-base64',
|
||||
component: () => import('./routes/tools/FileToBase64')
|
||||
},
|
||||
{
|
||||
icon: 'fa-file-alt',
|
||||
text: 'Base64 string converter',
|
||||
path: '/base64-string-converter',
|
||||
component: () => import('./routes/tools/StringToBase64')
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -121,7 +134,25 @@ const toolsComponents = [
|
||||
keywords: ['git', 'push', 'rebase', 'merge', 'tag', 'commit', 'checkout']
|
||||
}
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Miscellaneous',
|
||||
child: [
|
||||
{
|
||||
text: 'Crontab generator',
|
||||
path: '/crontab-generator',
|
||||
icon: 'fa-clock',
|
||||
component: () => import('./routes/tools/CrontabGenerator'),
|
||||
keywords: ['Cron', 'Schedule']
|
||||
},
|
||||
{
|
||||
text: 'QR Code generator',
|
||||
path: '/qrcode-generator',
|
||||
icon: 'fa-qrcode',
|
||||
component: () => import('./routes/tools/QRCodeGenerator'),
|
||||
keywords: []
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -147,6 +178,7 @@ const routes = [
|
||||
|
||||
const router = new VueRouter({
|
||||
base: process.env.BASE_URL,
|
||||
mode: 'history',
|
||||
routes
|
||||
});
|
||||
|
||||
|
99
src/routes/tools/BIP39Generator.vue
Normal file
99
src/routes/tools/BIP39Generator.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<v-card class="single-card">
|
||||
<v-card-title>BIP39 passphrase generator</v-card-title>
|
||||
<v-card-text>
|
||||
<v-select
|
||||
outlined
|
||||
label="Language"
|
||||
@change="languageChanged"
|
||||
:items="languageList"
|
||||
v-model="language"
|
||||
/>
|
||||
<v-text-field
|
||||
outlined
|
||||
v-model="entropy"
|
||||
label="Entropy"
|
||||
append-icon="fa-clipboard"
|
||||
@click:append="copy(entropy)"
|
||||
:rules="rules.entropy"
|
||||
ref="entropy"
|
||||
/>
|
||||
<v-text-field
|
||||
outlined
|
||||
v-model="passphrase"
|
||||
label="Passphrase"
|
||||
append-icon="fa-clipboard"
|
||||
@click:append="copy(passphrase)"
|
||||
:rules="rules.passphrase"
|
||||
ref="passphrase"
|
||||
/>
|
||||
<div class="text-center">
|
||||
<v-btn @click="refresh">refresh</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as bip39 from "bip39";
|
||||
import {copyable} from "../../mixins/copyable.mixin";
|
||||
|
||||
const shuffle = (str) => str.split('').sort(() => 0.5 - Math.random()).join('');
|
||||
|
||||
const getRandomBuffer = () => {
|
||||
return Buffer.from(shuffle('0123456789abcdef'.repeat(16)).substring(0, 32), 'hex');
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'BIP39Generator',
|
||||
mixins: [copyable],
|
||||
data: () => ({
|
||||
buffer: getRandomBuffer(),
|
||||
languageList: Object.keys(bip39.wordlists).filter(k => !k.match(/[A-Z]{2}/)).map(k => ({text: k.split('_').map(k => k.charAt(0).toUpperCase() + k.slice(1)).join(' '), value:k})),
|
||||
language: 'english',
|
||||
rules: {
|
||||
passphrase: [
|
||||
v => (!!v && bip39.validateMnemonic(v)) || 'Invalid mnemonic.'
|
||||
],
|
||||
entropy: [
|
||||
v => (!!v && !!v.match(/[0-9a-fA-F]{32}/)) || 'Invalid entropy.'
|
||||
]
|
||||
}
|
||||
}),
|
||||
methods:{
|
||||
refresh(){
|
||||
this.buffer = getRandomBuffer();
|
||||
},
|
||||
languageChanged(){
|
||||
bip39.setDefaultWordlist(this.language);
|
||||
this.passphrase = bip39.entropyToMnemonic(this.buffer)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
entropy: {
|
||||
get() {
|
||||
return this.buffer.toString('hex')
|
||||
},
|
||||
set(value) {
|
||||
if(this.$refs.entropy.validate()) {
|
||||
this.buffer = Buffer.from(value, 'hex')
|
||||
}
|
||||
}
|
||||
},
|
||||
passphrase: {
|
||||
get() {
|
||||
return bip39.entropyToMnemonic(this.buffer)
|
||||
},
|
||||
set(value) {
|
||||
if(this.$refs.passphrase.validate()){
|
||||
this.buffer = Buffer.from(bip39.mnemonicToEntropy(value), 'hex')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
221
src/routes/tools/CrontabGenerator.vue
Normal file
221
src/routes/tools/CrontabGenerator.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<v-row justify="center" align="center">
|
||||
<v-col cols="12" xl="5" lg="5" md="12">
|
||||
<v-card>
|
||||
<v-card-title>Crontab generator</v-card-title>
|
||||
<v-card-text>
|
||||
<div class="result">{{cronString}}</div>
|
||||
<v-text-field
|
||||
ref="cron"
|
||||
class="cron-wrapper"
|
||||
outlined
|
||||
v-model="cron"
|
||||
label="Cron"
|
||||
append-icon="fa-copy"
|
||||
@click:append="copy(cron)"
|
||||
:rules="[isCronValid]"
|
||||
hide-details="auto"
|
||||
/>
|
||||
|
||||
<v-checkbox
|
||||
hide-details
|
||||
label="Verbose"
|
||||
v-model="cronstrueConfig.verbose"
|
||||
/>
|
||||
<v-checkbox
|
||||
hide-details
|
||||
label="Use 24 hour time format"
|
||||
v-model="cronstrueConfig.use24HourTimeFormat"
|
||||
/>
|
||||
<v-checkbox
|
||||
hide-details
|
||||
label="Day of the week start a index 0"
|
||||
v-model="cronstrueConfig.dayOfWeekStartIndexZero"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" xl="6" lg="7" md="12">
|
||||
<v-card>
|
||||
<v-card-title>Crontab helper</v-card-title>
|
||||
<v-card-text>
|
||||
<div class="text-center">
|
||||
<pre>
|
||||
┌────────── day of week (0 - 6, sunday=0) OR sun,mon ...
|
||||
| ┌──────── month (1 - 12) OR jan,feb,mar,apr ...
|
||||
| | ┌────── day of month (1 - 31)
|
||||
| | | ┌──── hour (0 - 23)
|
||||
| | | | ┌── minute (0 - 59)
|
||||
| | | | |
|
||||
* * * * * command
|
||||
</pre>
|
||||
</div>
|
||||
<br>
|
||||
<v-simple-table dense>
|
||||
<template v-slot:default>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">Symbol</th>
|
||||
<th class="text-left">Meaning</th>
|
||||
<th class="text-left">Example</th>
|
||||
<th class="text-left">Equivalent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>*</td>
|
||||
<td>Any value</td>
|
||||
<td>
|
||||
<pre>* * * *</pre>
|
||||
</td>
|
||||
<td>Every minute</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-</td>
|
||||
<td>Range of values</td>
|
||||
<td>
|
||||
<pre>1-10 * * *</pre>
|
||||
</td>
|
||||
<td>Minutes 1 through 10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>,</td>
|
||||
<td>List of values</td>
|
||||
<td>
|
||||
<pre>1,10 * * *</pre>
|
||||
</td>
|
||||
<td>At minutes 1 and 10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/</td>
|
||||
<td>Step values</td>
|
||||
<td>
|
||||
<pre>*/10 * * *</pre>
|
||||
</td>
|
||||
<td>Every 10 minutes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@yearly</td>
|
||||
<td>Once every year at midnight of 1 January</td>
|
||||
<td>
|
||||
<pre>@yearly</pre>
|
||||
</td>
|
||||
<td>0 0 1 1 *</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@annually</td>
|
||||
<td>Same as @yearly</td>
|
||||
<td>
|
||||
<pre>@annually</pre>
|
||||
</td>
|
||||
<td>0 0 1 1 *</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@monthly</td>
|
||||
<td>Once a month at midnight on the first day</td>
|
||||
<td>
|
||||
<pre>@monthly</pre>
|
||||
</td>
|
||||
<td>0 0 1 * *</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@weekly</td>
|
||||
<td>Once a week at midnight on Sunday morning</td>
|
||||
<td>
|
||||
<pre>@weekly</pre>
|
||||
</td>
|
||||
<td>0 0 * * 0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@daily</td>
|
||||
<td>Once a day at midnight</td>
|
||||
<td>
|
||||
<pre>@daily</pre>
|
||||
</td>
|
||||
<td>0 0 * * *</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@midnight</td>
|
||||
<td>Same as @daily</td>
|
||||
<td>
|
||||
<pre>@midnight</pre>
|
||||
</td>
|
||||
<td>0 0 * * *</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@hourly</td>
|
||||
<td>Once an hour at the beginning of the hour</td>
|
||||
<td>
|
||||
<pre>@hourly</pre>
|
||||
</td>
|
||||
<td>0 * * * *</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>@reboot</td>
|
||||
<td>Run at startup</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</template>
|
||||
</v-simple-table>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {copyable} from "../../mixins/copyable.mixin";
|
||||
import cronstrue from 'cronstrue';
|
||||
import * as CronValidator from 'cron-validator'
|
||||
|
||||
export default {
|
||||
name: "CrontabGenerator",
|
||||
mixins: [copyable],
|
||||
data: () => ({
|
||||
cron: '* * * * *',
|
||||
cronstrueConfig: {
|
||||
verbose: true,
|
||||
dayOfWeekStartIndexZero: true,
|
||||
use24HourTimeFormat: true,
|
||||
throwExceptionOnParseError: true
|
||||
}
|
||||
}),
|
||||
methods: {
|
||||
isCronValid(v) {
|
||||
return CronValidator.isValidCron(v, {allowBlankDay: true, alias: true});
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cronString() {
|
||||
if (this.isCronValid(this.cron)) {
|
||||
return cronstrue.toString(this.cron, this.cronstrueConfig)
|
||||
} else {
|
||||
return ' '
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
::v-deep .cron-wrapper input {
|
||||
text-align: center;
|
||||
font-size: 22px;
|
||||
font-family: Consolas, monospace;
|
||||
}
|
||||
|
||||
.result {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.text-center{
|
||||
pre{
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
</style>
|
@@ -132,13 +132,9 @@
|
||||
text: 'Rebase a branch into the current',
|
||||
code: 'git rebase [branch]'
|
||||
},
|
||||
{
|
||||
text: 'Rebase merge (conflicts)',
|
||||
code: 'git merge --abort'
|
||||
},
|
||||
{
|
||||
text: 'Continue rebase after resolving conflicts',
|
||||
code: 'git merge --continue'
|
||||
code: 'git rebase --continue'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
137
src/routes/tools/QRCodeGenerator.vue
Normal file
137
src/routes/tools/QRCodeGenerator.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<v-card class="single-card">
|
||||
<v-card-title>QR-code generator</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row justify="center" align="center">
|
||||
<v-col cols="12" lg="6" sm="12">
|
||||
<v-text-field
|
||||
outlined
|
||||
v-model="value"
|
||||
label="Data"
|
||||
:rules="rules.value"
|
||||
/>
|
||||
<v-slider v-model="size" min="100" max="1920" label="Size (preview will not change): " thumb-label/>
|
||||
<v-select
|
||||
outlined
|
||||
v-model="level"
|
||||
:items="levels"
|
||||
label="Error resistance"
|
||||
/>
|
||||
<v-row>
|
||||
<v-col cols="12" md="6" sm="12">
|
||||
<ColorInput v-model="fgcolor" label="Foreground color"/>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" sm="12">
|
||||
<ColorInput v-model="bgcolor" label="Background color"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" lg="6" sm="12" class="text-center">
|
||||
<qrcode-vue
|
||||
:value="input"
|
||||
:size="size"
|
||||
:level="level"
|
||||
:background="bgcolor"
|
||||
:foreground="fgcolor"
|
||||
render-as="svg"
|
||||
class-name="qrcode-wrapper"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<div class="text-center mt-3 mb-sm-2">
|
||||
<v-btn @click="download('png')" class="mr-1" color="primary">download as png</v-btn>
|
||||
<v-btn @click="download('svg')" class="ml-1" color="primary">download as svg</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import QrcodeVue from 'qrcode.vue'
|
||||
import colors from "color-name";
|
||||
import ColorInput from "../../components/ColorInput";
|
||||
import {downloadBase64File} from "../../utils/helpers";
|
||||
|
||||
export default {
|
||||
name: "QRCodeGenerator",
|
||||
data: () => ({
|
||||
value: 'https://it-tools.tech',
|
||||
size: 300,
|
||||
level: 'M',
|
||||
bgcolor: '#ffffff',
|
||||
fgcolor: '#000000',
|
||||
levels: [
|
||||
{text: 'Low', value: 'L'},
|
||||
{text: 'Medium', value: 'M'},
|
||||
{text: 'Quartile', value: 'Q'},
|
||||
{text: 'High', value: 'H'}
|
||||
],
|
||||
rules: {
|
||||
value: [
|
||||
v => v.length > 0 || 'Value is needed'
|
||||
],
|
||||
color: [
|
||||
v => {
|
||||
v = v.trim()
|
||||
const isFFFFFF = /^#(?:[0-9a-fA-F]{6})$/.test(v);
|
||||
const isFFF = /^#(?:[0-9a-fA-F]{3})$/.test(v);
|
||||
const isRGB = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.test(v);
|
||||
const isHSL = /^hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)$/.test(v);
|
||||
const isKeyword = v in colors;
|
||||
const isTransparent = v === 'transparent';
|
||||
|
||||
return isFFFFFF || isFFF || isKeyword || isTransparent || isRGB || isHSL || 'Incorrect color.'
|
||||
}
|
||||
]
|
||||
}
|
||||
}),
|
||||
methods: {
|
||||
download(type) {
|
||||
const svgEl = this.$el.querySelector('.qrcode-wrapper svg');
|
||||
const svgString = new XMLSerializer().serializeToString(svgEl);
|
||||
const svgUrl = `data:image/svg+xml;base64,${btoa(svgString)}`;
|
||||
|
||||
if (type === 'png') {
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = this.size;
|
||||
canvas.height = this.size;
|
||||
const ctx = canvas.getContext("2d");
|
||||
|
||||
const image = new Image();
|
||||
image.onload = function () {
|
||||
ctx.drawImage(image, 0, 0);
|
||||
const result = canvas.toDataURL();
|
||||
|
||||
downloadBase64File(result, 'qr-code');
|
||||
};
|
||||
image.src = svgUrl;
|
||||
} else {
|
||||
downloadBase64File(svgUrl, 'qr-code');
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
input() {
|
||||
return this.value
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
QrcodeVue,
|
||||
ColorInput
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
::v-deep .qrcode-wrapper {
|
||||
& > * {
|
||||
width: 300px !important;
|
||||
height: 300px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
66
src/routes/tools/StringToBase64.vue
Normal file
66
src/routes/tools/StringToBase64.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-card class="single-card">
|
||||
<v-card-title>Base64 string converter</v-card-title>
|
||||
<v-card-text>
|
||||
<v-textarea
|
||||
outlined
|
||||
v-model="clear"
|
||||
label="Clear text"
|
||||
></v-textarea>
|
||||
|
||||
<v-textarea
|
||||
outlined
|
||||
v-model="base64"
|
||||
label="Base64 text"
|
||||
:rules="rules.base64"
|
||||
ref="base64"
|
||||
></v-textarea>
|
||||
<div class="text-center">
|
||||
<v-btn class="mr-1" depressed @click="copy(clear)">Copy clear</v-btn>
|
||||
<v-btn class="ml-1" depressed @click="copy(base64)">Copy base64</v-btn>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {copyable} from "../../mixins/copyable.mixin";
|
||||
|
||||
export default {
|
||||
name: "StringToBase64",
|
||||
mixins: [copyable],
|
||||
data() {
|
||||
return {
|
||||
clear: 'Lorem ipsum dolor sit amet.',
|
||||
rules:{
|
||||
base64: [
|
||||
v => {
|
||||
try{
|
||||
return btoa(atob(v)) === v || 'Input is not base64.'
|
||||
}catch (e) {
|
||||
return 'Input is not base64.'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
base64: {
|
||||
get(){
|
||||
return btoa(this.clear)
|
||||
},
|
||||
set(value){
|
||||
if(this.$refs.base64.validate()){
|
||||
this.clear = atob(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@@ -41,6 +41,13 @@ const randFromArray = (array) => array[Math.floor(Math.random() * array.length)]
|
||||
|
||||
const randIntFromInterval = (min, max) => Math.floor(Math.random() * (max - min) + min)
|
||||
|
||||
const downloadBase64File = (dataUrl, name = 'file') => {
|
||||
const a = document.createElement("a");
|
||||
a.href = dataUrl;
|
||||
a.download = name;
|
||||
a.click();
|
||||
}
|
||||
|
||||
export {
|
||||
copyToClipboard,
|
||||
fileIsImage,
|
||||
@@ -48,5 +55,6 @@ export {
|
||||
isInt,
|
||||
debounce,
|
||||
randFromArray,
|
||||
randIntFromInterval
|
||||
randIntFromInterval,
|
||||
downloadBase64File
|
||||
}
|
7
vercel.json
Normal file
7
vercel.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 2,
|
||||
"routes": [
|
||||
{ "handle": "filesystem" },
|
||||
{ "src": "/.*", "dest": "/index.html" }
|
||||
]
|
||||
}
|
@@ -19,5 +19,11 @@ module.exports = {
|
||||
})
|
||||
]
|
||||
}
|
||||
},
|
||||
pwa: {
|
||||
workboxOptions: {
|
||||
skipWaiting: true,
|
||||
clientsClaim: true,
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user