Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View waldothedeveloper's full-sized avatar
🎖️
Never give up!

Waldo Lavaut waldothedeveloper

🎖️
Never give up!
View GitHub Profile
import { conform, useForm } from '@conform-to/react'
import { getFieldsetConstraint, parse } from '@conform-to/zod'
import type { Prisma } from '@prisma/client'
import { json, redirect, type DataFunctionArgs } from '@remix-run/node'
import { Form, useActionData, useLoaderData } from '@remix-run/react'
import { useId } from 'react'
import { z } from 'zod'
import ServicesForm from '~/components/onboarding/services-form'
import { checkUserID } from '~/utils/auth.server'
import { prisma } from '~/utils/db.server'
@waldothedeveloper
waldothedeveloper / novuConfig.js
Created May 25, 2023 14:37
configuring the novu notification center
import {
NotificationBell,
NovuProvider,
PopoverNotificationCenter,
} from "@novu/notification-center";
import { novuSubscriberId } from "@/utils/novuSubscriberId";
const appIdentified =
process.env.NODE_ENV === "development"
@waldothedeveloper
waldothedeveloper / script_include.js
Created April 19, 2023 17:17
Script Include to Decommision Server
var Conviva_WorkflowUtils = Class.create();
Conviva_WorkflowUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, {
description: function (item) {
switch (item) {
// Conviva Payer Portal
case "45546e4887a674105a6cc9d6cebb35f4":
return "Review request and validate the requestors role is appropriate for access.";
// Conviva Collaboration
case "f602368c87e674105a6cc9d6cebb35e6":
@waldothedeveloper
waldothedeveloper / decom_server.js
Created April 19, 2023 17:15
Activity Properties: Run Script -> Decom Servers
var queryString = "task=" + current.sys_id;
var grTaskService = new GlideRecord("task_cmdb_ci_service");
grTaskService.addEncodedQuery(queryString);
var isValidQuery = grTaskService.isEncodedQueryValid(queryString);
var CIstoRetire = [];
if (isValidQuery) {
grTaskService.query();
while (grTaskService.next()) {
CIstoRetire.push(grTaskService.cmdb_ci_service.toString());
@waldothedeveloper
waldothedeveloper / script.js
Last active February 3, 2023 23:05
Servicenow Catalog Client Script to add dynamic options to catalog variable of type choices
// services categories for the applications that live in the cmdb_ci_services table
var categories = [
{
id: 0,
name: "Access Request",
},
{
id: 1,
name: "New Database Request",
},
import { scheduleSteps } from '@/utils/scheduleSteps'
import { useReducer } from 'react'
const createSchedule = () => scheduleSteps
const reducer = (state, action) => {
const { type, data } = action
switch (type) {
case 1: {
import { useMemo, useState } from "react";
import { chatFetchers } from "../../utils/chatFetchers";
import { selectedConversation } from "../../components/shared/selectedConversation";
import { useAddSMSParticipant } from "./useAddSMSParticipant";
import { useCreateAccessToken } from "./useCreateAccessToken";
import { useCreateConversation } from "./useCreateConversation";
import { useDeliveryReceipt } from "./useDeliveryReceipt";
import { useInitializeConversationClient } from "./useInitializeConversationClient";
import { useJoinAndLeaveConversations } from "./useJoinAndLeaveConversations";
import { useEffect, useState } from "react";
export const useSendAndReceiveMessages = (selectedConversation) => {
const [conversationMessage, setConversationMessage] = useState({
newMessage: ``,
messages: [],
conversationProxy: null,
loadingState: `initializing`,
});
useEffect(() => {
if (userInfo.requestConversation) {
if (userInfo.sid) {
setCreateOrGetConversation((oldData) => {
return {
...oldData,
selectedConversationSid: userInfo.sid,
};
});
import { getAuth, sendPasswordResetEmail } from "firebase/auth";
import { useEffect, useState } from "react";
import { app } from "../../utils/firebaseConfig";
import { navigate } from "gatsby";
import { validEmailRegex } from "./validateEmailHelper";
const auth = getAuth(app);
auth.languageCode = `es`;