Skip to content

Instantly share code, notes, and snippets.

View vegadelalyra's full-sized avatar
🏠
Working from home

Daniel Vega vegadelalyra

🏠
Working from home
View GitHub Profile
@vegadelalyra
vegadelalyra / classAsDBAnology.ts
Created August 27, 2023 07:49
Explaining SQL DB with TS classes
class Pets {
private name: string
private age: number
private sound: string
private type: string
constructor(name: string, age: number, sound: string = 'wow', type: string) {
this.name = name;
this.age = age;
this.sound = sound;
@vegadelalyra
vegadelalyra / flatJSONreturnArr.js
Last active August 24, 2023 15:46
Flatten Object Functions
// Export from your streaming service like Spotify, YT music, etc.
const artistsByGenre = {
jazz: ['Miles Davis', 'John Coltrane'],
rock: {
classic: ['Bob Seger', 'The Eagles'],
hair: ['Def Leppard', 'Whitesnake', 'Poison'],
alt: {
classic: ['Pearl Jam', 'The Killers'],
current: ['Joywave', 'Sir Sly']
}
@vegadelalyra
vegadelalyra / example.json
Last active August 8, 2023 03:18
My Gist
{
"key1": "value1",
"key2": "value2"
}