Skip to content

Instantly share code, notes, and snippets.

View rcky844's full-sized avatar

Ricky Cheung rcky844

View GitHub Profile
#!/usr/bin/env bash
TMPFILE=$(mktemp)
trap 'rm -f "$TMPFILE"' EXIT
spectacle -r -o $TMPFILE -b -n 2>/dev/null
if [ -f "$TMPFILE" ]; then
export OMP_THREAD_LIMIT=1
if [ "$XDG_SESSION_TYPE" = "x11" ]; then
tesseract $TMPFILE - --oem 1 | xclip -selection clipboard
fi
@rcky844
rcky844 / pdfcleanse
Last active February 11, 2025 12:16
#!/usr/bin/env bash
# pdfcleanse 2025.02.11
# By Ricky Cheung <[email protected]>
# Variables:
# - COMPRESS_TYPE: bw, jpeg, webp
# - COMPRESS_BW_BRIGHTNESS (int - default: 15X1)
# - EXTRACT_METHOD: ppm, images, magick (default: ppm)
# - SAVE_METHOD: gs, qpdf (default: gs)
@rcky844
rcky844 / MainActivity.java
Created August 3, 2024 14:43
Decompilation of Google Play Store's amazing Bussin WebX
package com.retiredlake.napture;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.webkit.ValueCallback;
import android.webkit.WebSettings;
import android.webkit.WebView;
@rcky844
rcky844 / missing_constants.h
Created July 16, 2024 11:12
OSS libwcnss_qmi header file
/*
* Copyright (C) 2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software