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 / may.sh
Created May 15, 2019 11:06
LineageOS 14.1 May security patch
#!/bin/bash
BASE=$(pwd)
cd $BASE/.repo/manifests;
git fetch https://github.com/LineageOS/android refs/changes/45/248345/1 && git cherry-pick FETCH_HEAD;
cd $BASE;
repo sync --force-sync;
cd $BASE/external/wpa_supplicant_8;
git fetch https://github.com/LineageOS/android_external_wpa_supplicant_8 refs/changes/64/247664/1 && git cherry-pick FETCH_HEAD;
@Eskuero
Eskuero / android-rsync-guide.md
Last active June 7, 2019 22:07
rsync from desktop to andorid (termux)

Inside termux on Android:


  1. Install the required packages
    $ apt install openssh rsync
    
  2. Add a password for the termux user

$ passwd

@Eskuero
Eskuero / july.sh
Created July 6, 2019 15:01
LineageOS July 2019 patches
#/bin/bash
BASE=$(pwd)
cd $BASE/.repo/manifests;
git fetch "https://github.com/LineageOS/android" refs/changes/67/250967/2 && git cherry-pick FETCH_HEAD;
cd $BASE;
repo sync --force-sync
cd $BASE/build/make;
git fetch "https://github.com/LineageOS/android_build" refs/changes/68/250968/1 && git cherry-pick FETCH_HEAD;
@Eskuero
Eskuero / deletealltwitter.js
Last active October 6, 2019 23:50
Updated version of the tweet deleter and retweet undoer for the 2019 version of Twitter.
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
@Eskuero
Eskuero / nicenessbot.py
Created July 29, 2019 16:42
Source code for Mastodon's nicenessbot @[email protected]
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'
)
@Eskuero
Eskuero / roomservice.xml
Created August 11, 2019 01:57
Barebones LineageOS manifest
<?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>
@Eskuero
Eskuero / dms.js
Created August 20, 2019 04:08
Clean all message in a certain Twitter conversation at DMS
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();
}
});
}
@Eskuero
Eskuero / alpine-mirror
Created August 26, 2019 23:34
Script to exclusively sync "x86_64" arch and "latest-stable" tag from an Alpine Linux mirror into a local folder.
#!/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
@Eskuero
Eskuero / nino.toml
Created January 8, 2020 21:36
Sample nino config file
[keystores]
[keystores.store2]
path = "clave.jks"
[keystores.store2.aliases.key2]
name = "mykey"
[devices]
arm64 = ["192.168.0.3:5000"]
arm32 = ["68534e400605"]
[projects]
@Eskuero
Eskuero / minecraft
Created March 16, 2020 12:43
OpenRC minecraft startup config to run as unprivileged user
#!/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"