Tutti Nuovi

user:thomas utente che ha creato il gist

title:mygist titolo del gist

filename:myfile.txt nome di file nel gist

extension:yml estensione del file nel gist

language:go linguaggio del file nel gist

topic:homelab gists with given topic

Registrati

Entra


Tutti Nuovi Registrati Entra
's Avatar

anduin

Unito 5 months ago

Più recente creazione
Meno recente creazione
Più recente aggiornamento
Meno recente aggiornamento
Tutti i gists 61 Forkati 1
anduin's Avatar

anduin / CUDA monte carlo estimate pi

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
monte carlo estimate pi
1 #include <iostream>
2 #include <curand.h>
3 #include <curand_kernel.h>
4
5 __global__ void calculate_pi(int *count, unsigned long seed) {
6 int idx = threadIdx.x + blockIdx.x * blockDim.x;
7 curandState state;
8 curand_init(seed, idx, 0, &state);
9
10 float x = curand_uniform(&state);
anduin's Avatar

anduin / fake service.yml

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Make any docker service fake
1 # Fake entrypoint for the service. Always sleep.
2 entrypoint: ["sleep", "infinity"]
3 # Fake healthcheck for the service. Always return true.
4 healthcheck:
5 test: ["CMD", "true"]
anduin's Avatar

anduin / Low Saturation Fix

0 mi piace
0 forks
3 files
Ultima volta attivo 9 months ago

这部分内容是通用的用于诊断 Substrate 数据中心机器部署失败的方法。可以从宏观上找到核心问题。

  1. 准备工作区:立刻打开两个DMS,两个OSP和一个Kusto Explorer。

  2. 识别:识别有故障的范围,是版本还是Ring。在OSP检查此Ring趋势图。检查Substrate版本历史,确认其版本类型(Dogfood、Daily)。

我正在检查 ________ 版本,范围是 Deploy Ring _________,其部署状况是 ______,版本类型是 ______。
anduin's Avatar

anduin / Ceph deploy notes

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Ceph deploy notes

这里将在 3 台 node 上安装 ceph。

三台 node 的 hostname 分别是:

  • node1
  • node2
  • node3

三个 node 全部都插一块 新的 大硬盘。假如是 /dev/sdb 。

anduin's Avatar

anduin / Ubuntu ISCSI

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Ubuntu mount ISCSI server
1 # Ubuntu install ISCSI Server
2 # Assuming the IP of the server is 10.0.0.1
3
4 # Mount a disk as /dev/sdb first
5 apt install tgt -y
6
7 # Edit /etc/tgt/conf.d/iscsi.conf
8 echo "
9 <target iqn.2024-03.iscsi.server:lun1>
10 backing-store /dev/sdb
anduin's Avatar

anduin / Mount gluster fs

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
1 # Assuming using /dev/sdb is your new empty disk
2 # Assuming 10.0.0.* is your private network
3
4 # Install and configure GlusterFS. (Run on all nodes)
5 apt-get install glusterfs-server -y
6 systemctl start glusterd
7 systemctl enable glusterd
8
9 # Format the disk and mount it (Run on all nodes)
10 mkfs.xfs /dev/sdb
anduin's Avatar

anduin / 从 Vsphere 切换到 Docker Swarm 的收益

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago

省去虚拟机的烦恼

  • 攻击面显著减小。不需要维护那么多虚拟机的密码。
  • 不再需要配置复杂的 Linux 权限,反正在容器里就是 Root。
  • 不再需要配置复杂的路由器和 Linux 的路由表、networkmanager,反正容器开了都是建好的。
  • 不再需要重复运行大量无意义的 Linux 内核,巨大的节省资源
    • 过去,运行三个独立的业务,需要三个 VM。包括缓存,可能至少需要占用 20GB 的主机内存。
    • 迁移到容器后,唯一的内存开销就是容器的进程,每个业务只需要 200MB 内存。
  • 不再需要担心内存泄漏而对服务器定时重启,而是只重启容器即可
anduin's Avatar

anduin / Koel deployment

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
Koel deployment
1 echo "Downloading koel..."
2 sudo apt install tar wget jq
3 latestUrl=$(curl https://api.github.com/repos/koel/koel/releases/latest | jq -r '(.assets[] | select(.browser_download_url | contains(".zip"))).browser_download_url')
4 rm /tmp/koel.zip
5 rm /tmp/koel_ext -rf
6 wget -O /tmp/koel.zip $latestUrl
7
8 echo "Unziping koel..."
9 unzip /tmp/koel.zip -d /tmp/koel_ext
anduin's Avatar

anduin / WRT Build

1 mi piace
0 forks
1 files
Ultima volta attivo 1 year ago
1 #!/bin/sh
2 routerUser="root"
3 version="23.05.3"
4 #baseUrl="https://downloads.immortalwrt.org/releases/${version}/targets/x86/64"
5 baseUrl="https://immortalwrt.aiursoft.cn/releases/${version}/targets/x86/64" # Use mirror to speed up download
6 builderFileName="immortalwrt-imagebuilder-${version}-x86-64.Linux-x86_64.tar.xz"
7 pkgConfig="-dnsmasq dnsmasq-full ip-full vim vim-runtime -ethtool ethtool-full \
8 kmod-nf-nat kmod-nf-nat6 kmod-tls kmod-nft-arp kmod-nft-compat kmod-nft-connlimit kmod-nft-dup-inet kmod-nft-queue kmod-nft-socket kmod-nft-tproxy kmod-nft-xfrm kmod-nft-offload \
9 iptables-nft ip6tables-nft kmod-ipt-nat6 kmod-ipt-nat-extra kmod-ipt-nathelper-rtsp kmod-sched-mqprio kmod-ipt-offload \
10 kmod-e1000 kmod-e1000e kmod-igb kmod-ixgbe kmod-ixgbevf kmod-igc \
anduin's Avatar

anduin / Minecraft Run

0 mi piace
0 forks
1 files
Ultima volta attivo 2 years ago
New project

Anduin新开的坑:MinecraftRun。目标是制作一款支持 Minecraft Fabric、Forge的Mod,发布到论坛。

mod的功能是:在玩家出生的同时,其附近30格子会生成1个无限长度的结界。(difficult 难度下生成 2 个,成90度交叉)

mod的配置文件,有一个参数:difficulty:easy、normal、hard

结界以固定速度不停靠近玩家。不同难度的速度不同:

  • Easy:每隔10秒移动一格
  • Normal:每隔5秒移动一格
Più nuovi Più vecchi

Creato da Opengist ⋅ Load: 54ms⋅

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