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 / install-cloudflared.md
Created May 31, 2023 12:19
Install Cloudflared on Alpine Linux

Cloudflared Setup Guide

This guide will walk you through setting up Cloudflared on your system.

Pre-Requisites

You need to have administrative (sudo) access to your system.

Here are the steps to install Cloudflared.

@sarkrui
sarkrui / com.rclone.plist
Created March 1, 2020 11:34
Auto mount Rclone on macOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>rclone</string>
<key>ProgramArguments</key>
<array>
@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 &amp;&amp; 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