Skip to content

Instantly share code, notes, and snippets.

View NiklasGollenstede's full-sized avatar

Niklas Gollenstede NiklasGollenstede

  • Hamburg University of Technology
  • Hamburg, Germany
  • 21:19 (UTC +01:00)
View GitHub Profile
@NiklasGollenstede
NiklasGollenstede / Windows Wallpaper Orientation
Last active April 9, 2018 15:24
Change the orientation of the desktop wallpaper in Windows through the registry
set
HKey_Current_User\Control Panel\Desktop\WallpaperStyle
to
Center => 0
Fit => 6
Fill => 10
Stretch => 2
Tile => 0
then
log off/on or change wallpaper
@NiklasGollenstede
NiklasGollenstede / update-ff-extension.js
Last active October 16, 2019 16:34
Manually trigger the update of Firefox extensions
'use strict'; /* globals AddonManager, */
/**
* Triggers the update of an extension in Firefox (version 60).
* Paste the function in the Browser console (Ctrl+Shift+J),
* call it with an extension ID and watch the console output.
*
* I wrote this to test the automatic build and update of my
* extensions `-dev` channel, see:
* - https://gist.github.com/NiklasGollenstede/87664c7f2822b15f86362388270a16a8
@NiklasGollenstede
NiklasGollenstede / !web-ext-updater.md
Last active March 29, 2024 02:47
A simple node.js server creating WebExtension update manifests from GitHub releases on the fly

This tiny server facilitates automatic updates for WebExtensions released on GitHub.

Please read the README for more information.

@NiklasGollenstede
NiklasGollenstede / !web-ext-ci.md
Last active May 30, 2021 20:08
WebExtension `-dev` channel releases

Configuration to build, sign, and release Firefox extensions on pushes to GitHub.

Please read the README for more information.

@NiklasGollenstede
NiklasGollenstede / dns-tls-proxy.js
Created April 26, 2018 16:26
A non caching DNS forwarder that sends requests encrypted through TLS or HTTP/2
'use strict'; /* globals Buffer, */
/**
* This is a non-caching DNS resolver/proxy/forwarder (Trusted Recursive Resolver).
* It accepts DNS requests over UDN and TCP and forwards them via HTTPSv2 or TLS.
* Configuration is done via environment variables:
*/
/// Port and Host that both inbound UDP and TCP will accept DNS requests on.
const PORT = process.env.PORT || 53535;
const HOST = process.env.HOST || '127.0.0.1';
@NiklasGollenstede
NiklasGollenstede / letsencrypt-cert-expiry-list.js
Created May 11, 2018 19:47
Lists all Let's Encrypt certificates with their current expiry dates
#!/usr/bin/env node
/// needs root, works with node v7+
module.exports = (async () => { 'use strict';
const CERT_DIR = '/etc/letsencrypt/live';
const FS = require('fs'), ChildProcess = require('child_process');
let names; try { names = FS.readdirSync(CERT_DIR); }
catch (error) { throw new Error('Could not access cert folder, please retry with root peermission'); }
@NiklasGollenstede
NiklasGollenstede / cluster-pipe-wtfnode-test.js
Last active September 9, 2018 10:48
wtfnode #29: Show more information on cluster worker ipc "Pipe" (node v8.9.3 and v10.8.0)
'use strict';
const cluster = require('cluster');
if (cluster.isMaster) {
cluster.fork(); return;
}
const wtfnode = require('wtfnode');
wtfnode.dump();
@NiklasGollenstede
NiklasGollenstede / !dyn-dns-proxy.md
Last active December 15, 2020 16:42
DynDNS Update Proxy

This relay allows to reliably update multiple DynDNS targets at once.

Please read the README for more information.

@NiklasGollenstede
NiklasGollenstede / !keep-firefox-extension-tabs-open.md
Last active January 14, 2021 18:20
Firefox extension development: keep extension tabs open

This drop-in module does one simple thing: it allows you to keep the extension tabs of your WebExtension open when you reload it during development.

Pleas read the README for more information.

@NiklasGollenstede
NiklasGollenstede / !zfs-backup.md
Last active April 6, 2023 23:07
ZFS push replication to unprivileged user

This is a guide to set up ZFS push replication to an unprivileged user account.

Please read the content for more information.