Skip to content

Instantly share code, notes, and snippets.

View Efreak's full-sized avatar
😴
😪😴🥱😌💤

Efreak Efreak

😴
😪😴🥱😌💤
View GitHub Profile
@Efreak
Efreak / open-edited-url.sh
Created June 28, 2022 04:50
a script to edit a url inline using whiptail, then open it in a browser
# check what's available for opening the url.
# sensible-browser requires an environment variable :(
# see xdg-open spurce: https://github.com/freedesktop/xdg-utils
# todo: maybe use a second whiptail checklist to pick browser?
# todo: a chooser for termux-open options (send/view, chooser)
for app in $BROWSER termux-open xdg-open firefox elinks links2 links lynx w3m
do
if
type $app > /dev/null 2>&1
then
@Efreak
Efreak / remap_bluetooth_remote.kcm.txt
Created June 26, 2022 02:48
trying to remap the buttons on my bluetooth remote...
type FULL
key DPAD_CENTER {
base: fallback MEDIA_PLAY_PAUSE
}
key DPAD_UP {
base: fallback VOLUME_UP
}
key DPAD_DOWN {
base: fallback VOLUME_DOWN
@Efreak
Efreak / cargo-csearch.bsh
Last active January 9, 2022 18:25
list packages installed via cargo with colored columns for package name, version, and installed binaries
#!/usr/bin/env bash
if [ "$1" = "csearch" ]; then shift; fi #remove subcommand if called via `cargo csearch`
c33=$'\033[33m'
c34=$'\033[34m'
c35=$'\033[35m'
c0=$'\033[0m'
list="$(cargo search $@)"
@Efreak
Efreak / to-html.html
Last active December 12, 2021 20:50
testing to-html
<style>.terminal{background:#ccc;padding:1em}</style>
<P>Setting style <code style="background:#ccc"> &lt;style&gt;.terminal{background:#ccc;padding:1em}&lt;/style&gt; </code> to show dark backgrounds and margins.</p>
<P>You should think about <a href="https://stackoverflow.com/a/54652367">background color detection</a>, there's only a few things you can try and <a href="https://gist.github.com/blueyed/c8470c2aad3381c33ea3">this one</a> worked for me. Background color should certainly be optional, as some terminals will replace colors (Putty, Termux and other terminals allow color themes that modify the 16-color colors available, though for 88-color the built-in colors are usually enough.).</p>
<P>You might also want to consider importing fonts from a cdn, too; <a href="https://github.com/wernight/powerline-web-fonts">this</a> might work.</p>
<pre class="terminal">
<span class="shell">&gt; </span><span class="cmd">uname</span> <span class="flag">-a</span>
Linux localhost 4.14.190-22554634-abT860XXU4CUI4 #2 SM
@Efreak
Efreak / Sandra.md
Last active November 25, 2021 22:26

Pdf attached

@Efreak
Efreak / README.md
Last active October 23, 2021 13:19

Process chapters downloaded by Tachiyomi into cbz files.

  • Optionally convert to cbz.

  • Requires termux.

  • cd into your Tachiyomi/downloads/SOURCE/TITLE folder before running--the script will identify source and title itself.

  • Note that termux does not have cwebp, it must be compiled/obtained elsewhere.

  • Also consider -near_lossless instead of -lossless.

  • THERE IS NO GUARANTEE THIS WILL WORK, OR THAT IT HAD NO TYPOS (I modified, working around a large number of symlinks and personal scripts I use, as well as changing the comments.

  • You are advised to back up your termux and Tachiyomi before runnin (/data/data/com.termux/files; /sdcard/Tachiyomi/downloads), and test on a single Tachiyomi chapter.

@Efreak
Efreak / List of Apps
Created April 14, 2014 00:18
List of Apps
|Name|[Source](URL)|Xposed Module|Root?|Device Administrator|notes|
|:---|:--:|:--:|:--:|:--:|:---|
|AcDisplay|[Google Play](https://play.google.com/store/apps/details?id=com.achep.activedisplay)|Yes||Yes|Lockscreen app|
|Per App Hacking|[Search](https://www.google.com/search?q=org.t2k269.perapphacking)|Yes|||Active, unused|
|App Settings|[Search](https://www.google.com/search?q=de.robv.android.xposed.mods.appsettings)|Yes|||Not many settings configured here, really just a few apps with forced fullscreen|
|XuiMod|[Search](https://www.google.com/search?q=com.zst.xposed.xuimod)|Yes|Yes||Batterybar|
|ActivityForceNewTask|[Search](https://www.google.com/search?q=com.germainz.activityforcenewtask)|Yes||||
|Android Tuner Free|[Google Play](https://play.google.com/store/apps/details?id=ccc71.at.free)|Yes|Yes|||
|Burnt Toast|[Search](https://www.google.com/search?q=com.mohammadag.burnttoast)|Yes||||
|ClockColorChanger|[Search](https://www.google.com/search?q=com.sb.p1)|Yes||||
@Efreak
Efreak / startwsl.vbs
Created November 25, 2016 20:40
Start persistent WSL with services and byobu in background. To launch byobu with wsltty, use the command in wsl.bat, and replace /bin/bash with /usr/bin/byobu. Raw
'syntax
' - Run: http://ss64.com/vb/run.html or https://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx
' - Sleep: http://ss64.com/vb/sleep.html or https://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx
'start hidden byobu in WSL. If you like playing with zsh modules so much that your prompt frequently takes a long time to load, you'll want this.
CreateObject ("Wscript.Shell").Run "C:\Windows\System32\bash.exe -c byobu", 0, false
'give it a bit to finish starting. https://msdn.microsoft.com/en-us/library/6t81adfd(v=vs.84).aspx
WScript.Sleep(3000)
@Efreak
Efreak / index.html
Last active June 9, 2021 03:56
copy of js url/base64 en/decoder by @stephenostermiller with some tweaks. To use, go to https://bots.efreakbnc.net/efreak/encode/ or rawgit: https://goo.gl/kakB1e
<!DOCTYPE html>
<html>
<head>
<title>Base64 and URL Encoding and Decoding</title>
<meta name="description" content="Encodes or decodes data in Base64 or URL encoding using client side JavaScript">
<meta name="keywords" content="base64, base 64, urlencode, urldecode, hexencode, hex encode, hexdecode hex decode, javascript base64, javascript base 64, javascript urlencode, javascript urldecode, javascript hexencode, javascript hexdecode">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<meta name=viewport content="width=device-width, initial-scale=1">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.js"></script>
<style>