If you are a React Native, NativeScript, Flutter or Ionic developer maybe you don't want to install the entire Android Studio just to have your environment ready. If this is your case, this guide will help you to setup your minimal Android SDK environment in Windows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @description Constituye un catálogo de errores de una API. | |
* Un catálogo es un mapa en donde se asocia un código de error | |
* con un mensaje describiendo el problema que se ha originado. | |
* Por ejemplo: | |
* { | |
* 24323: 'Ha ocurrido un error consumiendo el servicio externo ABC', | |
* 13424: 'No se encontraron coincidencias para la búsqueda' | |
* } | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type InterceptorResponse = Omit< | |
typeof Response.prototype, | |
'text' | 'formData' | 'blob' | 'json' | 'arrayBuffer' | |
> | |
type FetchInterceptorResponseConfig = { | |
onUnauthenticated?: (obj: InterceptorResponse) => void | |
onInternalError?: (obj: InterceptorResponse) => void | |
onForbidden?: (obj: InterceptorResponse) => void | |
onRateLimit?: (obj: InterceptorResponse) => void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function unfollow() { | |
let count = 0 | |
const buttons = document.querySelectorAll('[data-testid*="-unfollow"]') | |
if (!buttons.length) { | |
console.log(`${count} People unfollowed`) | |
return | |
} | |
const waitFor = (ms) => new Promise(resolve => setTimeout(resolve, ms)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function register() { | |
if ("serviceWorker" in navigator) { | |
return new Promise((resolve) => { | |
navigator.serviceWorker.register("/sw.js") | |
.then((registration) => { | |
registration.onupdatefound = () => { | |
const worker = registration.active; | |
if (worker == null) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* * This is not in use. | |
* * Para conocimiento general: | |
* Esta es una forma de generar el "precache manifest" | |
* de un service worker. La otra forma es como se detalla | |
* en el script de NPM "sw" en el presente package.json. | |
*/ | |
const workboxBuild = require("workbox-build"); | |
const buildServiceWorker = () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"to": "token o topic", | |
"priority": "high", | |
"notification": { | |
"title": "Title of the notification", | |
"body": "Description of the notification", | |
"android_channel_id": "Android channel" | |
}, | |
"data": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
enum DialogButtonStyle { | |
PRIMARY, | |
SECONDARY, | |
} | |
void main() { | |
runApp(App()); | |
} |
NewerOlder