Skip to content

Instantly share code, notes, and snippets.

Avatar

Grzegorz Wierzowiecki gwpl

  • Europe - usually: Zürich, Warsaw or Berlin
View GitHub Profile
View logseq-enhanced-theme.css
.block-children {
border-left-width: var(--ls-block-bullet-threading-width);
}
.block-content-wrapper {
position: relative;
}
.bullet-container {
height: 14px !important;
@gwpl
gwpl / custom.css
Created Jan 2, 2023 — forked from madawei2699/custom.css
logseq/custom.css
View custom.css
/*
/* Theme custom css start
/* https://raw.githack.com/dracula/logseq/master/custom.css
*/
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
:root {
--background: #282a36;
--light-background: #343746;
@gwpl
gwpl / run_rustscript_uder_gdb.sh
Last active Dec 8, 2022
rust-gdb - easy way to run rust-scripts with gdb
View run_rustscript_uder_gdb.sh
# https://github.com/fornwall/rust-script/issues/54
# regarding rust-script : https://rust-script.org/ => https://github.com/fornwall/rust-script
rust-gdb $(rust-script --debug -o ./my_rust_script.rs --version 2>&1 | rg -w '.+Running `(.+) --version`' -r '$1')
@gwpl
gwpl / README.md
Last active Nov 21, 2022
Isolating applications on desktop - Docker, Vagrant as a Desktop (or QubesOS and other options) for for better desktop security [Notes/Draft]
View README.md

The goal of these notes is to plant idea that there are few alternatives to "just running apps directly on your computer".

If you don't pick any of mentioned options, please consider as bare minimum, making separate user for some apps, or some contexts (e.g. "me-work-emails", "me-work-coding", "me-work-graphics-design", "me-work-instant-messanger",...). However above solutions one may find more seamless.

@gwpl
gwpl / by_G_foaf_example.ttl
Created Oct 30, 2022
by G foaf example, showing simple queries progressing step by step with outputs; run using Apache Jena ; based on https://jena.apache.org/tutorials/sparql.html and https://gitlab.com/gwpl/rdf_20q4
View by_G_foaf_example.ttl
@prefix dc: <http://purl.org/dc/elements/1.1/>.
@prefix ex: <http://example.org/stuff/1.0/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#>.
@prefix wot: <http://xmlns.com/wot/0.1/>.
@prefix xml: <http://www.w3.org/XML/1998/namespace>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@gwpl
gwpl / read_clipboard_espeak.sh
Last active Sep 15, 2022
Reading aloud content of clipboard. espeak fro clipboard under Linux / X (should work under other unixes , if required change `xclip` to something else )
View read_clipboard_espeak.sh
#!/bin/bash
# e.g. -s 300 to read faster :
# read_clipboard_espeak.sh -s 300
# espeak has other parameters too, check man espeak-ng
#TTSCMD=espeak
TTSCMD=espeak-ng
if [ -z "$1" ]; then
@gwpl
gwpl / docker-prune-a-to-remove-unused-and-dangling-images.sh
Created Jul 29, 2022
docker cleanup - freeing disk space or building fresh regardless of cache
View docker-prune-a-to-remove-unused-and-dangling-images.sh
#!/bin/bash
set -x
docker image prune -a
docker system prune -a # from https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/
#docker volumes prune # from https://www.freecodecamp.org/news/where-are-docker-images-stored-docker-container-paths-explained/
# altnernatively:
# How to force Docker for a clean build of an image without deleting cache
# and btw https://stackoverflow.com/a/60140109/544721 -> docker builder prune -af
#
@gwpl
gwpl / Dockerfile
Created Apr 22, 2022
Archlinux RDF SPARQL Jena Fuseki ( fast start http://linkeddatatools.com/semantic-web-basics )
View Dockerfile
FROM archlinux:latest
RUN echo 2022-02-02 # update this line to enforce refresh instead of --no-cache
RUN pacman -Syyu --noconfirm && \
pacman -S --noconfirm \
git base-devel \
vim screen tmux \
wget aria2 mc htop vim \
mc cmatrix htop vim \
git base-devel shellcheck
# bubblewrap-suid xz \
@gwpl
gwpl / code2pdf_with_vim.sh
Created Dec 6, 2021
print code with syntax highlighting using Vim's hardcopy
View code2pdf_with_vim.sh
#!/bin/bash
tmpd="$(mktemp -d)"
mergedpdf=merged_source_files.pdf
if [ "$1" == "-o" ]; then
mergedpdf="$2"
shift 2
fi
@gwpl
gwpl / pychrome_fetch_images.py
Created Jul 26, 2021
pychrome scraping fetch images Chrome DevTools Protocol Viewer
View pychrome_fetch_images.py
import base64
import pychrome
# NOT WORKING, copied FTR as copy for "later" from:
# from https://stackoverflow.com/a/61311648/544721
def save_image(file_content, file_name):
try:
file_content=base64.b64decode(file_content)
with open("C:\\Crawler\\temp\\" + file_name,"wb") as f: