Skip to content

Instantly share code, notes, and snippets.

View hydrz's full-sized avatar
🌌
Focusing

夜访萤火虫 hydrz

🌌
Focusing
View GitHub Profile
@hydrz
hydrz / alibaba_checks.xml
Created May 6, 2019 09:49
阿里巴巴Java代码规约
<?xml version="1.0" ?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- 检查文件是否以一个空行结束 -->
<module name="NewlineAtEndOfFile" />
<!-- 文件长度不超过1500行 -->
<module name="FileLength">
<property name="max" value="1500" />
</module>
<!-- 每个java文件一个语法树 -->
@hydrz
hydrz / phrases.ini
Last active December 13, 2023 08:33
搜狗拼音自定义短语
; 搜狗拼音输入法--自定义短语配置文件
; 自定义短语说明:
; 1、自定义短语支持多行、空格、指定位置。
; 2、每条自定义短语最多支持30000个汉字,总共支持100000条自定义短语。
; 3、自定义短语的格式如下:
; 单行的格式:
; 字符串+英文逗号+数字(指定排序位置)=短语
@hydrz
hydrz / README
Created June 27, 2019 02:11
OpenWrt Setup Multiple OpenVPN Server to Different VLANs
# How to Setup Multiple OpenVPN Server to Different VLANs
## Server Configs
The directories and configuration files that will be used:
- /etc/config/firewall
- /etc/config/network
- /etc/config/openvpn
- /etc/openvpn
## This is a network topology for this example:
@hydrz
hydrz / OpenVPN 2.0 的服务器端配置文件示例
Last active October 22, 2019 12:35
OpenVPN 2.0 的服务器端配置文件示例
#################################################
# 针对多客户端的OpenVPN 2.0 的服务器端配置文件示例
#
# 本文件用于多客户端<->单服务器端的OpenVPN服务器端配置
#
# OpenVPN也支持单机<->单机的配置(更多信息请查看网站上的示例页面)
#
# 该配置支持Windows或者Linux/BSD系统。此外,在Windows上,记得将路径加上双引号,
# 并且使用两个反斜杠,例如:"C:\\Program Files\\OpenVPN\\config\\foo.key"
#
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic — @amix3k
"
" Awesome_version:
" Get this config, nice color schemes and lots of plugins!
"
" Install the awesome version from:
"
" https://github.com/amix/vimrc
@hydrz
hydrz / docker-install.sh
Last active February 21, 2023 13:25
docker-install.sh
#!/usr/bin/sh
# config docker
mkdir -p /etc/docker
cat <<EOF >/etc/docker/daemon.json
{
"registry-mirrors": [
"https://2y38832m.mirror.aliyuncs.com"
]
}
@hydrz
hydrz / unixbench.sh
Created September 5, 2019 04:25
unixbench.sh
#! /bin/bash
cur_dir=/tmp/unixbench
# Check System
[[ $EUID -ne 0 ]] && echo 'Error: This script must be run as root!' && exit 1
[[ -f /etc/redhat-release ]] && os='centos'
[[ ! -z "$(egrep -i debian /etc/issue)" ]] && os='debian'
[[ ! -z "$(egrep -i ubuntu /etc/issue)" ]] && os='ubuntu'
[[ "$os" == '' ]] && echo 'Error: Your system is not supported to run it!' && exit 1
@hydrz
hydrz / kubernetes-dashboard-v1.10.1.yaml
Last active September 10, 2019 17:03
kubenetes deployments
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@hydrz
hydrz / git-lfs-install.sh
Last active February 9, 2020 04:10
deepin安装git-lfs
#!/bin/bash
curl -o /etc/apt/sources.list.d/git-lfs.list "https://packagecloud.io/install/repositories/github/git-lfs/config_file.list?os=debian&dist=stretch&source=script"
curl -L "https://packagecloud.io/github/git-lfs/gpgkey" 2> /dev/null | apt-key add -
apt update && apt install git-lfs
@hydrz
hydrz / idevicerestore.sh
Created November 6, 2019 10:01 — forked from stek29/idevicerestore.sh
idevicerestore on linux (Debian-based)
sudo apt update
# sudo apt upgrade
sudo apt install -y libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config
git clone https://github.com/libimobiledevice/libirecovery
git clone https://github.com/libimobiledevice/idevicerestore
git clone https://github.com/libimobiledevice/usbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
git clone https://github.com/libimobiledevice/libusbmuxd
git clone https://github.com/libimobiledevice/libplist