Skip to content

Instantly share code, notes, and snippets.

@diyfr
diyfr / readme.md
Created September 29, 2023 14:39
AdGuard Home + Traefik

edit traefik.yml

entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"
  dot: # <- ADD THIS
    address: ":853"  # <- ADD THIS
@RhetTbull
RhetTbull / vision.py
Last active April 24, 2024 21:05
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@madan712
madan712 / WindowsProcessKiller.java
Created October 31, 2013 08:44
Java program to kill a runnning windows process
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class WindowsProcessKiller {
// command used to get list of running task
private static final String TASKLIST = "tasklist";
// command used to kill a task
private static final String KILL = "taskkill /IM ";
@hizkifw
hizkifw / cloudflare-worker-youtube-dl.js
Last active April 24, 2024 21:03
Download YouTube videos with Cloudflare Worker
/**
* cloudflare-worker-youtube-dl.js
* Get direct links to YouTube videos using Cloudflare Workers.
*
* Usage:
* GET /?v=dQw4w9WgXcQ
* -> Returns a JSON list of supported formats
*
* GET /?v=dQw4w9WgXcQ&f=251
* -> Returns a stream of the specified format ID
@tomfanning
tomfanning / userdata.sh
Last active April 24, 2024 21:00
AWS EC2 userdata script to set root pw, allow pw logon, auto updates, and set selinux permissive.
#!/bin/bash -e
rootpw="mypassword"
cat /etc/ssh/sshd_config | sed "s/PasswordAuthentication no/PasswordAuthentication yes/" | sed "s/#PermitRootLogin yes/PermitRootLogin yes/" > /etc/ssh/sshd_config
echo "
MaxAuthTries 10" >> /etc/ssh/sshd_config
systemctl restart sshd
echo root:$rootpw | chpasswd
@gxfxyz
gxfxyz / synology_disk_benchmark.sh
Created October 1, 2018 18:16
A simple script to test Synology NAS disk speed with hdparm, dd and fio
#!/usr/bin/env bash
# =======================================================================================
#
# A simple script to test Synology NAS disk speed with hdparm, dd and fio.
#
# How to use:
#
# 1. Save synology_disk_benchmark.sh and xfio.conf to your Synology NAS
# 2. Make it executable: chmod +x synology_disk_benchmark.sh
@opus-x
opus-x / Spotify_Eliminate_Advertisements
Last active April 24, 2024 20:56
Eliminate Spotify Advertisements + Complete Server List
##################################################################################
# ELIMINATE SPOTIFY ADS (VERSION 1.2 - 8.5) - ABANDONED FOR NOW #
##################################################################################
#
# NOTE: SOMETIMES ONLY ANNOUNCEMENT OF AN AD WHILE USING APP VERSION 7.5-7.9?-8.x.
# USING AN OFFICIAL OLDER VERSION SOLVES THIS. TEST IT (APKMIRROR). THIS WILL NOT
# OCCUR USING CHROMECAST / GOOGLE HOME.
#
# COULD NOT SOLVE THE AUDIO AD INRO/OUTRO IN THE APP.
# SUGGESTIONS? WRITE A COMMENT BELOW.
@wareya
wareya / spi_recorder.ino
Last active April 24, 2024 20:52
long SPI message recorder - rasberry pi pico (rp2040), arduino IDE .ino file (C++)
// wiring example for ripping a PMW3360 SROM: https://i.imgur.com/EspAlvz.jpeg
// set the board to 240mhz or higher for best results (WARNING: higher than 240mhz only works with USB if you overvolt the MCU)
// this implements reading SPI mode 3. if you want a different mode, you need to edit these two lines:
// uint32_t clockval = (1 << pin_clock);
// if (newclock && !clockval && buff_i < buffsize)
#include <pico/stdlib.h>
#define buffsize 50000

Touchscreen not working in custom recovery on Mediatek devices - MTK - mtxxxx

This is not a complete guide. But a start for future discussions.

A little information

As far as we know, companies may or may not include touchscreen drivers in the kernel. In such situations, experts analyze the kernel and modify it to include the correct driver and try to make the touch screen work. If you've seen the situation happen and you don't have extra touchscreen driver files, go to the links to learn about it or ask for help:

How to modify a (Meditek) Android kernel - github thanks for @ADeadTrousers