Skip to content

Instantly share code, notes, and snippets.

View dansp89's full-sized avatar

DanSP dansp89

View GitHub Profile
@dansp89
dansp89 / menu.ts
Created February 6, 2024 23:39
Modelo a ser gerado de menu
{
pages: [
{
heading: "dashboard",
route: "/dashboard",
keenthemesIcon: "element-11",
bootstrapIcon: "bi-app-indicator",
},
{
heading: "layoutBuilder",
@dansp89
dansp89 / rotas.ts
Last active February 7, 2024 00:19
Rotas v3
import {
createRouter,
createWebHistory,
type RouteRecordRaw,
} from "vue-router";
import { useAuthStore } from "@/stores/auth";
import { useConfigStore } from "@/stores/config";
import { filterRoutesByRole } from "@/core/plugins/ManagerAccessDashboard";
export let routes: Array<RouteRecordRaw> = [
@dansp89
dansp89 / 000-readme.me
Last active July 16, 2025 12:22
STRAPI 4 - Add custom routes and also add to the SWAGGER documentation.
> With this code, you can add your custom routes in swagger, read the documentation if you have any further questions.
## Tested on:
1. Node 18.17.1
1. Strapi 4.15.5
1. Language: Typescript
@dansp89
dansp89 / index.ts
Last active December 9, 2023 04:42
Strapi 4 - Override swagger default (E.G TS): ./src/index.ts
export default {
/**
* @file ./src/index.ts
* An asynchronous register function that runs before
* your application is initialized.
*
* This gives you an opportunity to extend code.
* @source <https://docs.strapi.io/dev-docs/plugins/documentation#providing-replacement-documentation>
*/
register({ strapi }) {
@dansp89
dansp89 / modelos-dom.json
Created September 11, 2023 22:44
Modelos de DOM em JSON para gerar os PDF de diários oficiais
[
{
"ID": 12426,
"post_date": "2023-06-30 14:50:05",
"post_name": "portaria-n-92-2023-gab-de-23-de-marco-de-2023",
"post_type": "publicacoesdom",
"post_title": "PORTARIA N° 92/2023 – GAB, DE 23 DE MARÇO DE 2023.",
"post_author": "11",
"post_parent": 0,
"post_status": "publish",
@dansp89
dansp89 / chats.jsonc
Created September 4, 2023 12:00
Bot Quotex
[
{
"id": 0, // ignorar
"active": true, // enviar mensagem no telegram somente se TRUE
"chat_id": -100999888777,
"text": "💰5 minutos de expiração
{{ SIGNAL }}
🕐TEMPO PARA {{ TIME_TO }}
Horários das Sessões:
1. Madrugada: 00:00 até 03:00.
2. Manhã: 08:30 até 12:00.
3. Tarde: 15:30 até 18:00.
Lógica para Automação:
0. Obter lista de sinais
GET::http://localhost:1337/api/currency/signals/all
- Exemplo resposta: {
"date": "2023-08-18T01:48:54.257Z",
@dansp89
dansp89 / aside.html
Last active August 16, 2023 08:56
Filtrar li
<div class="yogh-container" style=""> <div class="yogh-topbar"> <div class="yogh-search-content"><input type="search" id="yogh-search-lp" class="yogh-search" placeholder="Pesquisar conteúdo do curso ..."> </div> <div class="yogh-topbar-actions"> <div class="yogh-collapse-expand-aside"> <div class="yogh-icon yogh-icon-expand"></div> </div> <div class="yogh-close-modal"> <div class="yogh-icon yogh-icon-times"></div> </div> </div> </div> <div class="yogh-course-content"> <div class="yogh-learnpress-course-curriculum" style="overflow-y: scroll;overflow-x: hidden;"> <div class="yogh-aside" style=""> <div class="course-curriculum" id="learn-press-course-curriculum"> <div class="curriculum-scrollable" id="yogh-content-add">
<ul class="curriculum-sections acordeao">
<li class="section" id="section-3769" data-id="3769" data-section-id="3769">
<h4 class="section-header">
@dansp89
dansp89 / mal.js
Last active August 6, 2023 01:17
Temporário, apagar depois
var oid = 7850;
var pedidoNovo = 1234;
var allOids = [
{ id: 7836, matriz_patrocinador: undefined, matriz_patrocinados: [ 7837, 7838, 7839, 7840, 7841 ] },
{ id: 7837, matriz_patrocinador: 7836, matriz_patrocinados: [ 7842, 7843, 7844, 7845, 7846 ] },
{ id: 7838, matriz_patrocinador: 7836, matriz_patrocinados: [ 7847, 7848, 7849, 7850, 7851 ] },
{ id: 7839, matriz_patrocinador: 7836, matriz_patrocinados: [ 7852, 7853, 7854, 7855, 7856 ] },
{ id: 7840, matriz_patrocinador: 7836, matriz_patrocinados: [ 7857, 7858, 7859, 7860, 7861 ] },
{ id: 7841, matriz_patrocinador: 7836, matriz_patrocinados: [ 7862, 7863, 7864, 7865, 7866 ] },
{ id: 7842, matriz_patrocinador: 7837, matriz_patrocinados: [ 7914, 7915, 7916, 7917, 7918 ] },
@dansp89
dansp89 / pagespeed.json
Created July 31, 2023 03:56
Exemplo de JSON PAGESPEED
This file has been truncated, but you can view the full file.
"{key: 'ds:0', hash: '1', data:[\"9ixx96gdio\",\"https:\/\/waiser.com.br\/\",2,1,[[\"https:\/\/waiser.com.br\/\",\"https:\/\/waiser.com.br\/\",1,1,null,null,2,null,\"3con2zgij1\",\"{\\n \\\"fetchTime\\\": \\\"2023-07-28T17:21:54.254Z\\\",\\n \\\"requestedUrl\\\": \\\"https:\/\/waiser.com.br\/\\\",\\n \\\"finalUrl\\\": \\\"https:\/\/waiser.com.br\/\\\",\\n \\\"lighthouseVersion\\\": \\\"10.3.0\\\",\\n \\\"environment\\\": {\\n \\\"networkUserAgent\\\": \\\"Mozilla\/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/109.0.0.0 Mobile Safari\/537.36\\\",\\n \\\"hostUserAgent\\\": \\\"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) HeadlessChrome\/114.0.5735.179 Safari\/537.36\\\",\\n \\\"benchmarkIndex\\\": 1688,\\n \\\"credits\\\": {\\n \\\"axe-core\\\": \\\"4.7.2\\\"\\n }\\n },\\n \\\"userAgent\\\": \\\"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) HeadlessChrome\/114.0.5735.179 Safari\/537.36\\\",\\n \\\"runWar