When using Calibre-Web from Docker, the most popular container doesn't offer an obvious way to set up a reverse proxy under a different base URL. It's simple to do by writing a request header in your reverse proxy config, as demonstrated below.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HtmlBox(HTML, Title="HtmlBox", Body=True, Full=False, URL=False, width=300, height=200) | |
{ ; Creates a MsgBox style GUI that has embedded HTML | |
global MsgBoxOK, MsgBoxActiveX, MsgBoxFull=Full | |
; Set up the GUI | |
Gui, +HwndDefault | |
Gui, MsgBox:New, +HwndMsgBox +Resize +MinSize +LabelMsgBox | |
if Full | |
Gui, Margin, 0, 0 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GDI | |
{ | |
__New(hWnd, CliWidth=0, CliHeight=0) | |
{ | |
if !(CliWidth && CliHeight) | |
{ | |
VarSetCapacity(Rect, 16, 0) | |
DllCall("GetClientRect", "Ptr", hWnd, "Ptr", &Rect) | |
CliWidth := NumGet(Rect, 8, "Int") | |
CliHeight := NumGet(Rect, 12, "Int") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
old="0" | |
while true; do | |
if [[ -e /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode ]]; then | |
new=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode` | |
if [[ $new != $old ]]; then | |
if [[ $new == "1" ]]; then | |
echo "Rotate to landscape" | |
xsetwacom set "Wacom Serial Penabled Pen stylus" rotate half |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
let doc = document; | |
if (doc.querySelector('iframe#mybbCanvas')) { | |
doc = doc.querySelector('iframe#mybbCanvas') | |
.contentDocument.querySelector('iframe#right_stream_mygrades') | |
.contentDocument; | |
} | |
let download = function(title, text) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FileSelectFile, File,,, Pick a PNG, Images (*.png) | |
Clipboard := PngToBase64(File) | |
MsgBox, % "The image is now on your clipboard. Paste into your browser URL bar." | |
return | |
PngToBase64(file) | |
{ | |
FileGetSize, size, % file | |
FileRead, bin, % "*c " file | |
return "data:image/png;base64," Base64enc(bin, size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import struct | |
import sys | |
INTRANGE = 2 ** 15 | |
REGCOUNT = 8 | |
class Arch: | |
def __init__(self): | |
self.registers = [0] * REGCOUNT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Blackboard Dismiss All Updates | |
// @namespace https://github.com/G33kDude | |
// @version 0.1 | |
// @description Adds a "Dismiss All" button to the Blackboard Learn updates page | |
// @author GeekDude | |
// @match *://*.blackboard.com/webapps/streamViewer/streamViewer* | |
// @grant none | |
// @update https://gist.github.com/G33kDude/4ef48d78fde6cb07490a1c1de3ba79d0/raw/BlackboardDismissAll.user.js | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide quick logout | |
// @namespace https://github.com/G33kDude | |
// @version 0.1 | |
// @description Hides the quick access logout button in the toolbar next to the notifications | |
// @author GeekDude | |
// @match *://autohotkey.com/boards/* | |
// @grant none | |
// @updateURL https://gist.github.com/G33kDude/9f9ec5281a8d574847ca28540425343b/raw/HideQuickLogout.user.js | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gist(Code, NewUser="", NewPass="", Title="AutoHotkey", Public="1") | |
{ | |
static Basic, User, Pass | |
if (User != NewUser || Pass != NewPass) ; If new credentials | |
{ | |
User := NewUser | |
Pass := NewPass | |
if (User && Pass) ; If not blank | |
Basic := Base64(User ":" Pass) ; Create new basic auth code |