I hereby claim:
- I am gwpl on github.
- I am gwpl (https://keybase.io/gwpl) on keybase.
- I have a public key ASCSgZW4fP-pVrJ8zG0GbajAW_pSNWHrZjkhXWCYxS2fZAo
To claim this, I am signing this object:
| #!/bin/bash | |
| # http://tex.stackexchange.com/a/1417/7128 | |
| TMPDIR=$(mktemp -d /tmp/git-latexdiff.XXXXXX) | |
| latexdiff "$1" "$2" > $TMPDIR/diff.tex | |
| pdflatex -interaction nonstopmode -output-directory $TMPDIR $TMPDIR/diff.tex | |
| okular $TMPDIR/diff.pdf | |
| rm -rf $TMPDIR | |
| # Add to ~/.gitconfig |
| #!/bin/bash | |
| # Example usecase: | |
| # inotify_exec_on_file_change.sh /path/phd paper.tex pdflatex paper.tex | |
| dirn="$1" | |
| filen="$2" | |
| shift 2 | |
| echo "Watching directory $dirn for changes of file $filen . Watching directory insteaf of file to overcome behaviour of many text editors that replace file - Thanks to Giles and see his answer https://superuser.com/a/181543/81861 for more details. In case of matching even I execute:" $@ |
| #!/bin/bash | |
| # Generate .csv formatted basic metadata, fast to obtain, but allowing heuristics for syncing files or initial eastimation of backup/sync coverage. | |
| fullpath="${1:-$PWD}" | |
| dest="${2:-"$fullpath"/basic_files_metadata.csv.gz}" | |
| hostname="${3:-"$(hostname)"}" | |
| echo "find \"${fullpath}\" -type f -exec stat --format=\"%i,%Y,%s,%m,%n\" \"{}\" \\; > \"${dest}\"" | |
| echo "Progress in lines generated:" | |
| (echo "inode,modification_ts,size,hostname,mount,path"; | |
| find "${fullpath}" -type f -exec stat --format="%i,%Y,%s,${hostname},%m,%n" "{}" \; |
| #!/usr/bin/env python3 | |
| import ftfy, sys | |
| with open(sys.argv[1], mode='rt', encoding='utf8', errors='replace') as f: | |
| for line in f: | |
| sys.stdout.buffer.write(ftfy.fix_text(line).encode('utf8', 'replace')) | |
| #print(ftfy.fix_text(line).rstrip().decode(encoding="utf-8", errors="replace")) |
| alias ls='ls --color=auto' | |
| #export PS1='[\u@\h \W]\$ ' | |
| #export PS1='\W\$ ' | |
| #export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$' | |
| #export PS1='\[\033[01;34m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$' | |
| #export PS1='\[\033[01;34m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[01;37m\]\$\[\033[00m\]' | |
| PROMPT_RED="\[$(tput setaf 1)\]" | |
| PROMPT_GREEN="\[$(tput setaf 2)\]" | |
| PROMPT_ORANGE="\[$(tput setaf 3)\]" | |
| PROMPT_NAVY="\[$(tput setaf 4)\]" |
| #!/bin/bash | |
| tmpdir="$(mktemp -d)" | |
| function cleanup { | |
| echo '@ cleanup {' | |
| set -x | |
| rm -r "$tmpdir" | |
| set +x | |
| echo '@ } end of cleanup' | |
| } |
I hereby claim:
To claim this, I am signing this object:
[root@btrfs-testdrive] # btrfs qgroup create 1/100 /mnt/btrfs
[root@btrfs-testdrive] # btrfs qgroup assign 0/276 1/100 /mnt/btrfs
[root@btrfs-testdrive] # btrfs qgroup show /mnt/btrfs
qgroupid rfer excl
-------- ---- ----
0/5 16384 16384
0/256 2864136192 2864136192
0/258 833703936 833703936
0/259 52510720 52510720 | #!/bin/bash | |
| # 2017-12-14 Playing with BTRFS quota limits - Grzegorz Wierzowiecki | |
| # gist: | |
| # Below script is prepared for easy experimentation, and should run copy-and-paste | |
| # (you need permissions to create lvm groups, etc. therefore root) | |
| # It | |
| # * setup 128MiB btrfstest in selected volume group | |
| # * setup quotas (32MiB and 64MiB) and test them | |
| # * cleanup | |
| # Helpful references: |
| # 2017-12-15 xattr command line Semantic Desktop Style File Tagging | |
| # this gist: https://gist.github.com/gwpl/a00e18bc150f1e3518335d13c5e46ad7 | |
| # Perform on xattr filesystem: | |
| setfattr -n user.xdg.tags -v "foo,bar" file.png | |
| setfattr -n user.xdg.comment -v "example comment" file.png | |
| setfattr -n user.baloo.rating -v "10" file.png | |
| getfattr -d file.png | |
| # Screenshot how it looks like in Dolphin GUI : https://imgur.com/oguuJNm |