全部 新建

user:thomas 由使用者建立的 Gists

title:mygist Gists 的標題

filename:myfile.txt Gists 的檔案名稱

extension:yml Gists 的副檔名

language:go Gists 的程式語言

topic:homelab gists with given topic

註冊

登錄


全部 新建 註冊 登錄
's Avatar

swee

加入 1742860940

倒序排序 創建
順序排序 創建
倒序排序 更新
順序排序 更新
所有 Gists 72
swee's Avatar

swee / Original fastfile code (without templates)

0 喜歡
0 分支
1 檔案
最後活躍 1750018242
Ripped out from my original PythonAnywhere Flask code
1 from flask import Flask, send_file, request, redirect, abort, render_template, Response
2 import pyotp
3 import uuid
4 fastfile = """<body class="container text-white bg-dark">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
7 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
8 <script src="https://kit.fontawesome.com/30bde606c1.js" crossorigin="anonymous"></script>
9 <style>
10 center {
swee's Avatar

swee / gist:0d3f1f59332a4ae790b9cde76ee8e7af

0 喜歡
0 分支
1 檔案
最後活躍 1750013169
1 $ mkdir fastfile
2 $ cd fastfile
3 $ nano docker-compose.yml
4 copy paste, ctrl-s, ctrl-x
5 $ nano .env
6 copy paste, edit, ctrl-s, ctrl-x
7 $ docker compose up -d
swee's Avatar

swee / fastfile nginx conf

0 喜歡
0 分支
1 檔案
最後活躍 1750010905
1 server {
2 listen 80 default_server;
3 listen [::]:80 default_server;
4 server_name _;
5 ## if you have SSL setup
6 # listen 443 ssl http2;
7 # listen [::]:443 ssl http2;
8
9 location / {
10 proxy_pass http://127.0.0.1:2007;
swee's Avatar

swee / znc.service

0 喜歡
0 分支
1 檔案
最後活躍 1749885970
1 [Unit]
2 Description=ZNC
3 After=network-online.target
4 Wants=network-online.target
5
6 [Service]
7 User=_znc
8 ExecStart=/usr/local/bin/znc -fDd /var/lib/znc
9 WorkingDirectory=/var/lib/znc
10 Type=simple
swee's Avatar

swee / MS Comic chat backtrace on Wine

0 喜歡
0 分支
1 檔案
最後活躍 1749880118
1 Unhandled exception: page fault on read access to 0x00000000 in wow64 32-bit code (0x0048cde0).
2 Register dump:
3 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:002b
4 EIP:0048cde0 ESP:0012f144 EBP:0012f150 EFLAGS:00010286( R- -- I S - -P- )
5 EAX:00504aff EBX:00000000 ECX:00000000 EDX:00000000
6 ESI:00000000 EDI:004fb33c
7 Stack dump:
8 0x0012f144: 00000000 00a27994 00a291f0 0012f188
9 0x0012f154: 00440e5f 004fb33c 00000000 0012f270
10 0x0012f164: 0012f26c 0046c2aa 00000000 0012f270
swee's Avatar

swee / Roundcube update script

0 喜歡
0 分支
1 檔案
最後活躍 1749444410
1 # How to run
2 # python3 roundcubeupdate.py
3 #
4 # You may need to run as root or www-data
5 #
6 # sudo -u www-data python3 roundcubeupdate.py
7 #
8 # sudo python3 roundcubeupdate.py
9
10 from tqdm import tqdm
swee's Avatar

swee / Update forgejo script

0 喜歡
0 分支
1 檔案
最後活躍 1749352102
Simple script to update Forgejo Server.
1 # HOW TO USE THIS SCRIPT
2 # download this file and run
3 # python3 forgejoupdate.py
4 #
5 # If you aren't root, use sudo or doas.
6 #
7 # If you use an init system to run Forgejo, you can let this script automatically restart Forgejo for you
8 # (Assuming Forgejo's service name is `forgejo`)
9 # By passsing the arguments `systemd` or `openrc`
10 #
swee's Avatar

swee / fiddleSave.html

0 喜歡
0 分支
1 檔案
最後活躍 1748914117
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <style>
7 iframe {
8 width: 95vw;
9 max-height: 512px;
10 border: none;
swee's Avatar

swee / config.php

0 喜歡
0 分支
1 檔案
最後活躍 1748726685
1 <?php
2 $CONFIG = array (
3 'objectstore' =>
4 array (
5 'class' => '\\OC\\Files\\ObjectStore\\S3',
6 'arguments' =>
7 array (
8 'bucket' => 'nextcloud',
9 'hostname' => '<redacted>.r2.cloudflarestorage.com',
10 'key' => '<redacted>',
swee's Avatar

swee / gist:d58b5bd2d3014b9293937bc0288c3419

0 喜歡
0 分支
1 檔案
最後活躍 1748400500
1 $ vkmark
2 =======================================================
3 vkmark 2025.01
4 =======================================================
5 Vendor ID: 0x10DE
6 Device ID: 0x134D
7 Device Name: NVIDIA GeForce 940MX (NVK GM108)
8 Driver Version: 104861697
9 Device UUID: 4716af26434230325d66d8018c806787
10 =======================================================
上一頁 下一頁

由 Opengist 提供支持 ⋅ Load: 118ms⋅

繁體中文
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文