Skip to content

Instantly share code, notes, and snippets.

@toimc
toimc / README.md
Created September 12, 2024 03:59
[ubuntu]配置postfix+mailx的过程

Ubuntu 上发送 SMTP 邮件,使用 mailx 和 Postfix 结合是一个常见的方式。你提到已经安装了 mailx,但在 /var/log/mail.log 中没有看到相关日志。这个问题可能与几方面的配置有关。以下是如何正确配置并通过 mailx 使用 SMTP 发送邮件的步骤。

  1. 安装 mailx 和 Postfix 确保你已经安装了 mailx 和 Postfix。
sudo apt update
sudo apt install mailx postfix
# Shadowrocket Ruleset Configuration
DOMAIN-KEYWORD,openai
DOMAIN-KEYWORD, openaicom-api
DOMAIN, gemini.google.com
DOMAIN, browser-intake-datadoghq.com
DOMAIN, cdn.openai.com
DOMAIN, chat.openai.com
DOMAIN, chat.openai.com.cdn.cloudflare.net
@toimc
toimc / cuda_11.8_installation_on_Ubuntu_22.04
Created December 16, 2023 03:17 — forked from MihailCosmin/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@toimc
toimc / cloudSettings
Last active June 12, 2025 07:22
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-11-28T12:35:34.129Z","extensionVersion":"v3.4.3"}
@toimc
toimc / cloudSettings
Created July 29, 2022 23:39
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-07-29T23:39:40.982Z","extensionVersion":"v3.4.3"}
swagger: '2.0'
info:
title: Harbor API
description: These APIs provide services for manipulating Harbor project.
version: '2.0'
host: test.bontor.cn:30002
schemes:
- http
- https
basePath: /api/v2.0
@toimc
toimc / gist:7a1bca5b67666a50a14e53db06076c9f
Created August 27, 2021 01:22
Dockerfile for alpine libressl(China Resource)
FROM alpine:3
LABEL maintainer=brian@toimc.com
# 创建一个工作目录
WORKDIR /
# 国内加速源
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && apk update
@toimc
toimc / docker-compose.mysql.yml
Created June 23, 2020 02:07
docker compose for mysql
version: "3.6"
services:
mysql1:
image: mysql
container_name: "mysql1"
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=123456
@toimc
toimc / nginx.conf
Last active May 16, 2020 01:09 — forked from fotock/nginx.conf
Nginx SSL 安全配置最佳实践.
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
@toimc
toimc / cloudSettings
Last active July 31, 2024 07:10
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-09-09T07:47:48.905Z","extensionVersion":"v3.4.2"}