Skip to content

Instantly share code, notes, and snippets.

View groundcat's full-sized avatar

groundcat

  • Pennsylvania, US
  • 08:53 (UTC -04:00)
View GitHub Profile
@groundcat
groundcat / Full-Screen-iFrame
Last active February 22, 2019 21:37
Full Screen iFrame
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Home</title>
<style>
body{
margin:0;
padding:0;
overflow-y:hidden
@groundcat
groundcat / Import CSV to MySQL by PHP
Created April 27, 2019 16:09
Import CSV to MySQL by PHP
<?php
// Debug
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Connect
$conn = mysqli_connect("IP", "USERNAME", "PASSWORD", "DBNAME");
@groundcat
groundcat / Block_Baidu_Input_HOSTS.txt
Last active May 15, 2025 15:45
屏蔽搜狗/百度输入法后台联网
#<block-baidu>
127.0.0.1 olime.baidu.com
127.0.0.1 dr-ime.baidu.com
127.0.0.1 updateime.baidu.com
127.0.0.1 tips.ime.baidu.com
127.0.0.1 typing.bae.baidu.com
127.0.0.1 pcinput.baidu.com
#</block-baidu>
@groundcat
groundcat / Fix-Debian-8-apt-sources.list.md
Last active August 23, 2019 20:37
Fix Debian 8 sources.list and 404 issues

Edit sources.list

nano /etc/apt/sources.list

Replace it with:

deb http://ftp.debian.org/debian jessie main contrib
deb http://ftp.debian.org/debian jessie-updates main contrib
deb http://security.debian.org jessie/updates main contrib
@groundcat
groundcat / cloudflared-install.md
Last active October 21, 2019 03:39
DNS over HTTPS for MacOS

Install Cloudflared

Install via Terminal:

curl https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-darwin-amd64.tgz | tar xzC /usr/local/bin

Create and edit /usr/local/etc/cloudflared/config.yml

@groundcat
groundcat / Clash-BackCN.yaml
Created December 28, 2019 02:11
Clash 翻墙回国规则
Rule:
# 国内二级域名
- DOMAIN-SUFFIX,edu.cn,PROXY
- DOMAIN-SUFFIX,gov.cn,PROXY
# AcFun
- DOMAIN-SUFFIX,acfun.cn,PROXY
- DOMAIN-SUFFIX,acfun.com,PROXY
- DOMAIN-SUFFIX,aixifan.com,PROXY
# 网易
- DOMAIN-SUFFIX,163.com,PROXY
@groundcat
groundcat / keep-rclone-running.md
Last active May 16, 2020 02:31
Keep rclone running with cronjob

Install rclone:

curl https://rclone.org/install.sh | sudo bash

Configure rclone remote:

rclone config
@groundcat
groundcat / Use rclone mount on LXC OpenVZ VPS.md
Last active March 1, 2023 09:03
Use rclone mount on LXC OpenVZ VPS
yum --enablerepo=epel -y install fuse-sshfs
mknod -m 666 /dev/fuse c 10 229
rclone mount googledrive: /path/to/local/disk --allow-other --allow-non-empty --vfs-cache-mode writes

sudo update-rc.d -f udev disable

Start when boot

@groundcat
groundcat / Install Transmission on CentOS 7.md
Created July 5, 2020 03:30
Install Transmission on CentOS 7

Install dependency

yum groupinstall 'development tools'
yum install m4 libtool gettext libcurl-devel psmisc libevent-devel intltool gtk3-devel openssl-devel

Download Transmission official release

@groundcat
groundcat / Allows Read and Write Access to S3 Bucket.md
Created July 18, 2020 21:21
IAM Users - Allows Read and Write Access to S3 Bucket