Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sarkrui's full-sized avatar
🚀
Kicking off

Sark sarkrui

🚀
Kicking off
View GitHub Profile
@sarkrui
sarkrui / README.md
Created February 22, 2024 09:19
Upgrade GLIBC on Debian

ehco: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ehco)
ehco: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ehco)
echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list
apt update && apt install libc6
#!/bin/bash
# Script to check connectivity and ensure VPN connection
# Perform a curl command to check connectivity to google.com
if curl -s --connect-timeout 2 google.com > /dev/null; then
echo "ok"
else
# If curl command fails, attempt to connect to VPN using GlobalProtect
globalprotect connect
fi
@sarkrui
sarkrui / README.md
Created February 6, 2024 03:43
sshd: no hostkeys available -- exiting.

sshd: no hostkeys available -- exiting.

sudo ssh-keygen -A
sudo service ssh --full-restart
@sarkrui
sarkrui / shutcount.sh
Created January 25, 2024 09:48
Shutcount script for Fuji cameras
#!/bin/bash
process_file() {
photo_path=$1
if ! command -v exiftool &> /dev/null; then
echo "exiftool could not be found. Attempting to download and install it."
# Creating the Downloads directory if it doesn't exist
mkdir -p ~/Downloads
@sarkrui
sarkrui / r-126.txt
Last active January 11, 2024 04:47
mybib.txt
10.1145/3532106.3533535
10.1145/3544548.3580643
10.1145/3532106.3533494
10.1145/3313831.3376129
10.1145/3430524.3446066
10.1145/3546155.3546689
10.1145/2501988.2502037
10.1145/2984511.2984520
10.1145/3332165.3347901
10.1145/3332165.3347956
@sarkrui
sarkrui / README.md
Created January 5, 2024 07:07
Constantly killing ptpcamerad on Sonoma
while true; do
    # Get the PID of the prpcamerad service
    pid=$(pgrep -x "ptpcamerad")

    if [ -n "$pid" ]; then
        echo "Service prpcamerad is running with PID: $pid. Attempting to stop it..."
        # Kill the service using its PID
        sudo kill -9 $pid
 else
@sarkrui
sarkrui / README.md
Last active December 30, 2023 07:49
VPS 脚本集合

测速

bash <(wget -qO- https://bench.im/hyperspeed)

宝塔

纯原版 1:

curl -sSO https://raw.githubusercontent.com/zhucaidan/btpanel-v7.7.0/main/install/install_panel.sh && bash install_panel.sh
@sarkrui
sarkrui / README.md
Created December 14, 2023 05:08
OOCSI Web Docker Configuration
mkdir -p /etc/docker/oocsi-web-docker

Docker-compose template

version: '1.0'

services:
 oocsi-server:
@sarkrui
sarkrui / docker_install_debian12.sh
Last active December 14, 2023 03:46
docker_install_debian12
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
grep "English" /www/server/panel/config/config.json
if [ "$?" -ne 0 ]; then
public_file=/www/server/panel/install/public.sh
if [ ! -f $public_file ]; then
wget -O $public_file https://download.bt.cn/install/public.sh -T 5
fi
@sarkrui
sarkrui / dnsmasq_sniproxy.sh
Last active November 6, 2023 07:12
proxy list for dnsmasq sniproxy
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
plain='\033[0m'