Skip to content

Instantly share code, notes, and snippets.

@aldemira
aldemira / Compiling nginx-otel on debian bookworm
Last active January 17, 2025 09:16
Compiling nginx-otel on debian bookworm
apt-get install nginx-dev
cd /usr/share/nginx/src
./configure --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=stderr --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-threads --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module
cd /opt
apt-get install -y cmake build-essential libssl-dev zlib1g-dev libpcre3-dev pkg-config libc-ares-dev libre2-dev git
git clone https://github.com/nginxinc/nginx-otel.git
cd nginx-otel
mkdir build && cd build
cmake -DNGX_OTEL_NGINX_BUILD_DIR=/usr/share/nginx/src/
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 17, 2025 09:14
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@andreas-mausch
andreas-mausch / Samsung Tizen Developer Certificate (Author and Distributor)
Created October 5, 2021 08:38
Generate certificates on CLI without installing the full Tizen Studio
# Get access token here:
# https://account.samsung.com/accounts/TDC/signInGate?clientId=4fb7fnf3np&tokenType=TOKEN
# Find the CA certificates here:
# https://gitlab.com/andreas-mausch/moonwatch/-/tree/master/certificates
# Author certificate
openssl genrsa -out author.key.pem 2048
openssl rsa -in author.key.pem -outform PEM -pubout -out author.key.pem.pub
openssl req -new -key author.key.pem -out author.csr -subj "/[email protected]"
@lszinv
lszinv / CMakeLists.txt
Created September 15, 2020 02:17
Sample CMake
cmake_minimum_required(VERSION 3.17)
project(overiew_project)
set(CMAKE_CXX_STANDARD 17)
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/lib/cmake/")
##################
## Dependencies
##################
@repodevs
repodevs / macOS.sh
Created December 12, 2018 14:56
gpg: signing failed: Inappropriate ioctl for device macOS
❱ git config user.signingKey 38AF394C
❱ git config commit.gpgSign true
echo "test" | gpg --clearsign
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
test
gpg: signing failed: Inappropriate ioctl for device
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device
#include <stdio.h>
#include <windows.h>
#pragma comment(lib, "winmm.lib")
void Nothing(WORD wKey)
{
}
void PrintKey(WORD wKey)
@HimDek
HimDek / Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md
Last active January 17, 2025 09:05
This Guide will show you how to install and run apk files or Android apps in any Edition of Windows 11 using Windows Subsystem for Android. WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator.

Install Android apps or apk files in Windows using Windows Subsystem for Android

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • Windows Subsystem for Android or WSA must be Installed.

Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.

How to Install Android Apps or apk files in Windows Subsystem for Android:

@ikm-san
ikm-san / HB46PP.md
Last active January 17, 2025 09:04
HB46PP Get Rule OpenWrt対応PJ

HB46PP Get Rule OpenWrt対応PJ

OpenWrtルーターでHB46PP日本国内向け標準プロビ方式で各種パラメーターを取得できるようにしたいです。 専用FQDN(4over6.info)に問い合わせを行い、DNSよりmap rule等のサーバー情報を取得し、その情報を用いて、IPv6接続に必要な各種データを専用のルールサーバーより取得します。 ここまで対応できれば、既存の各種IPv4 over IPv6スクリプトで応用展開可能になります。

対応VNE

  • BIGLOBE
  • ASAHIネット
    ※そのほかのVNEは現状対応しておらず非公開です。
@Theigrams
Theigrams / clash_api.py
Created November 18, 2023 16:04
Clash API controlled through Python
import json
import requests
class ClashAPI:
def __init__(self, base_url, secret):
self.base_url = base_url
self.secret = secret
self.headers = {