Skip to content

Instantly share code, notes, and snippets.

View Hazmi35's full-sized avatar

hzmi Hazmi35

View GitHub Profile
---
- name: Use all IPv6 Addresses in one IPv6 Block (/64, /56)
become: true
gather_facts: true
tasks:
- name: Get default IPv6 interface
ansible.builtin.set_fact:
interface: "{{ ansible_default_ipv6.interface }}"
- name: Get IPv6 prefix
ansible.builtin.set_fact:
@Hazmi35
Hazmi35 / dashboards.json
Last active March 9, 2024 12:49
Grafana Dashboards - Cloudflare Tunnel - Originally by tylerobrien
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
@Hazmi35
Hazmi35 / 99-udp-receive-buffer-size.conf
Last active June 11, 2024 16:25
Optimal UDP Receive Buffer size for quic-go
# UDP Receive Buffer Size required for quic-go (https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes)
#
net.core.rmem_max=7500000
net.core.wmem_max=7500000
@Hazmi35
Hazmi35 / config.json
Last active August 18, 2023 14:37
Docker + GitHub CLI install & setup
{
"credHelpers": {
"docker.pkg.github.com": "gh",
"ghcr.io": "gh"
}
}
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hello, as I promised, I will create a new OpenPGP key and make it my main key at 2nd of June this year.
This key has a expiration date, which will also be applied to my old key. (3 years valid, instead of 1 on the new key) The new one uses ed25519 instead of RSA. The old key will still be valid.
The new key has 3 subkeys, which 2 of them is automatically generated by GnuPG for Signing and Encryption, and the 1 extra subkey, I will use them for Signing in Git Commits, I believe there will be more subkeys in the future, but that's it for now.
This is an authenticated message, so I will sign this with my old key to proof the fact that this new key ownership is 100% the same as the old one.
@Hazmi35
Hazmi35 / gh-release-download.sh
Last active June 4, 2022 18:44
Download GitHub Release Assets from the CLI with this script
#!/bin/sh
# GitHub Release Assets downloader
# Source: https://gist.github.com/Hazmi35/58bdaa315c2521589c148bc393d59064
if [ $# -lt 2 ] ;then
echo "Usage: <org/repo> <version or 'latest'> [filename]"
echo "To use Authenticated request, set the variable GITHUB_TOKEN first"
echo "For example: GITHUB_TOKEN=ghp_xxxxx ./gh-release-download user/privaterepo latest"
exit 1

 
    
    
  
  
  
   
@Hazmi35
Hazmi35 / OpenSSH-ASK_PASS.sh
Created March 12, 2022 02:51
OpenSSH Bug for SSH_ASKPASS workaround
# OpenSSH Bug for SSH_ASKPASS workaround
# REF: https://unix.stackexchange.com/questions/83986/tell-ssh-to-use-a-graphical-prompt-for-key-passphrase/635613#635613
if [ $XDG_SESSION_TYPE != "tty" ]; then
export SSH_ASKPASS_REQUIRE=prefer
fi