Skip to content

Instantly share code, notes, and snippets.

View razbakov's full-sized avatar
🖖
Hi

Aleksey Razbakov razbakov

🖖
Hi
View GitHub Profile
@razbakov
razbakov / auto-form-registration.vue
Created June 4, 2024 19:51
shadcn-vue: AutoForm: registration
<script setup lang="ts">
defineProps({
register: Boolean,
});
import { useForm } from "vee-validate";
import { toTypedSchema } from "@vee-validate/zod";
import * as z from "zod";
import { toast } from "vue-sonner";
@razbakov
razbakov / 01.form-builder.zod-schema.vue
Last active June 4, 2024 19:10
Form Builder: zod schema
<template>
<AdminForm
v-model:item="item"
:collection="collection"
:title="edit"
:fields="fields"
:schema="schema"
@close="editing = false"
/>
</template>
@razbakov
razbakov / 01.form-builder.json-schema.vue
Last active June 4, 2024 19:10
Form Builder: json array of fields
<template>
<TForm
v-model="profile"
:fields="profileFields"
class="border-t mt-4 pt-4 space-y-4"
@save="saveProfile"
/>
</template>
<script setup>
@razbakov
razbakov / wd-form.vue
Created February 7, 2024 10:34
Vue Form Component
<template>
<form @submit.prevent="submit">
<slot />
</form>
</template>
<script>
import Vue from 'vue'
import { onMounted, ref } from '@nuxtjs/composition-api'
git fetch --all
git push origin HEAD
WORK_BRANCH=`git rev-parse --abbrev-ref HEAD`
git checkout development
git rebase origin/development
git merge $WORK_BRANCH --no-edit
git push origin HEAD
git checkout $WORK_BRANCH

get AJQ-15x15-ZM

{
  product: {
    DecimalsAllowed: false,
    Description1: 'Ablauf ESS Aqua Jewel Quattro 15x15cm ES',
    Description2: '"Zero+Edelst. gebürstet" swh 30/35/50mm',
    GTIN: '',
    PicturePath: 'https://ablexprod.blob.core.windows.net/ablexprodcontainer/8eb882af3664f584682df48d6401b5f7',
<template>
<input
v-model="userValue"
:pattern="pattern"
v-bind="$attrs"
type="tel"
@focus="focus"
@keydown="keyDown"
@blur="update"
>
import { reactive, toRefs, computed } from '@vue/composition-api'
import Vue from 'vue'
import firebase from 'firebase/app'
import 'firebase/auth'
import 'firebase/firestore'
const state = Vue.observable({
loading: true,
signingIn: false,
uid: null,
@razbakov
razbakov / evernote_2.applescript
Created January 30, 2020 19:47
Evernote Apple Script API
-- This script includes examples for using AppleScript to perform several
-- useful tasks with Evernote.
-- Each section illustrates a chunk of Evernote's AppleScript interface,
-- and each section also cleans up after itself.
-- Please refer to the Evernote application's scripting dictionary for
-- detailed information and BE CAREFUL: operations that would normally
-- confirmation from the user (such as deleting notes, etc) are
-- completed without warning when invoked from AppleScript!
tell application "Evernote"
@razbakov
razbakov / MigrateNotesToEvernote.applescript
Created January 30, 2020 19:47
MigrateNotesToEvernote
-- Read more
-- https://dev.evernote.com/doc/articles/applescript.php
-- https://gist.github.com/evernotegists
-- https://discussion.evernote.com/topic/4046-importing-from-apple-mailapps-notes/
-- https://www.macosxautomation.com/applescript/notes/05.html
-- https://macscripter.net/viewtopic.php?id=45602
tell application "Notes"
set theMessages to every note
repeat with appleNote in theMessages