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:
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 |
#!/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:" $@ |
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> | |
<img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /> | |
</a><br /> | |
<span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Dataset" | |
property="dct:title" rel="dct:type">${title}</span> | |
by | |
<a xmlns:cc="http://creativecommons.org/ns#" href="${authors_url}" property="cc:attributionName" | |
rel="cc:attributionURL">${aurhor_name}</a> | |
is licensed under a | |
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> |
Converted w3schools example from relative "q" to absolute "Q" to make it more readiable according to controlpoints A,B,C. | |
<br/> | |
<svg height="400" width="450"> | |
<path id="lineAB" d="M 100 350 l 150 -300" stroke="red" stroke-width="3" fill="none" /> | |
<path id="lineBC" d="M 250 50 l 150 300" stroke="red" stroke-width="3" fill="none" /> | |
<path d="M 175 200 l 150 0" stroke="green" stroke-width="3" fill="none" /> | |
<path d="M 100 350 Q 250 50 400 350" stroke="blue" stroke-width="5" fill="none" /> | |
<!-- Mark relevant points --> | |
<g stroke="black" stroke-width="3" fill="black"> |
# source: https://stackoverflow.com/a/20910449/544721 | |
norm="$(printf '\033[0m')" #returns to "normal" | |
bold="$(printf '\033[0;1m')" #set bold | |
red="$(printf '\033[0;31m')" #set red | |
boldred="$(printf '\033[0;1;31m')" #set bold, and set red. | |
somecommand | sed -e "s/someregexp/${boldred}&${norm}/g" # will color any occurence of someregexp in Bold red | |
printf "%s" "$red" ; locate something ; printf "%s" "$norm" # will color output of locate something in red |
#!/bin/bash | |
# Usage: | |
# odtgrep.sh IamSearchingThis *.odt | |
# find -name '*.odt' -exec odtgrep.sh IamSearchingThis "{}" \; | |
# or | |
# odtgrep.sh -C 5 IamSearchingThis *.odt | |
# find -name '*.odt' -exec odtgrep.sh -C 5 IamSearchingThis "{}" \; | |
#cli #linux #snippet | |
# find lines only in file1 | |
comm -23 file1 file2 | |
# find lines only in file2 | |
comm -13 file1 file2 | |
# find lines common to both files | |
comm -12 file1 file2 |