Skip to content

Instantly share code, notes, and snippets.

View danywalls's full-sized avatar
👋
Hello!

Dany Paredes danywalls

👋
Hello!
View GitHub Profile
import { AppComponent } from './app.component';
import { Pipe, PipeTransform } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateService } from '@ngx-translate/core';
@Pipe({ name: 'translate' })
class MockPipe implements PipeTransform {
transform(value: string): string {
return '';
class Invoice {
public amount: number;
public description: string;
country: string;
}
class SalesInvoices extends Invoice {
products: Array<string> = [];
}
@danywalls
danywalls / scaffold.sh
Created February 5, 2023 12:52
example of scaffolding with bash
#!/bin/bash
version="1.0"
#validate that the user passed the parameter
if [ -z "$1" ]
then
echo "Please add the parameter to script ex: ./scaffold.sh blog"
exit
fi
#get the project name parameter
projectName=$1
version: "3"
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- "3306:3306"
environment:
function generateNumbers(from: number, to: number)
{
for(let index = from; index <= to; index++) {
const message = getMessage(index)
console.log(message)
}
}
function isAnagram(word: string, secondword: string): boolean {
const reversedWord = [...word].reverse().toString().replaceAll(',',"")
return secondword === reversedWord;
}
isAnagram('amor', 'roma')
import { Injectable } from '@angular/core';
import { GEMINI_KEY } from '../environment';
import { GoogleGenerativeAI } from '@google/generative-ai';
@Injectable({ providedIn: 'root' })
export class GeminiService {
KENDO_RECOMMEND_PROMPT = `
Given a screenshot of a browser tell me which kendo ui components help me to solve, and why can help me to build that UI.
The response a string , with the section detected , the components of
kendo and a url.