Skip to content

Instantly share code, notes, and snippets.

View miclgael's full-sized avatar
🐱
Looking at pictures of my cats

Michael Gale (he/him) miclgael

🐱
Looking at pictures of my cats
View GitHub Profile
@jotazzu
jotazzu / edit-screen.php
Last active December 19, 2019 23:59
Replaces deprecated calls to create_function() in WordPress plugin Tabify Edit Screen with anonymous function definitions. See https://wordpress.org/support/topic/another-patch-create_function-is-deprecated-since-php-7-2/
<?php
/**
* //JT 13.12.19: create_function() is deprecated.
*/
include 'tabs.php';
class Tabify_Edit_Screen_Edit_Screen {
@tigt
tigt / git-branch-to-favicon.js
Created March 18, 2020 21:10
Creates an SVG string that can be used as a favicon across different Git branches. Actually getting this into the browser is sadly project-specific.
const { execSync } = require('child_process')
const { createHash } = require('crypto')
const invertColor = require('invert-color')
const branchName = execSync('git rev-parse --abbrev-ref HEAD')
const hash = createHash('sha256')
hash.update(branchName)
const color = '#' + hash.digest().toString('hex').substring(0, 6)
const invertedColor = invertColor(color, true)
@ayoayco
ayoayco / gh-alerts.md
Created December 14, 2023 12:16
GH Alerts in MD files

Note

Highlights information that users should take into account, even when skimming.

Tip

Optional information to help a user be more successful.

Important

Crucial information necessary for users to succeed.

[!WARNING]

@axelquack
axelquack / automountSmbUnderBazzite.md
Last active November 22, 2025 22:50
Automount SMB under Bazzite by using systemd

Automount SMB under Bazzite

Make sure that you replace whatever is in "<>" with your own data.

Setup authentication configuration file

Generate a file that defines the login data to mount the volume. The file will be called credentials located at /var/home/<username>/.smb/credentials. Make sure you first generate the folder mkdir /var/home/<username>/.smb.

username=<username>