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
@apiToken = | |
@baseURL = https://api.track.toggl.com/api/v9/ | |
@workspaceId = {{workspaces.response.body.$[0].id}} | |
// Busca un workspace id por su nombre. Cambiar MY_NAME por el name de tu workspace | |
@projectIdByName = {{projects_by_workspace.response.body.$[?(@.name == 'MY_NAME')].id}} | |
### |
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
@baseUrl = https://midominio.com.ar/api/ | |
@apiKey = MI_API_KEY_CREADA_EN_PRESTASHOP | |
@authorizationKey = {{apiKey}}: | |
### | |
GET {{baseUrl}}?output_format=JSON HTTP/1.1 | |
Authorization: Basic {{authorizationKey}} |
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
# Script SQL para eliminar pedidos, carritos y clientes de Prestashop 1.7 y todas sus tablas relacionadas. | |
# Este script sirve para cuando queres desactivar una multitienda que tuvo pedidos hechos o clientes creados y por este motivo no te deja eliminar la tienda. | |
# Luego de ejecutar este script te va a permitir eliminar la tienda sin problemas. | |
# | |
# HACER BACKUP de la base de datos porque una vez ejecutado este script no hay vuelta a atrás. | |
# Seteo el ID de la tienda a eliminar los pedidos. | |
set @idShop = 999; | |
DELETE FROM ps_customer WHERE id_shop = @idShop; |
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
<?php | |
namespace Silvanite\Brandenburg\Traits; | |
use Silvanite\Brandenburg\Role; | |
trait HasRoles | |
{ | |
/** | |
* Get all Roles given to this user |
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
/** | |
Buscar Cauciones en https://invertironline.com/ | |
Hay que ejecutar este script abriendo la consola dentro de invertironline.com y con la sesión iniciada. | |
En este ejemplo busca cauciones con una tasa de interés mínima de 130% para un monto mínimo de $100.000 de 1 a 30 días como máximo. | |
*/ | |
async function getCauciones(dias) { | |
const response = await fetch("https://iol.invertironline.com/Mercado/GetCaucionPuntas", { | |
"credentials": "include", | |
"headers": { |
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
/** | |
* Se le pasan las horas (String) como parámetro, le hace un split por salto de linea | |
* y se suman. | |
* Lo uso para exportar las horas de toggl y contabilizar las horas trabajadas. | |
*/ | |
function sumarHoras(horas) { | |
if (!Array.isArray(horas)) { | |
horas = horas.split('\n') | |
} |
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
/** | |
@author Alejo Sotelo <alejosotelo.com.ar> | |
@date 2022-07-20 | |
*/ | |
async function getFacturas(from, to, tipoComprobante) { | |
var query = encodeURIComponent(from + '+-+' + to + '&tiposComprobantes[]=' + tipoComprobante) | |
var r = await fetch("https://serviciosjava2.afip.gob.ar/mcmp/jsp/ajax.do?f=generarConsulta&t=E&fechaEmision=" + query, { |
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
/** | |
@author Alejo Sotelo <alejosotelo.com.ar> | |
@date 2022-07-20 | |
Las tareas se ejecutan secuencialmente según el intervalo configurado. | |
Si agrego 3 task/tareas, se van a ejecutar en el orden que las agrego. | |
Cada task tiene un callback (function) que tiene que devolver true (se elimina la tarea y no se ejecuta más) o false (se sigue ejecutando). | |
var fiveSeconds = 5 * 1000; | |
var myTasks = new TaskQueue(fiveSeconds); |
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
async function postQuery(query) { | |
var r = await fetch('https://graph.mirror.finance/graphql', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json' | |
}, | |
body: JSON.stringify({ | |
query: query | |
}) |
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
/** | |
* Cálculo automático para saber si conviene o no y saber qué ganancia se podría hacer haciendo Leverage en AAVE. | |
* También se podría aplicar a cualquier otro proyecto que haga lending/borrow (compound, venus, fortress, etc). | |
* El leverage en AAVE consiste en depositar, pedir prestado una parte (colateral) y volver a depositar. | |
* Esto se puede repetir varias veces, lo óptimo es repetirlo 10 veces. Más de 10 veces no aumentan practicamente las ganancias. | |
* Haciendo esto podemos pasar de una ganancia de 9% a 40% aprox. Según los rewards que nos den por depositar y pedir prestado. | |
* (!) IMPORTANTE: es necesario saber que hacer esto implica el riesgo de que nos liquiden!!! | |
*/ | |
/** |
NewerOlder