System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
{ | |
"jackett": { | |
"enabled": true, | |
"predefined": false, | |
"languages": "en", | |
"anime_extra": "", | |
"anime_keywords": "{title} {episode}", | |
"anime_query": "", | |
"base_url": "http://{IP}:9117/api/v2.0/indexers/{tracker}/results?apikey={pass}", | |
"color": "FFF14E13", |
export STEAM_COMPAT_CLIENT_INSTALL_PATH="${HOME}/.local/share/Steam" | |
# export STEAM_COMPAT_MOUNTS="${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/common/Proton - Experimental:/home/pc/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper" | |
export STEAM_COMPAT_MOUNTS="${STEAM_COMPAT_CLIENT_INSTALL_PATH}/steamapps/common/Proton - Experimental" | |
export STEAM_COMPAT_DATA_PATH="${PWD}/prefix" | |
export WINEPREFIX="${STEAM_COMPAT_DATA_PATH}/pfx" | |
mkdir -p "${STEAM_COMPAT_DATA_PATH}" | |
"${STEAM_COMPAT_MOUNTS%%:*}/proton" run "${EXE}" |
{ | |
"name": "Filmix", | |
"plugin": "plugin.video.filmix", | |
"priority": 100, | |
"assert": { | |
"play_movie": [ | |
"title", "year" | |
], | |
"play_episode": [ | |
"showname", "season", "episode" |
@url https://major.io/2007/07/05/bintar-argument-list-too-long/ | |
If you find yourself stuck with over 30,000 files in a directory (text files in this example), packing them into a tar file can be tricky. You can get around it with this: | |
find . -name '*.txt' -print >/tmp/test.manifest | |
tar -cvzf textfiles.tar.gz --files-from /tmp/test.manifest | |
find . -name '*.txt' | xargs rm -v |
#!/bin/bash | |
# sudo apt install icoutils | |
# wrestool -x --output=./ -t14 ./$EXE | |
# icotool -x --width=128 --height=128 $(ls -S -1 *.ico | head -n 1) | |
GAME_EXE= | |
for arg in "$@"; do | |
if [[ "$arg" =~ '.exe' ]]; then | |
GAME_EXE=$arg; |
System directories
Method | Result |
---|---|
Environment.getDataDirectory() | /data |
Environment.getDownloadCacheDirectory() | /cache |
Environment.getRootDirectory() | /system |
External storage directories
lxc start penguin | |
USER=$(lxc exec penguin -- ls /home) | |
lxc stop penguin --force | |
lxc delete penguin | |
lxc launch ubuntu:20.10 penguin | |
lxc exec penguin -- bash | |
echo "deb https://storage.googleapis.com/cros-packages stretch main" > /etc/apt/sources.list.d/cros.list | |
if [ -f /dev/.cros_milestone ]; then sudo sed -i "s?packages?packages/$(cat /dev/.cros_milestone)?" /etc/apt/sources.list.d/cros.list; fi | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13 | |
apt update |
#!/bin/sh | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root!" | |
echo "Вы должны запускать программу имея права суперпользователя!" | |
sleep 2 | |
exit 1 | |
fi | |
grub_inst() { | |
echo "#!/bin/sh | |
exec tail -n +3 \$0 |
#!/usr/bin/env bash | |
mount -o remount,rw / | |
cat <<EOT > /usr/local/bin/run | |
#!/usr/bin/env bash | |
rm -f /tmp/run | |
if [ "\$1" == "x" ]; then | |
sudo startunity -n bionic -X xorg | |
exit; | |
fi | |
if [ "\$1" == "t" ]; then |
syntax on | |
filetype plugin indent on | |
set shell=/bin/bash | |
set showtabline=2 | |
set laststatus=2 | |
set backspace=indent,eol,start | |
set fileencoding=utf-8 | |
set encoding=utf-8 | |
set termencoding=utf-8 | |
set fencs=utf-8,cp1251,koi8-r,cp866 |