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
<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() { |
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
#!/usr/bin/python | |
import requests | |
import time | |
import sys | |
import json | |
# Login and get a token | |
endpoint = "https://fromshado.ws" | |
# Admin credentials | |
ADMINUSER = "" |
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 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 |
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
#!/sbin/openrc-run | |
description="Start minecraft server" | |
command_user="minecraft:minecraft" | |
command="/usr/bin/java" | |
command_args="-Xmx1024M -Xms1024M -jar server.jar nogui" | |
pidfile=mine.pid | |
command_background=true | |
directory="/home/minecraft" |
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
[keystores] | |
[keystores.store2] | |
path = "clave.jks" | |
[keystores.store2.aliases.key2] | |
name = "mykey" | |
[devices] | |
arm64 = ["192.168.0.3:5000"] | |
arm32 = ["68534e400605"] | |
[projects] |
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
#!/usr/bin/env sh | |
# make sure we never run 2 rsync at the same time | |
lockfile="/tmp/alpine-mirror.lock" | |
if [ -z "$flock" ] ; then | |
exec env flock=1 flock -n $lockfile "$0" "$@" | |
fi | |
src=rsync://rsync.alpinelinux.org/alpine/ | |
dest=/var/lib/libvirt/filesystems/common/mirror |
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
while (message = document.querySelector('[data-testid="messageEntry"]')) { | |
message.click(); | |
var spans = document.querySelectorAll('span'); | |
[].forEach.call(spans, function(span) { | |
if (span.innerHTML == "Delete") { | |
span.click(); | |
} | |
}); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<manifest> | |
<project name="33bca/android_device_xiaomi_daisy" path="device/xiaomi/daisy" remote="github" /> | |
<project name="33bca/android_kernel_xiaomi_msm8953" path="kernel/xiaomi/msm8953" remote="github" /> | |
<project name="33bca/android_vendor_xiaomi_daisy" path="vendor/xiaomi/daisy" remote="github" /> | |
<project name="Eskuero/patches_lineageos" path="patches" remote="github" /> | |
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" /> | |
</manifest> |
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
from mastodon import Mastodon | |
from bs4 import BeautifulSoup | |
from random import randint | |
# Connect to Mastodon with bot token | |
mastodon = Mastodon( | |
access_token = 'REPLACE ME', | |
api_base_url = 'REPLACE ME' | |
) |
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
var deleteall = async function() { | |
console.log("Undoing Retweets") | |
// Keep iterating until there's no retweet to do | |
while (retweet = document.querySelector('[data-testid="unretweet"]')) { | |
console.log(retweet) | |
retweet.click(); | |
// Sleep a bit to make sure the confirm prompt appeared | |
await new Promise(r => setTimeout(r, 1000)); | |
document.querySelector('[data-testid="unretweetConfirm"]').click() | |
// Sleep a bit again to make sure the tweet is unspawned from view |
NewerOlder