Skip to content

Instantly share code, notes, and snippets.

View TheGreyDiamond's full-sized avatar

TheGreyDiamond

View GitHub Profile
@Jai-JAP
Jai-JAP / 1000-signGrub.hook
Last active April 10, 2025 12:00
Manjaro SecureBoot Setup Guide
[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Path
Target = /boot/efi/EFI/Manjaro/grubx64.efi
[Action]
Description = Signing GRUB with Machine Owner Key for Secure Boot
When = PostTransaction
@sindresorhus
sindresorhus / esm-package.md
Last active April 21, 2025 02:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@afeish
afeish / md-renderer.conf
Created September 12, 2018 10:49 — forked from max-lt/md-renderer.conf
Nginx config to render markdown files (client side)
location /__special {
internal;
allow all;
root /usr/share/nginx/html/__special;
}
location = /__md_file {
internal;
allow all;
@cristianrasch
cristianrasch / rsyncrypto.sh
Last active February 9, 2023 19:37
rsyncrypto tutorial
# Generate your backup private key and certificate
openssl req -nodes -newkey rsa:1536 -x509 -keyout backup.key -out backup.crt
# Encrypt your data to a temporary folder
rsyncrypto --verbose --ne-nesting=2 --trim=2 --name-encrypt=/tmp/rsyncrypto-map --delete-keys --changed --recurse /home/cristian/Dropbox/ /tmp/Dropbox/ /tmp/rsyncrypto-keys ~/Dropbox/backups/laptop/crypto/rsyncrypto/backup.crt
# Send it over the network
rsync --verbose --archive --compress --delete /tmp/Dropbox/ pi:~/backups/laptop
# Decryption time!
@lgaetz
lgaetz / remotehintpoll.php
Last active November 9, 2024 20:38
Simple PHP script that checks the extension status at a remote PBX and updates a custom hint on the local pbx for proper BLF operation.
<?php
/**** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
* remotehintpoll.php
*
* Created by Lorne Gaetz [email protected]
*
* Latest version: https://gist.github.com/lgaetz/8545099
*
* Licensed under GNU GPL version 2 or any later verison.