Skip to content

Instantly share code, notes, and snippets.

@fasthold
fasthold / block ads for v2ray
Last active April 12, 2022 09:59
ad block domains
domain:pglstatp-toutiao.com,
domain:pangolin-sdk-toutiao.com,
domain:pangolin-sdk-toutiao-b.com,
domain:hykjdd.com,
domain:mobads.baidu.com,
domain:tracking.miui.com,
domain:ad.xiaomi.com,
domain:applog.uc.cn,
domain:qh-material.taobao.com,
domain:tdlog.tangdou.com,
@fasthold
fasthold / install-22.04.sh
Last active November 13, 2024 04:55
Ubuntu 22.04 PHP MySQL
# 切换阿里云源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
bash -c "cat << EOF> /etc/apt/sources.list && apt update
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
@fasthold
fasthold / ContentScreen.js
Created April 3, 2023 06:29
React Native 加载webview网页时,后退按钮定义为网页返回而不是整体screen返回
import { SafeAreaView, StyleSheet, Text, View, ActivityIndicator, BackHandler } from 'react-native';
import React, { useRef, useState, useEffect } from 'react';
import { WebView } from 'react-native-webview';
const Contents = ({ navigation }) => {
const webViewRef = useRef()
const [isLoading, setLoading] = useState(false);
const handleBackButtonPress = () => {
if (webViewRef.current.canGoBack) {
@fasthold
fasthold / pandoc.css
Created October 11, 2023 07:40 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}