Skip to content

Instantly share code, notes, and snippets.

@alexgurrola
alexgurrola / install-nginx-1.25.2.sh
Last active February 7, 2025 15:47
ubuntu: compile and install nginx 1.25.2
#!/bin/bash
# NOTE: This requires openssl to be installed via https://gist.github.com/alexgurrola/db0736378d565bab3b2e35a66e7d9e50 to provide the necessary sources to install nginx with the latest openssl
# usage: wget https://gist.githubusercontent.com/alexgurrola/4f7fc9a317a68a3895858e24c83ea437/raw/install-nginx-1.25.2.sh && chmod +x install-nginx-1.25.2.sh && ./install-nginx-1.25.2.sh
# display current version
nginx -V
# install prerequisites
sudo apt update
@elico
elico / .env
Created June 18, 2023 21:01
Helper script for RouterOS GeoIP managment
USERNAME="admin"
PASSWORD="testAdmin"
#!/bin/sh
export DEBIAN_FRONTEND=noninteractive
apt update || exit 1
apt -y install libnss-ldapd libpam-ldapd ldap-utils || exit 1
echo '
uid nslcd
gid nslcd
uri ldap://[QNAP(LDAPサーバ)のIPアドレス]/
base dc=some,dc=domain,dc=jp←QNAPの設定からコピー
@PyroSA
PyroSA / fan.c
Last active June 21, 2024 22:45
OrangePi5 PWM Fan Control
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <wiringPi.h>
#include <softPwm.h>
#define PIN 10
#define RANGE 100
@jfeilbach
jfeilbach / ubuntu_22.04_motd.md
Last active June 24, 2026 08:57
Make Ubuntu 22.04 less annoying. Remove ESM Ubuntu Advantage

Ubuntu 22.04 Annoyances

Here are a few collected ways I like to customize Ubuntu 22.04 servers. I used to love Ubuntu, but I hate auto updates and snaps. They also put ads and other usless ads diguised as "news" in MOTD. ESM FUD is spread throughout the OS including simple apt functions. You do not need ESM and thus Ubuntu 22.04 has become super annoying. unattended-upgrade is an automatic installation of security (and other) upgrades without user intervention. Consider the ramifications of disabling this service.

Disable unattended upgrades

The Unattended Upgrades feature is enabled by default and it runs at system boot without the user's permission. The configuration is stored in /etc/apt/apt.conf.d/20auto-upgrades

Disable: sudo dpkg-reconfigure unattended-upgrades then a TUI will come up, select "No"

This will not permantently disable the function. After an update it will be enabled. In the file /etc/apt/apt.conf.d/20auto-upgrades change these values from 1 to 0. Even doing this it will

@aeongdesu
aeongdesu / awesome-osu.md
Last active April 14, 2026 14:27
awesome osu projects
/**
* Our default hide until search behaviour still performs an initial "cache" of markers, but the markers are not shown
*
* This really shows weakness at large data set handling (thousands) where the search will fail if the initial cache is not created
*
* This series of overrides will overcome this by only doing the first fetch when the search is performed
*
* It then re-runs the search after the fact, but only if it has not been done already
*
* This can be added in Maps > Settings > Custom Scripts > Custom JavaScript
@daemonhorn
daemonhorn / Windows EFS PIV Yubikey.md
Last active June 17, 2026 20:32
Using PIV Smartcard and Yubikey with Windows Encrypting Filesystem

Yubikey 5 Win 10 20H2 x64 Pro PIV EFS Setup

Overview

PIV on Yubikey can be utilized for SSH authentication, Windows OS login authentication, NTFS Encrypted File System (EFS) support, Bitlocker and other use cases. The examples below are using self-signed certificates and keys generated on the Yubikey secure element, but can be customized for an enterprise environment with a root CA/intermediate CA and trusted certificate chains as needed. Note: While using a CA allows for easier scalable management, this also increases the required ring of trust, and thus can potentially decrease security if not managed properly.

Requires: Windows 10 Pro (20H2 used in the document, but will work on earlier versions of Pro), Yubikey 4 or 5 security token.

PIV References: NIST: https://csrc.nist.gov/publications/detail/sp/800-73/4/final Yubico PIV Setup: https://developers.yubico.com/PIV/Guides/Device_setup.html

@patrickmaciel
patrickmaciel / linux-wsl-instructions.md
Last active August 21, 2025 21:02
Instructions to fully configure your Ubuntu/Linux machine with all needed tools to code (mainly in PHP/Laravel)

Instructions

Linux essentials

sudo apt update && sudo apt-upgrade -y
sudo apt install wget curl vim -y