This file contains hidden or 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
| MIT License | |
| Copyright (c) 2024 Muhammad Amin Boubaker | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
This file contains hidden or 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 | |
| set -e | |
| function cleanup() { | |
| # clean up our temp folder | |
| rm -rf "${TMPDIR}" | |
| } | |
| trap cleanup EXIT |
This file contains hidden or 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
| #!/usr/bin/env -S bash -xeuo pipefail | |
| set -xeuo pipefail | |
| pkg install pacman patchelf \ | |
| which time ldd tree | |
| echo | |
| echo |
This file contains hidden or 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
| for i in icewm jwm fluxbox openbox bspwm 2bwm fvwm xorg-twm awesome i3 ; do ( echo '#!/usr/bin/env -S bash -xeuo pipefail' ; echo ; echo 'export DISPLAY="${DISPLAY:-:0}"' ; echo 'export DISPLAY="${1:-${DISPLAY}}"' ; echo 'shift || true' ; echo ; echo 'if [[ "${1:-}" == "nodbus" ]] ; then' ; echo ' shift || true' ; echo ' export NO_DBUS="y"' ; echo 'fi' ; echo ; echo 'if [[ "${1:-}" == "dbus" ]] ; then' ; echo ' shift || true' ; echo ' export NO_DBUS=""' ; echo 'fi' ; echo ; echo 'if [[ -n "${NO_DBUS:-}" ]] ; then' ; echo ' export DBUS_CMD=""' ; echo 'else' ; echo ' export DBUS_CMD="${DBUS_CMD:-dbus-launch --exit-with-x11 --exit-with-session}"' ; echo ' if [[ -n "${1:-}" ]] ; then' ; echo ' export DBUS_CMD="${@}"' ; echo ' fi' ; echo 'fi' ; echo ; echo 'termux-x11 "${DISPLAY:-0}" v -p "${SCREENSAVER_MIN:-5}" -terminate "${RESET_SEC:-60}" -schedInterval "${SCHED_MS:-500}" -br -dpi "${DPI:-96}" -deferglyphs "${DIFFER_GLYPHS:-all}" -maxclients "${MAX_CLIENTS:-64}" -once -listen unix -nolisten tcp +bs |
This file contains hidden or 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
| type HttpRequestWithSocket = { | |
| headers: Headers | Record<string, string | string[] | undefined> | |
| socket?: { remoteAddress?: string } | |
| } | |
| /** | |
| * Gets the client IP address from request headers with secure proxy handling | |
| * @param request - The incoming Request object or IncomingMessage | |
| * @returns The client IP address (with appropriate fallbacks) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| usage() { | |
| cat <<EOF | |
| Usage: $0 [--help] [-t "title"] [-p "priority"] [-g "tags"] "topic" "message" | |
| Options: | |
| --help Show this help and exit | |
| -t TITLE Notification title |
OlderNewer