Skip to content

Instantly share code, notes, and snippets.

# 字体设置
font-family = BlexMono Nerd Font Mono
font-size = 16
# 主题和样式
theme = GruvboxDarkHard
cursor-style = block
adjust-cell-height = 35%
@chinaphp
chinaphp / llama2-mac-gpu.sh
Created July 20, 2023 14:28 — forked from adrienbrault/llama2-mac-gpu.sh
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
wget "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/resolve/main/${MODEL}"
@chinaphp
chinaphp / cert.sh
Created March 26, 2023 13:58 — forked from BretFisher/cert.sh
docker compose with traefik and certs
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
DOMAIN_NAME=$1
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
@chinaphp
chinaphp / .env.template
Created February 19, 2023 05:27 — forked from typebrook/.env.template
Docker Compose for nginx and gitea
GITEA_DATA_DIR=/tmp/gitea
@chinaphp
chinaphp / rke2-commands.md
Created June 21, 2022 08:55 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@chinaphp
chinaphp / rke2-commands.md
Created May 2, 2022 09:37 — forked from kingsd041/rke2-commands.md
RKE2 / rancherd commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
name: Add to Journal
on:
workflow_dispatch:
inputs:
text:
description: Add a single item to Logseq journal
type: string
required: true
@chinaphp
chinaphp / delete_all_imessage_conversations.applescript
Created December 11, 2021 08:53 — forked from lexrus/delete_all_imessage_conversations.applescript
Delete all iMessage conversations. Compatible with macOS Monterey. Please check Reduce motion before launch this apple script.
# System Preferences -> Accessibility -> Display -> Reduce motion
tell application "Messages" to activate
tell application "Messages"
set chatCount to (count of chats)
end tell
tell application "System Events"
tell process "Messages"
@chinaphp
chinaphp / macos_high_sierra_apache_php_brew_2018.md
Created October 20, 2021 14:55 — forked from karlhillx/macos_high_sierra_apache_php_brew_2018.md
macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

Homebrew Installation

First let's install Homebrew.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

@chinaphp
chinaphp / rke2_kubevip.md
Created September 25, 2021 16:21 — forked from bgulla/rke2_kubevip.md
RKE2 api-server HA with Kube-VIP

On-Prem RKE2 api-server HA with Kube-VIP

               ,        ,  _______________________________
   ,-----------|'------'|  |                             |
  /.           '-'    |-'  |_____________________________|
 |/|             |    |    
   |   .________.'----'    _______________________________
   |  ||        |  ||      |                             |
   \__|'        \__|'      |_____________________________|