Skip to content

Instantly share code, notes, and snippets.

View sarkrui's full-sized avatar
🚀
Kicking off

Sark sarkrui

🚀
Kicking off
View GitHub Profile
button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{padding:0;margin:0}h1,h2,h3,h4{padding-bottom:4px}h1,h2,h3,h4{text-rendering:optimizeLegibility}h1:last-child,h2:last-child,h3:last-child,h4:last-child{padding-bottom:0}h1.a-spacing-none,h2.a-spacing-none,h3.a-spacing-none,h4.a-spacing-none{padding-bottom:0}h1 .a-size-base,h1 .a-size-mini,h1 .a-size-small,h1.a-size-base,h1.a-size-mini,h1.a-size-small,h2 .a-size-base,h2 .a-size-mini,h2 .a-size-small,h2.a-size-base,h2.a-size-mini,h2.a-size-small,h3 .a-size-base,h3 .a-size-mini,h3 .a-size-small,h3.a-size-base,h3.a-size-mini,h3.a-size-small,h4 .a-size-base,h4 .a-size-mini,h4 .a-size-small,h4.a-size-base,h4.a-size-mini,h4.a-size-small{padding-bottom:0}h1,h2{padding-bottom:4px}h3,h4{padding-bottom:4px}.a-size-medium .a-row.a-size-base,h1 .a-row.a-size-base,h2 .a-row.a-size-base,h3 .a-row.a-size-base,h4 .a-size-large .a-row.a-size-base{padding-top:1px}.a-size-base .a-row.a-size-base{padding-top:0}.a-size-micro{font-size:10px;line-height:1.6}.a-size-m
@sarkrui
sarkrui / README.md
Last active May 10, 2024 02:33
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 https://mirrors.tuna.tsinghua.edu.cn/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