Skip to content

Instantly share code, notes, and snippets.

View davidsneighbour's full-sized avatar
💭
🎧

Patrick Kollitsch davidsneighbour

💭
🎧
View GitHub Profile
@davidsneighbour
davidsneighbour / aliases.toml
Created February 26, 2024 12:22
Refactoring GoHugo aliases into proper methods
float = "cast.toFloat"
int = "cast.toInt"
string = "cast.toString"
after = "collections.After"
append = "collections.Append"
apply = "collections.Apply"
complement = "collections.Complement"
delimit = "collections.Delimit"
dictionary = "collections.Dictionary"
first = "collections.First"

Keybase proof

I hereby claim:

  • I am davidsneighbour on github.
  • I am davidsneighbour (https://keybase.io/davidsneighbour) on keybase.
  • I have a public key ASBtuonlUXfO53uYGBRrDdoD-i5D4CjciF22fyZJslXZngo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am davidsneighbour on github.
  • I am pkollitsch (https://keybase.io/pkollitsch) on keybase.
  • I have a public key ASAKBUx6t6v3pyUBOT6jBGkYuXAM41hgdIWSqrM7WsJQ8wo

To claim this, I am signing this object:

@davidsneighbour
davidsneighbour / functions.php
Last active October 11, 2021 03:58
Disable Updraft Plus nagging screens
<?php
// Hide license notifications
// dnb 2020-09-18
// hide updraft plus notices about expired licenses
function dnb_remote_updraft_license_notifications() {
echo '<style>
.updraftupdatesnotice-updatesexpired,
.updraftupdatesnotice-updatesexpiringsoon {
display: none !important;
@davidsneighbour
davidsneighbour / SECURITY.md
Created December 11, 2020 14:19
Security policy for all DNB related projects:

Security Policy

Reporting a Vulnerability

Please report (suspected) security vulnerabilities to security@davids-neighbour.com. You will receive a response from us within 48 hours. If we can confirm the issue, we will release a patch as soon as possible depending on complexity but historically within a few days.

@davidsneighbour
davidsneighbour / .textlintrc.js
Created October 18, 2020 12:42
My textlint setup
{
"rules": {
"no-todo": true,
"textlint-rule-no-start-duplicated-conjunction": true,
"max-comma": {
"max": 3
},
"no-exclamation-question-mark": true,
"no-dead-link": {
"checkRelative": true,
@davidsneighbour
davidsneighbour / enquire-ram-setup.sh
Last active May 21, 2016 10:04
Bash commands for system checks
# finds out current ram setup and limits (for upgrades)
sudo dmidecode -t memory
@davidsneighbour
davidsneighbour / fix-missing-cursor-on-synergy-clients.sh
Created October 24, 2015 10:37
Some stuff I need to do after an Ubuntu Upgrade
# on client computers for synergy networks the cursor is invisible due
# to the fact that there is no mouse or keyboard plugged in ;)
gsettings set org.gnome.settings-daemon.plugins.cursor active false
@davidsneighbour
davidsneighbour / dnb-transliterate-slug.php
Last active April 26, 2020 17:04
Umlauts for German WordPress slug - add these lines to your functions.php and forget it.
<?php
add_filter('sanitize_title', 'dnb_transliterate_slug', 5, 3);
function dnb_transliterate_slug($title, $raw_title = NULL, $context = 'query') {
// Hacky hook due to hacky core, see
// http://core.trac.wordpress.org/ticket/16905
if ($raw_title != NULL) {
$title = $raw_title; // undo remove_accents
}