All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated
anduin's Avatar

anduin / Wikipedia API

0 likes
0 forks
1 files
Last active 2 years ago
Wikipedia API

https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=archlinux&format=json

https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&explaintext=&exsectionformat=wiki&pageids=674891

anduin's Avatar

anduin / Install K8S

0 likes
0 forks
1 files
Last active 2 years ago
Install K8S on your home lab!
1 #/bin/bash
2 # This script is to install Kubernetes on Ubuntu 22.04 LTS, with Calico as CNI
3 # This script used 10.244.0.0/16 as pod network CIDR. This network should not be used in your physical network.
4 # This script used Calico v3.27.0. You can change it to the latest version.
5 # Reference: https://www.cherryservers.com/blog/install-kubernetes-on-ubuntu
6
7 DEBIAN_FRONTEND=noninteractive sudo apt update
8 DEBIAN_FRONTEND=noninteractive sudo apt install curl gnupg2 software-properties-common apt-transport-https ca-certificates -y
9
10 echo "Disable swap..."

codgician_local / openwrt-payload

0 likes
0 forks
1 files
Last active 2 years ago
1 #!/bin/sh
2 # OpenWrt image generation script
3 # This is only intended for dot build upgrades!
4 # Execute inside a new folder.
5
6 # Parameters: change to your configuration!
7 routerUser="root"
8 routerIp="192.168.0.1"
9 version="23.05.2"
10 baseUrl="https://downloads.openwrt.org/releases/${version}/targets/x86/64"
anduin's Avatar

anduin / Init all slns

0 likes
0 forks
1 files
Last active 2 years ago
Init all slns
1 # Create solution.
2 rm *.sln
3 dotnet new sln
4 find . -name *.csproj | xargs -I {} dotnet sln add {}
5
6 # Build projects
7 find . -name *.csproj | xargs -I {} dotnet publish {} -r win-x64 -c Release --self-contained
8
9 # Push all
10 for dir1 in ./*; do
aimerneige's Avatar

aimerneige / Prime

0 likes
0 forks
2 files
Last active 2 years ago
1 func primes() chan int {
2 ch := make(chan int)
3 go func() {
4 defer close(ch)
5 primes := []int{}
6 for i := 2; ; i++ {
7 isPrime := true
8 for _, p := range primes {
9 if p*p > i {
10 break
aimerneige's Avatar

aimerneige / extract specific file(s) from tar.gz

0 likes
0 forks
1 files
Last active 2 years ago
1 # extract specific file(s) from tar.gz
2 tar -zxvf <tar filename> <file you want to extract>
3
4 # -x: instructs tar to extract files.
5 # -f: specifies filename / tarball name.
6 # -v: Verbose (show progress while extracting files).
7 # -z: filter archive through gzip, use to decompress .gz files.
8 # -t: List the contents of an archive
9 # https://unix.stackexchange.com/questions/61461/how-to-extract-specific-files-from-tar-gz
aimerneige's Avatar

aimerneige / Fix WSL DNS

0 likes
0 forks
1 files
Last active 2 years ago
1 sudo rm /etc/resolv.conf
2 sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
3 # sudo bash -c 'echo "nameserver 223.5.5.5" > /etc/resolv.conf' # 阿里DNS
4 sudo bash -c 'echo "[network]" > /etc/wsl.conf'
5 sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf'
6 sudo chattr +i /etc/resolv.conf
anduin's Avatar

anduin / Cloud build gz builder

0 likes
0 forks
1 files
Last active 2 years ago
1 using System.IO.Compression;
2 using Newtonsoft.Json;
3
4 public class Program
5 {
6 public static async Task Main(string[] args)
7 {
8 var address =
9 @"qb";
10 var flPath = Path.Combine(Directory.GetCurrentDirectory(), "files.txt");
aimerneige's Avatar

aimerneige / windows.ps1

0 likes
0 forks
1 files
Last active 2 years ago
1 # Disable Hibernation
2 powercfg.exe /hibernate off
3
4 # Disable Windows 10 fast boot via Powershell
5 # /v is the REG_DWORD /t Specifies the type of registry entries /d Specifies the data for the new entry /f Adds or deletes registry content without prompting for confirmation.
6 REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d "0" /f
7 # https://superuser.com/questions/1277170/disable-windows-10-fast-boot-via-cmd-powershell

rdf_local / winsock reset.bat

0 likes
0 forks
1 files
Last active 2 years ago
1 netsh winsock reset
2 netsh winsock reset
3 netsh winsock reset
4 netcfg -d
5 netcfg -d
6 netcfg -d
7 netcfg -d
8 netcfg -d
9 netcfg -d
10 netcfg -d
Newer Older

Powered by Opengist ⋅ Load: 66ms⋅

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