Skip to content

Instantly share code, notes, and snippets.

View YonathanMeguira's full-sized avatar
🤩
Happy

Yonathan Meguira YonathanMeguira

🤩
Happy
View GitHub Profile
const siteHeaderElement = .nativeElement;
const customClasses = localStorage.getItem('custom');
.brand-name{color: blue}
// regex to get array of classname
const classNames = ['NP1', 'NP2', 'LC'];
function getElement(className): ElementRef {
@YonathanMeguira
YonathanMeguira / sorting.ts
Created January 20, 2021 16:07
AG-grid: sorting for custom rendered colums
const myColDefs = [{
headerName: 'Header Name',
sortable: true,
cellRenderer: 'propName',
comparator: (valueA: any, valueB: any, nodeA: RowNode, nodeB: RowNode, isInverted: boolean) =>
sortColumnAlphabetically<User>('status', nodeA, nodeB)
}]
export function sortColumnAlphabetically<T>(key: keyof T, nodeA: any, nodeB: any): number {
const [valueA, valueB] = [nodeA.data[key], nodeB.data[key]];
interface Response {
requestId: string;
// status could be for instance: Request Approved, or Request Failed to approve because it does not exist anymore.
// status is either a success message or an error message that explains why the operation (deny/ approve / revoke) failed.
status: string;
email: string;
}
/**
@YonathanMeguira
YonathanMeguira / user.java
Last active January 25, 2022 16:59
Dato-Sync Service common data model
/** here is the model sync service is expecting to receive.**/
package com.datorama.core.dto.admin.gdo;
import java.util.Collection;
import com.datorama.core.dto.admin.UserDto;
public class GdoUser {
private final Integer id;
private final String email;
private final String firstName;
private final String lastName;
private final Integer language;
@YonathanMeguira
YonathanMeguira / gist:934ba151a5e866b4b710fd53119c59e8
Created February 23, 2022 10:38
no_check_fk_restriction.sql
USE AdventureWorks2012;
GO
ALTER TABLE Purchasing.PurchaseOrderHeader
NOCHECK CONSTRAINT FK_PurchaseOrderHeader_Employee_EmployeeID;
GO
@YonathanMeguira
YonathanMeguira / main.py
Created March 27, 2025 21:39
whstaspp-group-scrapper
# How to use
# add injet code chrome extension
# add this code to the widget
# go to whatsapp web, go inside a group > see members > scroll and thats it
import os
import csv