Skip to content

Instantly share code, notes, and snippets.

@misaka00251
misaka00251 / README.md
Created March 10, 2021 10:56
Google always in com (no safesearch)

If you visit Google search from China, the SafeSearch option will on by default, and you can't turn it off (because it's already off in search settings). Login to Google will not solve this.

Visit Google's Non Country Redirection feature first will solve this problem. This userscript will automatically solve this issue for you. However, you need to wait when you perform a search request for the first time.

Tested in Violentmonkey.

Special thanks to @mengzonefire & the original author @opsomh.

@ncwhale
ncwhale / Desktop Play.sh
Last active June 4, 2020 17:53
Play any video on your Cinnamon( nemo-desktop ) Desktop using mpv.
#!/bin/bash
DESKTOP_WID=$(xdotool search --onlyvisible --classname "nemo-desktop" | head -n 1)
mpv --no-border --no-audio --osc=no --title="Desktop" --loop-playlist --wid="$DESKTOP_WID" "$@"
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet

I want to mount a previous Synology basic volume (wasn't using RAID or SHR) to copy data to a new drive.

Plug it in the USB port doesn't work, showing (Partition 1 does not start on phyical sector boundary).

# fdisk -l
Disk /dev/sdr: 2.7 TiB, 3000558944256 bytes, 5860466688 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
@ihciah
ihciah / README.MD
Last active February 2, 2024 00:08
A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

To help users in China mainland access telegram api stably and conveniently with low cost, this script maybe the one you need.

The server-less means you don't have to run a server to proxy the requests, just pay as you go.

Usage

Edit key_prefix, set it to the prefix of you bot address(like /bot563441998:) can avoid abusing.

import requests
import json
def get(kid):
comCode_url = 'https://www.kuaidi100.com/autonumber/autoComNum?text=' + kid
headers = {'Origin': "https://www.kuaidi100.com", 'Accept-Encoding': "gzip, deflate, br", 'Accept-Language': "en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,ja;q=0.2,zh-TW;q=0.2,uz;q=0.2,vi;q=0.2", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"}
c_r = requests.post(comCode_url, headers = headers)
c_r = json.loads(c_r.text)
comCode = c_r['auto'][0]['comCode']
get_url = 'https://www.kuaidi100.com/query?type=' + comCode + '&postid=' + kid + '&id=1&valicode=&temp=0.21830105590577142'
g_r = requests.post(get_url, headers = headers)
@SilverBut
SilverBut / haproxy.cfg
Last active May 19, 2023 20:45
[Haproxy cfg checking Socks5] Haproxy cfg to check the Socks5 connection #tags: GFW, network, haproxy, config
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
global
log 127.0.0.1 local2
@s4wny
s4wny / dell display manager command line documentation
Created October 10, 2015 18:59
dell display manager command line documentation
===============================================
Dell Display Manager
===============================================
Command language
-----------------------------------
A rich and flexible command language is supported via the
command-line, and command-line arguments can be combined.
Where appropriate, a specific display can be targeted by
prefacing the command with the display number, e.g.,