Skip to content

Instantly share code, notes, and snippets.

View Seventty's full-sized avatar
🔪
Killing lines

Rainiery Valerio Seventty

🔪
Killing lines
  • Dominican Republic 🇩🇴
View GitHub Profile
{
"name": "apex-admin",
"version": "12.0.0",
"license": "",
"scripts": {
"ng": "ng",
"start": "ng serve --port 4401",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
using FluentValidation;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace BuildingBlocks.Exceptions.Handler;
public class CustomExceptionHandler(ILogger<CustomExceptionHandler> logger)
: IExceptionHandler
@Seventty
Seventty / IModalConfig.ts
Created September 13, 2024 19:35
Modal Component made with Angular V12
export interface IModalConfig {
modalTitle?: string
dismissButtonLabel?: string
closeButtonLabel?: string
shouldClose?(): Promise<boolean> | boolean
shouldDismiss?(): Promise<boolean> | boolean
onClose?(): Promise<boolean> | boolean
onDismiss?(): Promise<boolean> | boolean
disableCloseButton?(): boolean
disableDismissButton?(): boolean
@Seventty
Seventty / pokemon_combat_probability.ipynb
Created September 6, 2024 01:19
pokemon_combat_probability.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Seventty
Seventty / Evented-pm.ts
Created August 14, 2024 16:09
Every event
interface Evented {
/******************************************
*
* AVAILABLE ON MAP + LAYER, THESE ARE OK ON EVENTED.
*
********************************************/
/** Fired when a layer is removed via Removal Mode. */
on(type: 'pm:remove', fn: PM.RemoveEventHandler): this;
once(type: 'pm:remove', fn: PM.RemoveEventHandler): this;
/*
* L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within
*/
export var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({
options: {
maxClusterRadius: 80, //A cluster will cover at most this many pixels from its center
iconCreateFunction: null,
clusterPane: L.Marker.prototype.options.pane,
@Seventty
Seventty / debug-form.component.ts
Last active June 10, 2024 16:54
debug form component to see the result of dynamic form in real time
import { Component, Input, isDevMode, OnInit } from '@angular/core'
import { FormGroup, FormGroupDirective } from '@angular/forms'
@Component({
selector: 'UIDebugForm',
template: `
<div class="debug" *ngIf="isDev">
<small class="d-block text-right">
Only development form debugger
</small>
@Seventty
Seventty / sweet-alert.service.ts
Created April 1, 2024 18:00
Swal2 Angular service
import { Injectable } from '@angular/core'
import Swal, { SweetAlertIcon, SweetAlertResult } from 'sweetalert2'
@Injectable({
providedIn: 'root'
})
export class SweetAlertService {
constructor() { }
@Seventty
Seventty / dynamic-form.component.ts
Created March 12, 2024 16:16
Dynamic form caminero
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DoCheck, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, QueryList, SimpleChanges, TemplateRef, ViewChild, ViewChildren } from '@angular/core'
import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'
import { BehaviorSubject, Observable, of, Subject } from 'rxjs'
import { DropdownService } from '@/shared/services/dropdown.service'
import { tap, takeUntil, map, distinctUntilChanged } from 'rxjs/operators'
import { DynamicFormService } from './dynamic-form.service'
import { Helper } from '@/shared/util/helper.util'
import { NgbDateAdapter, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap'
import { CustomDateAdapter, CustomDateParserFormatter } from '@/shared/services/custom-format.service'
import { InputFormBase } from '@/shared/models/dynamic-form/input-form-base.model'
@Seventty
Seventty / error-page.component.html
Last active February 21, 2024 15:25
Error page with bootstrap
<!--Error page starts-->
<section id="error">
<div class="container-fluid">
<div class="row auth-height full-height-vh">
<div class="col-12 d-flex align-items-center justify-content-center">
<div class="row">
<div class="col-12 text-center">
<img src="assets/img/gallery/error.png" alt="" class="img-fluid error-img mt-2" height="300" width="400">
<h1 class="mt-4">404 - ¡Página no encontrada!</h1>
<div class="w-75 error-text mx-auto mt-4">