Skip to content

Instantly share code, notes, and snippets.

View jck's full-sized avatar

Keerthan Jaic jck

  • London, UK
View GitHub Profile
@jevakallio
jevakallio / readme.md
Last active April 8, 2025 09:33
`adb pull` from app data directory without root access

TL;DR;

com.package.name is your app identifier, and the file path is relative to the app user's home directory, e.g. '/data/user/0/com.package.name.

adb shell run-as com.package.name cp relative/path/file.ext /sdcard
adb pull /sdcard/file.ext

See long explanation below.

@AFutureD
AFutureD / Hypothesis.user.js
Last active December 29, 2024 15:15
A Tempermonkey script for Hypothes.is
// ==UserScript==
// @name Hypothesis
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author AFuture
// @match *://*/*
// @grant none
// ==/UserScript==
@abersheeran
abersheeran / proxy.worker.js
Last active February 26, 2025 13:28
A proxy download cloudflare worker
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {
const url = getUrl(request)
@DarrenSem
DarrenSem / innerText.js
Last active January 26, 2025 18:33
innerText.js bookmarklet for mobile (to show webpage text contents OR html) (including PARTIAL source of SELECTION)
// innerText.js bookmarklet for mobile (to show webpage text contents OR html) (including PARTIAL source of SELECTION)
// https://gist.github.com/DarrenSem/7e1216bda80e6269ad53b43d90603158
// 26Jan2025 BUGFIX: now missing ONLY the "System instructions" section (one extra div layer was added SIGH)
// 4784 char javascript:void function(){"use strict";const e="main div[data-collapsed",n="engine-select",t=`div.model-select>button>span`,d=[]._,i=((e,t,i,a,n,l,d,r)=>(t=new Date(e||Date()),[i,a,,n]=t.toLocaleTimeString().replace(/(a|p)\.(m)\./i,"$1$2").split(/\W/),[,,l,d]=t.toString().split(" "),r=t.toLocaleString().replace(/(\d+)-(\d+)-(\d+)/,"$2/$1/$3").split("/")[0].padStart(2,0),`${i}${a}${(n||"").toLowerCase()} ${d}-${r}-${l}`))(),a=`${""} ${i}`,l=top.document,r=location,u=(e,n)=>(n||l).querySelectorAll(e||null),o=(e,n)=>{const t=e?.[n?"value":x],i=t==d?d:n?t:t.replace(/\n{3,}/g,"\n\n\n").replace(/\n\n/g,"\n");return i},f=e=>e.trim(),s=e=>(e??"").replace(/\nSYNC$/i,"").replace(/ INSTRUCTIONS$/i,""),c=e=>(e??
{
"promptLists": {
"endOfChapterReview": {
"embedPath": {
"before": true,
"cssSelector":
"html body main#main.wb div.content nav.pagination.hidden-print"
},
"promptsByFrontText": [
"Why might over-specifying a design make it harder to estimate?",
// ==UserScript==
// @name Arxiv PDF Title Updater for Hypothesis Pages
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Update Arxiv PDF links titles on Hypothesis pages
// @author David Bieber + GPT-4
// @match *://*.hypothes.is/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
@mezhgano
mezhgano / playwright_save_mhtml.py
Created May 1, 2023 14:58
Save .mhtml web archive using playwright
from playwright.sync_api import sync_playwright
def save_mhtml(path: str, text: str):
with open(path, mode='w', encoding='UTF-8', newline='\n') as file:
file.write(text)
def save_page(url: str, path: str):
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=False)
@amahdy
amahdy / release-android-debuggable.md
Created July 16, 2023 15:39
How to make a Release Android App debuggable (Android R+)

How to make a Release Android App debuggable (Android R+)

This is a newer version with a bit more details and workarounds from this gist. Especially for Android R+.

I recommend to read the previous gist to get an idea about what I'm trying to achieve. This note will be straight forward on commands to perform. Some commands use zipalign and apksigner which are located in the build-tools of your Android SDK installation folder. Mine are located in: ~/Library/Android/sdk/build-tools/34.0.0/.

@adrianhorning08
adrianhorning08 / zillowScraper.js
Last active January 28, 2025 21:32
Zillow Scraper
async function scrollDown() {
const wrapper = document.querySelector("#search-page-list-container");
await new Promise((resolve, reject) => {
var totalHeight = 0;
var distance = 600;
var timer = setInterval(async () => {
var scrollHeightBefore = wrapper.scrollHeight;
wrapper.scrollBy(0, distance);
totalHeight += distance;