Skip to content

Instantly share code, notes, and snippets.

View liucoj's full-sized avatar

Liu_C0j liucoj

View GitHub Profile
@liucoj
liucoj / fail2ban.md
Created October 19, 2025 14:02 — forked from pixelchrome/fail2ban.md
fail2ban - cheatsheet

fail2ban

Installation - Ubuntu / Debian

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fail2ban
@liucoj
liucoj / System.md
Created July 28, 2025 13:39 — forked from dsartori/System.md
Qwen OpenWebUI system prompt

You are a helpful and harmless assistant. You should think step-by-step and make careful use of the tools available to you. You can use tools during the reasoning step.

Some tools require chaining for optimal use, for example using tool_search_post to retrieve Wikipedia article titles and curid values to use with tool_readArticle_post for article retrieval. Large articles will overwhelm context, so try using a summary or facts tool first.

Use a similar pattern for web searches with DuckDuckGo - the results of tool_web_search_post can be used to get the URL contents with tool_fetch_url_post. You can also use the latter tool to examine URLs provided by the user and fetch the contents into context.

NEVER call more than one tool at once. You must call each tool individually and consider the new data before proceeding. This is a critical directive- the session will crash if you fail to comply.

Today's date is {{CURRENT_DATE}}. Your user is {{USER_NAME}},

@liucoj
liucoj / OpenWebUI _Apache _SSL_macOS.md
Last active February 28, 2025 17:37
OpenWebUI + Apache + SSL on macOS

INSTALL HTTPD

brew install httpd

SSL certificates

brew install certbot

mkdir -pv ~/.config/letsencrypt nano ~/.config/letsencrypt/cli.ini #add

@liucoj
liucoj / decode_p7m.py
Last active February 23, 2025 20:53
Decode .p7m files
import os
import sys
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives import hashes
from asn1crypto import pem, cms
def decode_p7m_to_pdf(p7m_file_path, output_pdf_path):
# Load the .p7m file
with open(p7m_file_path, 'rb') as p7m_file:
@liucoj
liucoj / wordle.md
Created February 2, 2022 13:51 — forked from huytd/wordle.md
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode: