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
[Unit] | |
Description=rclone dlna service | |
Documentation=man:rclone(1) | |
After=network.target auditd.service | |
[Service] | |
ExecStart=rclone serve dlna --addr :8080 \ | |
--vfs-cache-mode full \ | |
--vfs-cache-max-age 60m \ | |
--vfs-cache-max-size 32768 \ |
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
[Unit] | |
Description=rclone sftp service | |
Documentation=man:rclone(1) | |
After=network.target auditd.service | |
[Service] | |
ExecStart=rclone serve sftp --no-auth --addr :2022 \ | |
--vfs-cache-mode full \ | |
--vfs-cache-max-age 10m \ | |
--vfs-cache-max-size 32768 \ |
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
# Simple backup script to backup a Windows 10 installation (EFI or MBR) using the /dev/ name, e.g. if on sda run "sh win10backup.sh sda" | |
PART=$1 | |
date | |
echo "Saving partition map of ${PART}..." | |
fdisk -l /dev/${PART} > ${PART}.fdisk | |
cat ${PART}.fdisk | |
echo "Saving boot sector of ${PART}..." | |
dd bs=2048 count=1 if=/dev/${PART} of=${PART}.mbr |
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
# /etc/fstab: static file system information. | |
# <file system> <mount point> <type> <options> <dump> <pass> | |
UUID=XXXX-XXXX /boot/efi vfat umask=0077,x-gvfs-show,x-gvfs-name=EFI 0 0 | |
UUID=XXXXX /mnt/f2fs f2fs rw,relatime,lazytime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix,background_gc=on,user_xattr,x-gvfs-show,x-gvfs-name=PopOs 0 0 | |
UUID=XXXXX /mnt/ext4 ext4 nofail,noatime,nodiratime,discard,commit=90,max_batch_time=50022,min_batch_time=5000,journal_ioprio=0,errors=remount-ro,x-gvfs-show,x-gvfs-name=data 0 0 | |
UUID=XXXX-XXXX /mnt/exfat exfat nofail,noatime,nodiratime,rw,allow_utime=2,nosuid,nodev,umask=0022,dmask=0022,uid=1000,gid=1000,user,x-gvfs-show,x-gvfs-name=data 0 0 | |
UUID=XXXXXXXXXXXXXX /mnt/ntfs ntfs-3g nofail,rw,relatime,umask=0022,user_id=1000,group_id=1000,user,allow_other,big_writes,lazytime,windows_names,noatime,nodiratime,x-gvfs-show,x-gvfs-name=data2-ntfs,nosuid,nodev |
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
umount $1 | |
fsck.ext4 -v -F -f -p -D -E inode_count_fullmap,optimize_extents, $1 | |
mount $1 |
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
umount $1 | |
fsck.ext4 -f -c -k -p -t -v -D -E inode_count_fullmap $1 | |
mount $1 |
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
<?php | |
/** | |
* Escape markdown text | |
* | |
* @param string $text the markdown text to escape | |
* | |
* @return string escaped text | |
*/ | |
function markdown_escape($text) { | |
return str_replace([ |
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
sudo scutil --set HostName $1 | |
sudo scutil --set LocalHostName $1 | |
sudo scutil --set ComputerName $1 | |
dscacheutil -flushcache |
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
BACKUPFILE=`date "+%Y%m%d.%H%M%S"`.adb | |
adb backup -apk -obb -shared -all -nosystem $BACKUPFILE | |
# EXTRACT: ( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) | tar xfvz - | |
# RESTORE: adb restore backup.ab |
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
#!/usr/bin/php | |
<?php | |
// show and optionally rename files and dirs to transliterated unaccented ascii from current working folder | |
// 2019-12-24 Vijay Mahrra vijay@yoyo.org | |
// code is public domain | |
define('DEBUG', true); // use pre-generated file list | |
define('VERBOSE', true); | |
define('RENAME', false); // allow renaming | |
define('RENAME_FILES', false); |
NewerOlder