Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env sh
snaps_dir="/var/lib/snapd/snaps"
snaps_mnt="/snap"
nsfs_mnt="/run/snapd/ns"
def_compression="xz"
new_compression="zstd"
main() {
@shvchk
shvchk / lean-nativefier.sh
Last active June 5, 2023 23:43
nativefier wrapper removing bundled electron to use shared / system-wide elecron
#! /usr/bin/env bash
# To use apps created with this script you will need Electron installed e.g. with npm install -g electron
set -e
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Please specify app name and URL. E.g. $0 Example https://example.com"
exit 1
fi
/* Windows users might also want to consider setting
* browser.tabs.drawInTitlebar to false in about:config
*/
#TabsToolbar {
visibility: collapse !important;
}
#titlebar {
display: none;
Auto Tab Discard
Close Window Button
Decentraleyes
hooktube Redirector
HTTPS Everywhere
KeePassXC-Browser
LoadTabOnSelect
Panel View for Google™ Translate
Select Link Text
SmartProxy
--- a/trunk/user/busybox/busybox-1.24.x/scripts/kconfig/zconf.hash.c_shipped
+++ b/trunk/user/busybox/busybox-1.24.x/scripts/kconfig/zconf.hash.c_shipped
@@ -156,7 +156,7 @@ static struct kconf_id_strings_t kconf_id_strings_contents =
#ifdef __GNUC__
__inline
#endif
-struct kconf_id *
+static struct kconf_id *
kconf_id_lookup (register const char *str, register unsigned int len)
{
*.aaa , No Container
*.aarp , No Container
*.abarth , No Container
*.abb , No Container
*.abbott , No Container
*.abbvie , No Container
*.abc , No Container
*.able , No Container
*.abogado , No Container
*.abudhabi , No Container
#! /usr/bin/env sh
USERNAME="support"
AVATAR_URL="https://shevchuk.co/cog.png"
AVATAR_FILE="/home/$USERNAME/.face"
sudo adduser --uid 555 --gecos "" $USERNAME
sudo adduser $USERNAME sudo
sudo wget -qO $AVATAR_FILE $AVATAR_URL
sudo chown $USERNAME:$USERNAME $AVATAR_FILE
#! /usr/bin/env sh
DEFAULT_DL_LIMIT="32" # KB/s
APT_LAST_UPDATE_FILE="$HOME/.apt-last-update"
NICE="nice -n 19 ionice -c 3 trickle -s -d ${1:-$DEFAULT_DL_LIMIT}"
if [ -e $APT_LAST_UPDATE_FILE ] && [ $(( $(date +%s) - $(date +%s -r $APT_LAST_UPDATE_FILE) )) -le 3600 ]
then
echo "APT package lists updated less than an hour ago, skipping"
else
#! /usr/bin/env sh
DEFAULT_DL_LIMIT="32" # KB/s
APT_LAST_UPDATE_FILE="$HOME/.apt-last-update"
NICE="nice -n 19 ionice -c 3 trickle -s -d ${1:-$DEFAULT_DL_LIMIT}"
if [ -e $APT_LAST_UPDATE_FILE ] && [ $(( $(date +%s) - $(date +%s -r $APT_LAST_UPDATE_FILE) )) -le 3600 ]
then
echo "APT package lists updated less than an hour ago, skipping"
else
#! /usr/bin/env sh
DEFAULT_DL_LIMIT="32" # KB/s
APT_LAST_UPDATE_FILE="$HOME/.apt-last-update"
NICE="nice -n 19 ionice -c 3 trickle -s -d ${1:-$DEFAULT_DL_LIMIT}"
sudo $NICE apt update
touch $APT_LAST_UPDATE_FILE