Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
excuse me, is this facebook

Piotr Dobrowolski Informatic

🤔
excuse me, is this facebook
View GitHub Profile
View README.md

Advanced Recursive Diffing™

Ever needed to diff two trees of files, while doing some preprocessing on modified files? Well - we've got a solution for you. Or rather... our long friend git has.

Turns out it's perfectly legal to just use git diff --no-index on directories outside of (any) git repository. With that, we can (ab-)use built in git diff per-path/extension preprocessing feature.

@Informatic
Informatic / 50-customca
Last active Feb 20, 2022
Let's Encrypt fix for webOS. Tested on 3.8 only, put this into /var/lib/webosbrew/init.d and you should be probably done.
View 50-customca
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/var/lib/webosbrew/customca
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)
View gist:c269da5dc2454415cc96f0b0c9ae8bc9
_ca_config = {
"signing": {
"default": {
"expiry": "87600h"
},
"profiles": {
"server": {
"expiry": "87600h",
"usages": [
"signing",
View gist:a3f2dbaca2e91c98e9585ed759221570
{% for serviceName, service in data.services.items() %}
<div class="service">
<code>{{ serviceName }}</code> → <code>{{ service.executable }}</code>
{{ service.categories.items() }}
</div>
{% endfor %}
@Informatic
Informatic / cursors.sh
Created Apr 16, 2021
simple tool to apply overlayfs over specific directories
View cursors.sh
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/home/root/overlays
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)
@Informatic
Informatic / README.md
Last active May 20, 2022
openlgtv webOS hacking notes
View README.md

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

View gist:dc7e744b5f8d87922ef28d4840175134
function (context, request, callback) { // { context, request }, callback) {
if (context.endsWith('/node_modules/extract-zip') && request === 'fs') {
// Following snippet is executed during require/runtime
return callback(null, `(${() => {
try {
return require("original-fs");
} catch (err) {
return require("fs");
}
}})()`);
View gist:1a564b1f71b64c5330d798e5cd900a08
REDMINE_MAILING_PASSWORD: cfg.mailing.password,
X_EXTRA_CONFIGURATION: std.strReplace(std.manifestYamlDoc({
production: {
email_delivery: {
delivery_method: ":smtp",
smtp_settings: cfg.mailing {
password: "$(REDMINE_MAILING_PASSWORD)",
},
}
},
View gist:e7fb6235e022659ab10e0bdc733305e0
X_EXTRA_CONFIGURATION: std.strReplace(std.manifestYamlDoc({
production: {
delivery_method: ":smtp",
smtp_settings: cfg.mailing {
password: "$(REDMINE_MAILING_PASSWORD)",
},
},
}), '"', ''),