Skip to content

Instantly share code, notes, and snippets.

@zoliky
zoliky / installing-emacs-from-source-on-debian.txt
Last active April 29, 2024 09:42
Installing Emacs 29.1 from source on Debian 12
Installation
------------
1. Install the build dependencies for Emacs:
$ sudo apt build-dep emacs
$ sudo apt install libtree-sitter-dev
2. Download and unpack the Emacs archive:
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active April 28, 2024 20:47
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
@MarkZhangTW
MarkZhangTW / Update-CF-DNS.ps1
Last active February 1, 2021 13:45
Update CloudFlare DNS records with PowerShell
$CF = @{}
$CF.Endpoint = "https://api.cloudflare.com/client/v4/"
# Replace <API Token> to your CloudFlare API Token
# You can create your API Token from https://dash.cloudflare.com/profile/api-tokens
$CF.APIToken = "Bearer <API Token>"
# Replace <zone id> and <record id>
$CF.UpdateDNSRecord = @{Method = "PUT"; object = "zones/<zone id>/dns_records/<record id>"}
$PublicIP = (Get-NetIPAddress -InterfaceAlias "<Interface Alias>" -AddressFamily IPv4).IPAddress
@statico
statico / 00_statico.link_README.md
Last active September 24, 2023 12:15
Ian's Personal Short Link Bookmark Service
@thefranke
thefranke / RSS.md
Last active April 16, 2024 09:03
A list of RSS endpoints, readers and resources

The RSS Endpoint List

Please refer to this blogpost to get an overview.

Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.

Social Media

Twitter

@kekru
kekru / 01nginx-tls-sni.md
Last active April 1, 2024 02:29
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@Firsh
Firsh / lwp-cloudflare-dyndns.sh
Last active January 6, 2024 15:38
Cloudflare as Dynamic DNS
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_email="email@example.com"
auth_key="global_api_key_goes_here"
zone_name="example.com"
@settachok
settachok / Config.json
Last active February 1, 2021 13:45
Cloudflare API Dynamic DNS Update in PowerShell
{
"auth_email": "user@example.com",
"auth_key": "cloudflare auth_key",
"zone_name": "example.com",
"records": [
"example.com",
"www.example.com"
]
}
@rometsch
rometsch / i3autolock.md
Last active April 14, 2024 16:52
Configure lockscreen for i3 window manager.

The i3-wm does not come with a keybinding to lock the screen or a preconfigured auto lockscreen. This gist describes how to setup both using i3lock and xautolock. i3lock is a minimalistic lockscreen and xautolock monitors mouse and keyboard activities to automatically lock the screen after a certain time of beiing inactive.

First get the tools if neccessary. E.g. sudo apt install i3lock xautolock.

To setup the keybinding Ctrl+Alt+l (last one is a lowercase L) to lock the screen append the following lines to the i3 configuration file located at ~/.config/i3/config.

# keybinding to lock screen