Skip to content

Instantly share code, notes, and snippets.

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

Efreak Efreak

😴
😪😴🥱😌💤
View GitHub Profile
@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 / 1. Copying steam guard from rooted to unrooted device.md
Last active May 6, 2025 02:32
Move steam mobile from rooted device to unrooted device without losing steam guard keys

Steam mobile doesn't allow you to use adb backups to move steam guard keys to your new device. This means if you use WinAuth or other tools that use the steam guard private key obtained from a rooted device, they will stop working when you switch devices and set up a new steam guard. The process below will allow you to move your steam guard key from a rooted device to an unrooted device.

notes:

A. when installing old versions of apps from unofficial sources, it's important to verify that they're legitimate. One way to do this is to install the old version, then try updating it through the play store--this process will not work if the signatures don't match.

B. don't keep unencrypted backups around. 2fa doesn't help if someone else gets ahold of it. Titanium backups are standard compressed files/folders, and adb backups are tar files with a few extra bytes at the beginning (the beginning of the file is at a fixed offset), and it's trivial to extract files from them. I'm not sure how secure adb password p

@Efreak
Efreak / wishlist.md
Created September 2, 2020 18:22
Keyboard/mouse wishlist

My wishlist for a customized keyboard are basically

  • full 24 function keys [1]
  • two altgr/windows/meta/whatever keys (old windows 95 keyboards used to advertise this, then it went away)
  • either 1 or 2 context menu keys
  • analog volume control (wheel, not buttons)
  • no full 1-inch border around the top/sides
  • history back/forward buttons next to the arrow keys
  • I don't care about mechanical keys, they're too loud.
  • as a nice touch, include blank keys/caps for some of the function keys, to make them easier to relabel.
@Efreak
Efreak / Feeds.md
Last active August 12, 2020 20:25
OPDS feeds

OPDS feeds

For use in your OPDS client

The first link is the website; the second link is a link to the feed that you can copy; the third link is an opds:// link that may open in your client, and the last link is to the opds validator.

Working Feeds

These feeds are valid (and working, so far as I can tell). That doesn't mean I'm checking them, though.

Website http://feed opds://feed validate
@Efreak
Efreak / Calibre Server with nginx WebDAV.md
Last active December 2, 2022 20:40 — forked from luzfcb/CalibreServerOnLinux.md
Calibre Server on Linux (in progress)

This is for setting up an nginx virtual host with webdav access, as well as open directory access if you've got a reader that doesn't support OPDS, or as a backup in the case your server is misconfigured, inaccessible, javascript is disabled, etc.

setup an htpasswd file (this will only be used for webdav, not for calibre itself). You may run this command as many times as you like to add extra users.

mkdir -p /etc/nginx/auth
printf "$(please enter your username):$(openssl passwd $(read -p "Please enter your password")\n" >> /etc/nginx/auth/calibre-webdav-users.passwd

Use this config instead of the one in the main file

@Efreak
Efreak / GOUDOS.eot
Last active July 24, 2020 19:16
Webfonts for use elsewhere
@Efreak
Efreak / _bookerly.css
Created July 2, 2020 23:25
Bookerly font-face rules
@font-face {
font-family: 'Bookerly';
src: url('https://rawcdn.githack.com/skotzko/oldblog/c34be5396747ab36b352ec48b964e3e8548d5e37/scss/fonts/bookerly/Bookerly-Regular.eot'); /* IE9 Compat Modes */
src: url('https://rawcdn.githack.com/skotzko/oldblog/c34be5396747ab36b352ec48b964e3e8548d5e37/scss/fonts/bookerly/Bookerly-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('https://rawcdn.githack.com/skotzko/oldblog/c34be5396747ab36b352ec48b964e3e8548d5e37/scss/fonts/bookerly/Bookerly-Regular.woff') format('woff'), /* Pretty Modern Browsers */
url('https://rawcdn.githack.com/skotzko/oldblog/c34be5396747ab36b352ec48b964e3e8548d5e37/scss/fonts/bookerly/Bookerly-Regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('https://rawcdn.githack.com/skotzko/oldblog/c34be5396747ab36b352ec48b964e3e8548d5e37/scss/fonts/bookerly/Bookerly-Regular.svg#svgFontName') format('svg'); /* Legacy iOS */
font-weight: normal;
font-style: normal;
}