Skip to content

Instantly share code, notes, and snippets.

Grzegorz Wierzowiecki gwpl

Block or report user

Report or block gwpl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gwpl
gwpl / bash coloring handy functions
Created Nov 11, 2018
bash coloring handy functions
View bash coloring handy functions
# 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
@gwpl
gwpl / odtgrep.sh
Last active Nov 11, 2018
grepping odt files
View odtgrep.sh
#!/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 "{}" \;
@gwpl
gwpl / svg_path.html
Created May 31, 2018
w3schools example : svg_path with absolute coordinates Q instead of relative q for curve
View svg_path.html
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">
@gwpl
gwpl / example_use_way_of_playing_mp3s_over_https_on_Sonos_using_socos.sh
Last active Jan 25, 2019
Play FLAC m3u playlist from NAS on Sonos via http URIs
View example_use_way_of_playing_mp3s_over_https_on_Sonos_using_socos.sh
#!/bin/bash
#find speaker IP with `socos` :
# socos list
#(1) 192.168.1.101 Moon
#(2) 192.168.1.102 Mars
# (...)
#(6) 192.168.1.106 Playroom stereo
python3 soco_play_m3u_by_uri_http_flac_Sonos_NAS.py 192.168.1.106 meshuggah*.m3u 4dots*.m3u phobh*.m3u the_number_twelve_looks_like_you*.m3u the_dillinger_escape_plan*.m3u
@gwpl
gwpl / cc-by-sa-ver4.0.html
Created May 2, 2018
HTML snippet for Creative Commons Attribution-ShareAlike 4.0 International License.
View cc-by-sa-ver4.0.html
<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/">
@gwpl
gwpl / Errors Before Downgrading jemalloc.md
Last active May 25, 2019
2017-12-17 Daedalus on ArchLinux - building notes by Grzegorz Wierzowiecki
View Errors Before Downgrading jemalloc.md
@gwpl
gwpl / 2017-12-15-xattr-Semantic_Desktop_File_tagging.sh
Last active Dec 15, 2017
2017-12-15 xattr command line Semantic Desktop Style File Tagging
View 2017-12-15-xattr-Semantic_Desktop_File_tagging.sh
# 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
@gwpl
gwpl / 2017-12-14-btrfs-try-to-btrfs-quota-qgroup.sh
Last active Dec 15, 2017
2017-12-14 Playing with BTRFS quota limits - Grzegorz Wierzowiecki
View 2017-12-14-btrfs-try-to-btrfs-quota-qgroup.sh
#!/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:
@gwpl
gwpl / NEW QGROUP!.md
Created Dec 15, 2017 — forked from mazgi/NEW QGROUP!.md
Btrfs subvolume quota
View NEW QGROUP!.md
[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   
View keybase.md

Keybase proof

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:

You can’t perform that action at this time.