Skip to content

Instantly share code, notes, and snippets.

View Orbis25's full-sized avatar
🚀
Working

Orbis Alonzo Gutierrez Orbis25

🚀
Working
View GitHub Profile
@Orbis25
Orbis25 / IRepository.ts
Created August 26, 2020 19:38
Simple Repository Pattern in TypeScript with axios
import { AxiosResponse } from "axios";
import { AxiosConfig } from "../../api";
export interface IRead<T> {
getAll(route: string, params?: string): Promise<AxiosResponse<T[]>>;
getById(route: string, id: string): Promise<AxiosResponse<T>>;
getPaginatedList(route: string, params?: string): Promise<AxiosResponse<T[]>>;
}
export interface IWrite<T> {
@Orbis25
Orbis25 / index.html
Created December 5, 2019 19:46
Simple animation in button pulse
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css"
/>
@Orbis25
Orbis25 / main.js
Last active December 5, 2019 19:47
Text to spech example usin api from javaScript (speaknowjs)
const synth = window.speechSynthesis;
const readText = (
text = "FELICIDADES"
) => {
voices = synth.getVoices();
event.preventDefault();
let utterThis = new SpeechSynthesisUtterance(text);
var selectedOption = "Google español de Estados Unidos";
for (i = 0; i < voices.length; i++) {
@Orbis25
Orbis25 / web.config
Last active November 20, 2019 02:23
web.config this code is necesary when you deploy app in reactjs in (IIS) , Check if working for (Vuejs and Angularjs) this file is necesary inclounding in public folder
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />