Skip to content

Instantly share code, notes, and snippets.

"{"stack":"Error: VALIDATION_ERROR\n at Object.<anonymous> (/usr/src/app/src/schemas/services/AuthService.ts:247:27)\n at Generator.throw (<anonymous>)\n at rejected (/usr/src/app/src/schemas/services/AuthService.ts:6:65)\n at processTicksAndRejections (internal/process/task_queues.js:85:5)","message":"VALIDATION_ERROR","clientCode":"VALIDATION_ERROR","internalError":"{\"name\":\"ValidationError\",\"value\":{\"username\":\"test033\",\"firstName\":\"\",\"lastName\":\"\",\"gender\":\"MALE\",\"metric\":\"imperial\",\"city\":\"SV\",\"country\":\"SV\",\"termsAccepted\":true,\"email\":\"test033@gmail.com\",\"password\":\"Test123\"},\"path\":\"lastName\",\"type\":\"required\",\"errors\":[\"lastName is a required field\"],\"inner\":[],\"message\":\"lastName is a required field\",\"stack\":\"ValidationError: lastName is a required field\\n at createError (/usr/src/app/node_modules/yup/lib/util/createValidation.js:64:35)\\n at /usr/src/app/node_modules/yup/lib/util/createValidation.js:113:108\\n at
@rpCal
rpCal / .html
Created May 7, 2020 10:47
client bo-meeting embed styles
<script src="https://client.bo.timecutcloud.com/bo-meeting/load.js"></script>
<div id="bo-meeting-root" data-hash="YToxOntzOjc6InNpdGVfaWQiO3M6NToiMTAyMjkiO30"></div>
<style>
.bo-meeting-root-vars.bo-meeting-root-vars-container *{
--bo-meeting--color-primary: #43a75e;
}
</style>
@rpCal
rpCal / example hook reducer.js
Last active April 29, 2020 08:42
typescript/react/immerjs - React.useReducer + hooks
import React from "react";
import { produce } from "immer";
export interface ModalForm {
id: string | undefined;
}
export const initModalForm: ModalForm = {
id: undefined,
};
@rpCal
rpCal / index.js
Created January 23, 2020 13:17
Download from private/blocked vimeo file
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require("fs");
const url = require("url");
const https = require("https");
var exec = require("child_process").exec;
@rpCal
rpCal / vimeo-downloader.js
Created December 29, 2019 21:10 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
{"result":true,"data":{"message":[{"type":"update","msg":"Order has been updated."}],"context":{"title":"","field_ct_advert_header":"Vi p\u00e5 begravningsbyr\u00e5n utformar tillsammans med er en personlig annons och inf\u00f6rande i de tidningar ni \u00f6nskar. Annonsen publiceras \u00e4ven p\u00e5 familjesidan.se. Bra f\u00f6r sl\u00e4kt och v\u00e4nner som befinner sig i en annan del av landet eller v\u00e4rlden. Vill du b\u00f6rja utforma din annons sj\u00e4lv? Klicka p\u00e5 \u0022skapa en d\u00f6dsannons\u0022 under \u0022L\u00e4s mer\u0022.","field_ct_advert_medias_header":"Vi kan ombes\u00f6rja annonsering i alla svenska dagstidningar samt p\u00e5 familjesidan.se.","field_ct_advert_medias_title":"Tidningar\/medier du \u00f6nskar publicera annonsen i","field_ct_advert_op_no":"Nej, jag \u00f6nskar ingen d\u00f6dsannons","field_ct_advert_op_yes":"Ja, jag \u00f6nskar en d\u00f6dsannons","field_ct_advert_title":"D\u00f6dsannons","field_ct_ceremony_day_header":"Det kan vara till hj\u00e4lp om du har en up
@rpCal
rpCal / gist:307bbb905c9dfde92d7a4a1b957a77b9
Last active July 27, 2018 09:35
Translation text - memoriz client
Obligatoriskt fält
För få tecken
För många tecken
The value must be in range!
The value must be in range!
Fälten måste vara lika
Fälten måste vara lika
Felaktigt e-mail
The value is not a valid integer!
// Built with IMPACT - impactjs.org
(function (window) {
"use strict";
Number.prototype.map = function (istart, istop, ostart, ostop) {
return ostart + (ostop - ostart) * ((this - istart) / (istop - istart));
};
Number.prototype.limit = function (min, max) {
return Math.min(max, Math.max(min, this));
};
Number.prototype.round = function (precision) {
@rpCal
rpCal / Nai - projekt - 4
Created January 19, 2016 08:58
Nai - projekt - 4
Start aplikacji
Skutecznosc sieci z parametrami: wspolczynnik uczenia=0.1, liczba neuronow=2, liczba epok=500, momentum=0.2
Error rate 0.1524476383514526
Correctly Classified Instances 13799 84.7552 %
Incorrectly Classified Instances 2482 15.2448 %
Kappa statistic 0.52
Mean absolute error 0.2105
Root mean squared error 0.3288
Relative absolute error 57.9322 %
@rpCal
rpCal / Nai - projekt - 3
Created January 19, 2016 06:44
Nai - projekt - 3
Start aplikacji
Skutecznosc sieci z parametrami: wspolczynnik uczenia=0.1, liczba neuronow=2, liczba epok=500, momentum=0.20.1524476383514526
Correctly Classified Instances 13799 84.7552 %
Incorrectly Classified Instances 2482 15.2448 %
Kappa statistic 0.52
Mean absolute error 0.2105
Root mean squared error 0.3288
Relative absolute error 57.9322 %
Root relative squared error 77.3951 %