- Remove ibus
sudo apt purge ibus
sudo apt autoremove
- Install Sogou Pinyin and dependencies
# Download deb installer from https://shurufa.sogou.com/linux
sudo dpkg -i <sogou_xxx.deb>
sudo apt install -f
sudo apt purge ibus
sudo apt autoremove
# Download deb installer from https://shurufa.sogou.com/linux
sudo dpkg -i <sogou_xxx.deb>
sudo apt install -f
#!/bin/bash | |
# Adapted from: https://wiki.postgresql.org/wiki/Automated_Backup_on_Linux | |
set -e | |
if [ $# -lt 2 ] ; then | |
echo "$0 <SOURCE_DIR> <BACKUP_DIR>" | |
exit 1 | |
fi |
# install system package: msmtp-mta | |
# put this config file at /etc/msmtprc | |
# find Aliyun DirectMail service at https://aliyun.com/product/directmail | |
defaults | |
auth on | |
tls on | |
tls_trust_file /etc/ssl/certs/ca-certificates.crt | |
aliases /etc/msmtp_aliases | |
logfile ~/.msmtp.log |
#!/bin/bash | |
set -e | |
V2RAY_PORT=18900 | |
NGINX_PORT_RANGE="8900-8999" | |
CLIENT_CFG_OUTPUT_PATH=v2ray_client.json | |
printf "Please make sure the firewall rules for ports 80, 443, $NGINX_PORT_RANGE have been set!\n" |
usecuda() | |
{ | |
export CUDA_VISIBLE_DEVICES=$1 | |
echo "Using cuda:$1" | |
} |
#!/bin/bash | |
set -e | |
SERVER_PORT="8194" | |
WORK_DIR="$HOME/openvpn" | |
EASYRSA_VERSION="3.1.7" | |
EASYRSA_DIR="$WORK_DIR/EasyRSA-$EASYRSA_VERSION" | |
CLIENT_CONFIGS_DIR="$WORK_DIR/client-configs" |
# Shell auto-completion for conda | |
# For Ubuntu, you may put this file in /etc/bash_completion.d/ or append the contents to ~/.bashrc | |
_conda_auto_comp() | |
{ | |
local cur opts | |
COMPREPLY=() | |
if [[ ${COMP_CWORD} == 1 ]]; then # list conda commands | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
opts="clean config create help info init install list package remove uninstall run search update upgrade activate deactivate" |
<?php $title="File Index";?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> | |
<title><?=$title?></title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> |
/****************************************************************************** | |
* Copyright (C) 2017 Yukai Miao <[email protected]> * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 3 of the License, or * | |
* (at your option) any later version. * | |
* * | |
* This program is distributed in the hope that it will be useful, * | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
#!/bin/sh | |
cpu_model='Unknown CPU' | |
cpu_cores='?' | |
if [ -r "/proc/cpuinfo" ]; then | |
cpu_model=$(cat /proc/cpuinfo | grep 'model name' | head -n 1 | sed 's/^.*:\s*//') | |
cpu_cores=$(cat /proc/cpuinfo | grep 'processor' | wc -l) | |
fi | |
mem_total='?G' | |
if [ -x "/usr/bin/free" ]; then |