Skip to content

Instantly share code, notes, and snippets.

View coder4web's full-sized avatar

Aleksey Deryagin coder4web

View GitHub Profile
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active February 25, 2026 03:40
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@rbiswasfc
rbiswasfc / docs.md
Created January 20, 2025 02:25
OpenRouter

Quick Start

OpenRouter provides an OpenAI-compatible completion API to 0 models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.

In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.

Using the OpenAI SDK

from openai import OpenAI
@olafgeibig
olafgeibig / README.md
Last active September 19, 2025 04:09
Z.ai subscription with opencode

Z.ai subscription with opencode

Now Z.ai has an official solution to use the package. See below.

Create a custom provider

First we need to create a custom provider for the Z.ai anthropic API. Follow the instructions for adding a custom provider to opencode.

  • Name it zai-anthropic
  • Enter your API-key

Configure the custom-provider

Edit opencode.json and add this: