Skip to content

Instantly share code, notes, and snippets.

process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
async function getLiveGameAPIAddress() {
return new Promise((resolve, reject) => {
const exec = require('child_process').exec;
const fetch = require("node-fetch");
exec('tasklist', function (err, stdout, stderr) {
const leagueLine = stdout.split("\n").filter(l => l.startsWith("League of Legends.exe"))[0];
if (leagueLine == null) {
reject("No League of Legends client found");
@hazi98
hazi98 / elevador.py
Last active February 25, 2020 21:53
# Definición de acciones del elevador
ARRIBA = 1
ABAJO = 2
NUM_PISOS = 4
MAX_PERSONAS = 6
ERROR_PERSONAS = -2
ERROR_PISO = -3
class Persona:
import random as ran
import math
# Variable de pi
pi = 0
# Contador de dardos dentro del circulo
dardos_dentro = 0
# Numero total de dardos a tirar
total = 10000