Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

Registrarse

Iniciar sesión


Todos Nuevo Registrarse Iniciar sesión
's Avatar

anduin

Unido 5 months ago

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado
Todos los gists 61 Bifurcado 1
anduin's Avatar

anduin / 监控服务器实时IP流量

0 gustos
0 bifurcaciones
3 archivos
Última actividad 1 year ago
1 #!/bin/bash
2
3 function monitor_traffic() {
4 if [ -z "$1" ]; then
5 echo "Usage: $0 <network_interface>"
6 echo "Available network interfaces:"
7 ip link show | awk -F': ' '/^[0-9]+: /{print $2}'
8 exit 1
9 fi
anduin's Avatar

anduin / My Virtual Machine

0 gustos
0 bifurcaciones
1 archivos
Última actividad 11 months ago
1 <domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
2 <name>win11</name>
3 <uuid>756529ab-15aa-4223-bcee-df013e8bd3e4</uuid>
4 <metadata>
5 <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
6 <libosinfo:os id="http://microsoft.com/win/11"/>
7 </libosinfo:libosinfo>
8 </metadata>
9 <memory unit="KiB">67108864</memory>
10 <currentMemory unit="KiB">67108864</currentMemory>
anduin's Avatar

anduin / 机顶盒

0 gustos
0 bifurcaciones
2 archivos
Última actividad 1 year ago
这是一个Chrome插件。安装后,在浏览器打开 CCTV 的电视直播网站时,自动将视频全屏,并支持[]键换台
1 // 函数:将视频元素设置为覆盖整个窗口
2 function makeVideoFullWindow(video) {
3 console.log('Making video full window.');
4
5 // 设置视频的样式,使其占据整个页面
6 video.style.position = 'fixed';
7 video.style.top = '0';
8 video.style.left = '0';
9 video.style.width = '100vw';
10 video.style.height = '100vh';
anduin's Avatar

anduin / apt-mirror

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 year ago
1 #!/usr/bin/perl
2
3 =pod
4
5 =head1 NAME
6
7 apt-mirror - apt sources mirroring tool
8
9 =head1 SYNOPSIS
anduin's Avatar

anduin / Burn an ISO to usb

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 year ago
1 #!/bin/bash
2
3 #==========================
4 # Set up the environment
5 #==========================
6 set -e # exit on error
7 set -o pipefail # exit on pipeline error
8 set -u # treat unset variable as error
9
10 #==========================
anduin's Avatar

anduin / Server Init

1 gustos
0 bifurcaciones
3 archivos
Última actividad 7 months ago
Init a server from cloud provider
1 #!/usr/bin/env bash
2 #===============================================================================
3 # Concise server preparation script with error confirmation (idempotent)
4 #===============================================================================
5
6 set -euo pipefail
7 export LC_ALL=C
8 export LANG=en_US.UTF-8
9 export DEBIAN_FRONTEND=noninteractive
anduin's Avatar

anduin / Seed AnduinOS

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 year ago
1
2
3 sudo apt update
4 sudo apt install aria2 -y
5
6 wget https://download.anduinos.com/1.0.4/AnduinOS-1.0.4-en_US.torrent
7
8 sudo ufw allow 6881
9
10 while true; do
anduin's Avatar

anduin / 汇编入门

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 year ago
Embed Assembly in C
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <sys/mman.h>
5 #include <unistd.h>
6
7 unsigned char add_bin[] = {
8 // 这里是针对 x86_64 架构的 add 函数的二进制机器码
9 0x55, // push %rbp
10 0x48, 0x89, 0xe5, // mov %rsp,%rbp
anduin's Avatar

anduin / Docker install tzdata

0 gustos
0 bifurcaciones
1 archivos
Última actividad 2 years ago
1 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
2 apt-get install -y tzdata && \
3 echo "Etc/UTC" > /etc/timezone && \
4 ln -fs /usr/share/zoneinfo/UTC /etc/localtime && \
5 dpkg-reconfigure -f noninteractive tzdata
anduin's Avatar

anduin / Azure Service Bus to Kusto

0 gustos
0 bifurcaciones
2 archivos
Última actividad 1 year ago
1 using System.ComponentModel;
2 using System.Data;
3 using System.Text;
4 using Aiursoft.Canon;
5 using Azure.Identity;
6 using Azure.Messaging.ServiceBus;
7 using Kusto.Data;
8 using Kusto.Ingest;
9 using Microsoft.Extensions.DependencyInjection;
10 using Microsoft.Extensions.Logging;
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 50ms⋅

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