Skip to content

Instantly share code, notes, and snippets.

View DavidBerdik's full-sized avatar

David Berdik DavidBerdik

  • Duquesne University | Ex-Amazonian
  • Pittsburgh, PA, USA
View GitHub Profile
@skrimix
skrimix / pixel_kernelsu_patch.sh
Last active March 23, 2024 07:52
boot.img repack script for KernelSU. Supports extracting boot.img from factory and OTA images
#!/bin/bash
set -e
# This script creates a patched boot.img with KernelSU GKI kernel and cmdline tweaks
SCRIPT_PATH="$(dirname "$(realpath -s "$0")")"
MAGISKBOOT="$SCRIPT_PATH"/magiskboot
MAGISK_VER="v26.1" # used for downloading magiskboot, newer versions print "unexpected ASN.1 DER tag: expected SEQUENCE, got APPLICATION [1] (primitive)" warning(?)
ANYKERNEL_FILE_NAME="CHANGE_ME" # for downloading from the latest KernelSU github release, e.g. "AnyKernel3-android13-5.10.157_2023-03.zip"
@vogler
vogler / ring-download-all-videos.js
Last active August 2, 2023 04:26
Download all Videos in Ring Event History
// Even with a subscription, videos are saved online only for 3 months.
// Downloading videos manually is a pain since you can only select 50 at a time, and 'Select Multiple' only has up to 'First 100'.
// 1. Go to https://account.ring.com/account/activity-history
// 2. Click button 'Manage'.
// 3. Scroll down in the event list to load as many events as you want.
// 4. Open Chrome Dev Tools (cmd+alt+i) and open Console to paste the following:
f = (xs, i) => {
const n = xs.length;
xs.slice(Math.max(0, n-i*50), Math.max(0, n-(i-1)*50)).map(x => x.click());
@nk2IsHere
nk2IsHere / 1._Howto_build_Win2k3.md
Last active July 2, 2023 03:11
an interseting tutoriel
@MineTheCube
MineTheCube / mc-api.php
Last active June 11, 2024 14:32
PHP functions to convert UUID to/from Minecraft username
<?php
/**
* Get UUID from Username
*
* @param string $username
* @return string|bool UUID (without dashes) on success, false on failure
*/
function username_to_uuid($username) {
$profile = username_to_profile($username);
@risc987
risc987 / ftpserver.py
Last active June 6, 2020 00:54 — forked from scturtle/ftpserver.py
Support python3, fix local ip bug, chroot bug.
#!/usr/bin/env python
#coding: utf-8
import os,socket,threading,time
#import traceback
import sys
#sys.setdefaultencoding('utf8')
#allow_delete = False
allow_delete = True
@scturtle
scturtle / ftpserver.py
Created June 20, 2011 16:03
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')