This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 切换阿里云源 | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
WORKDIR /var/www/html | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list | |
RUN sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y build-essential apt-utils curl software-properties-common g++ make git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 govchengdu.cn | |
127.0.0.1 vipwm.cc | |
127.0.0.1 govxian.cn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 现在输出是没问题了,但是实际保存为文件还有问题 | |
// from: http://stackoverflow.com/questions/13958303/curl-download-progress-in-php | |
// 原文中的代码有bug,作了修改 | |
$url = 'http://ipv4.speedtest-sgp1.digitalocean.com/10mb.test'; | |
echo "<pre>"; | |
echo "Loading ..."; | |
ob_flush(); | |
flush(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# System related | |
sudo apt-get update | |
sudo apt-get -y install build-essential ssh curl software-properties-common python-software-properties python g++ make | |
# VCS | |
sudo apt-get -y install subversion git | |
# Web Server | |
sudo apt-get -y install apache2 | |
# php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerName localhost | |
<VirtualHost *:80> ServerAdmin webmaster@localhost | |
DocumentRoot /var/www | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /var/www/> | |
Options FollowSymLinks MultiViews Includes -Indexes |
NewerOlder