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
### EXAMPLE MINIO NGINX CONF THAT SERVE BOTH S3 AND CONSOLE ### | |
# HTTP to HTTPS redirect | |
server { | |
listen 80; | |
server_name minio.example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
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
wget \ | |
-e robots=off \ # 使 wget 忽略 robots.txt 文件,有些 robots.txt 不允许爬虫,默认情况下 wget 会尊重该文件 | |
--mirror \ # 将整个网站“镜像”下来 | |
--exclude-directories=*apt* \ # 忽略带有“apt”字样的文件夹 | |
--no-parent \ # 忽略该 URL 的上级目录 | |
-nH \ # 不创建以网站地址为名称的文件夹 | |
--reject html,deb \ # 不下载以 .html 和 .deb 为结尾的文件。 | |
mirrors.tuna.tsinghua.edu.cn/docker/ # 下载地址 |
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
## 每日一个计算机单词 | |
每日单词活动旨在分享系统、文档或技术网站中常见的单词,帮助大家在处理日常事务中更准确地理解所阅读的内容和处理的问题。计划每日更新。十分建议您准备一份文本文件或一页纸将内容记录下来,日积月累,滴水串石。 | |
### 2015年12月7日:repository | |
Repository在英语中主要是【存东西的库】的意思,比如说艺术馆是艺术品的repository,水库是水的repository。我们也可以说某人对历史故事很了解,那他便可被别人称为历史故事方面的repository。 | |
在IT行业中,repository是一个经常出现的词。最为系统工程师所熟悉的大概便是yum源(CentOS-Base.repo中的repo)了。除此之外,在Github中,某一个项目的代码库也被成为这个项目的repository。再比如,我们存放工作文档的SVN上,也是一个个的repository。因为repository在不同的语境下被翻译成了各种各样的中文词语,也实在没有办法为repository确定一个翻译。因此,我们只要理解repository是【存东西的库,放东西的地方】就好了。 |
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
#这里是英雄选择池 | |
#格式为“姓名,权重” | |
#张雪涛,1 | |
陈章权,1 | |
李广慧,1 | |
高世龙,1 | |
李小铂,1 | |
顾鑫,1 | |
#卢雨衡,1 |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import random | |
import sys | |
def get_hero_list_file(hero_list_file): | |
'''获取姓名和权重的文件,返回一个以姓名为key,权重为value的dict。 |
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
--- | |
- hosts: all | |
become: true | |
tasks: | |
- name: disable-ipv6 | |
sysctl: | |
name: "net.ipv6.conf.all.disable_ipv6" | |
value: 1 | |
sysctl_set: yes | |
reload: yes |
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
#!/bin/sh | |
# | |
# zabbix-agent - <summary> | |
# | |
# chkconfig: 2345 55 25 | |
# description: Zabbix agent for DepponHQ IT Infrastructure. | |
# | |
# processname: zabbix-agentd | |
# config: /usr/local/zabbix-agent/etc/zabbix_agentd.conf | |
# pidfile: /usr/local/zabbix-agent/run/zabbix-agentd.pid |
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
#!/bin/bash | |
# Author: Li Guanghui | |
# Set error color | |
Color_Text() | |
{ | |
echo -e " \e[0;$2m$1\e[0m" | |
} |