Skip to content

Instantly share code, notes, and snippets.

View Eskuero's full-sized avatar

Óliver García Albertos Eskuero

  • Tenerife, Spain
View GitHub Profile
@Eskuero
Eskuero / tresenraya.py
Created May 8, 2020 18:26
Tres en raya
import math
def iswon():
global ganador
for i in range(0, 3):
# Victoria en horizontal
if (board[i][0] == board[i][1] == board[i][2]):
ganador = board[i][0]
return True
# Victoria en vertical
@Eskuero
Eskuero / synapse-tidying.py
Last active August 26, 2023 20:33
Tidying up a bit database and remote media from a synapse server using the admin API
#!/usr/bin/python
import requests
import time
import sys
import json
# Login and get a token
endpoint = "https://fromshado.ws"
# Admin credentials
ADMINUSER = ""
@Eskuero
Eskuero / index.html
Created August 10, 2021 18:10 — forked from lyudmil-mitev/index.html
CSS Transform Scale element to fit its parent
<html>
<head>
<title>CSS Transform Scale element to fit its parent</title>
<script src="scale2fit.js"></script>
<link rel="stylesheet" href="style.css"/>
<script>
(function(window) {
function main() {
const margin = 10;
requestAnimationFrame(function fitToParentOnResize() {